当前位置:网站首页>Build a solo blog from scratch
Build a solo blog from scratch
2022-07-03 09:15:00 【Fill your head with water】
Catalog
The following contents are in the form of Tencent cloud For example
1. Buy servers
First of all, you have to have your own server , Skip if you have .
Tencent and Alibaba offer great discounts to new users and students , If you configure it, just hang solo, Buy the minimum configuration 1G1 nucleus 1M that will do .
The lightweight server of Tencent cloud I bought here , If the image is selected CentOS 8.2
2. Purchase domain name ( No )
It is recommended to buy a domain name , Directly through IP The interview is not particularly good .
3. Domain name resolution and filing
After purchasing the server and domain name, you need to resolve the domain name to the server , Some service providers may not support cross service provider parsing , Tencent cloud domain name can resolve Alibaba cloud servers . The parsing process probably requires 10 minute . After parsing, see the following figure :
Then go to the record ( The filing time may be relatively long, about a week ).
4. To configure
4.1 Install the pagoda panel
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh
After installation, you will be given the access address, user name and password .
If you forget, you can enterbt default
see .
In the pagoda panel settings, you can set your security entry, panel user and password .
4.2 Enter the pagoda software store to install the latest version mysql and Nginx
And add your domain name to the website , And create solo The database of
( Database name solo, Encoding selection utf8mb4, User name and password customization )
4.3 Install in the server Docker
# uninstall docker+ install :
https://yeasy.gitbook.io/docker_practice/install/centos
4.4 Firewall open port
Server and firewall open ports
The server enters the firewall Directly click Add Rule ( Enter the port you want to open ) that will do ,
Then there is the firewall here , as follows :
1、 Turn on the firewall
systemctl start firewalld
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --zone=public --add-port=3306/tcp --permanent
# firewall-cmd --zone=public --remove-port=80/tcp --permanent( Close the specified port )
3、 service iptables restart
firewall-cmd --reload
4、 View port number
netstat -ntlp // View all of the current tcp port ·
netstat -ntulp |grep 8080 // View all 8080 Port usage ·
4.5 install solo
docker run --detach --name solo --network=host \
--env RUNTIME_DB="MYSQL" \
--env JDBC_USERNAME=" The user name of the database created above " \
--env JDBC_PASSWORD=" password " \
--env JDBC_DRIVER="com.mysql.cj.jdbc.Driver" \
--env JDBC_URL="jdbc:mysql://127.0.0.1:3306/solo?useUnicode=yes&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true" \
b3log/solo --listen_port=8080 --server_scheme=http --server_host= Yours ip --server_port=
# View the running container
docker ps
At this time, I can pass you domain name :8080 Visit your solo Blog
4.6 apply ssl certificate , take http Upgrade to https( Skippable )
ssl You can apply if the certificate filing is not completed , however http upgrade https Only after the filing is completed , If the record is not completed, you can collect this article first , Continue after filing .
visit SSL Certificate purchase apply
Private key is optional
Verification mode
You can go straight to SSL certificate Domain name verification guidelines - Operation guide - Document center - Tencent cloud see
Here is to select Manual DNS verification
Go after applying ssl certificate Download your certificate
After downloading, enter the pagoda panel to add a site ( Just fill in your domain name , The database is on it 4.2 The place of It has been created )
Click Settings , Put the compressed package you just downloaded .key and .pem Open the document in Notepad , Copy and paste the contents into the corresponding two boxes below , Save and open mandatory https.
Then click the configuration file to copy the following code to the corresponding location in the following figure ( The content of the original position can be directly replaced )
location / {
add_header Content-Security-Policy upgrade-insecure-requests;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8080;
# rewrite ^(.*)$ https://$server_name$1 permanent;
}
5. Summary
First time to do this thing , There may be something wrong , Boss, please point out (+ —— +).
边栏推荐
- 网络安全必会的基础知识
- [point cloud processing paper crazy reading classic version 7] - dynamic edge conditioned filters in revolutionary neural networks on Graphs
- Severity code description the project file line prohibits the display of status error c2440 "initialization": unable to convert from "const char [31]" to "char *"
- Method of intercepting string in shell
- LeetCode 1089. Duplicate zero
- Using DLV to analyze the high CPU consumption of golang process
- Binary tree sorting (C language, int type)
- 推荐一个 yyds 的低代码开源项目
- Common DOS commands
- 即时通讯IM,是时代进步的逆流?看看JNPF怎么说
猜你喜欢
【点云处理之论文狂读经典版9】—— Pointwise Convolutional Neural Networks
浅谈企业信息化建设
推荐一个 yyds 的低代码开源项目
LeetCode 535. Encryption and decryption of tinyurl
低代码起势,这款信息管理系统开发神器,你值得拥有!
Excel is not as good as jnpf form for 3 minutes in an hour. Leaders must praise it when making reports like this!
What is an excellent fast development framework like?
Discussion on enterprise informatization construction
LeetCode 715. Range module
Tree DP acwing 285 A dance without a boss
随机推荐
Methods of checking ports according to processes and checking processes according to ports
LeetCode 508. The most frequent subtree elements and
LeetCode 75. 颜色分类
求组合数 AcWing 885. 求组合数 I
Facial expression recognition based on pytorch convolution -- graduation project
【点云处理之论文狂读前沿版13】—— GAPNet: Graph Attention based Point Neural Network for Exploiting Local Feature
[point cloud processing paper crazy reading frontier version 10] - mvtn: multi view transformation network for 3D shape recognition
LeetCode 515. Find the maximum value in each tree row
Recommend a low code open source project of yyds
State compression DP acwing 91 Shortest Hamilton path
Vscode connect to remote server
In the digital transformation, what problems will occur in enterprise equipment management? Jnpf may be the "optimal solution"
2022-1-6 Niuke net brush sword finger offer
LeetCode 30. 串联所有单词的子串
【点云处理之论文狂读经典版14】—— Dynamic Graph CNN for Learning on Point Clouds
LeetCode 871. Minimum refueling times
Arbre DP acwing 285. Un bal sans patron.
LeetCode 30. Concatenate substrings of all words
PIC16F648A-E/SS PIC16 8位 微控制器,7KB(4Kx14)
MySQL installation and configuration (command line version)