当前位置:网站首页>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 (+ —— +).
边栏推荐
- Data mining 2021-4-27 class notes
- Discussion on enterprise informatization construction
- Slice and index of array with data type
- Introduction to the usage of getopts in shell
- Bert install no package metadata was found for the 'sacraments' distribution
- The method of replacing the newline character '\n' of a file with a space in the shell
- 2022-2-14 learning xiangniuke project - generate verification code
- AcWing 786. 第k个数
- 推荐一个 yyds 的低代码开源项目
- Noip 2002 popularity group selection number
猜你喜欢
Binary tree sorting (C language, int type)
Install third-party libraries such as Jieba under Anaconda pytorch
Memory search acwing 901 skiing
We have a common name, XX Gong
【点云处理之论文狂读经典版10】—— PointCNN: Convolution On X-Transformed Points
[advanced feature learning on point clouds using multi resolution features and learning]
LeetCode 515. 在每个树行中找最大值
2022-2-14 learning the imitation Niuke project - send email
樹形DP AcWing 285. 沒有上司的舞會
【点云处理之论文狂读前沿版10】—— MVTN: Multi-View Transformation Network for 3D Shape Recognition
随机推荐
【点云处理之论文狂读前沿版10】—— MVTN: Multi-View Transformation Network for 3D Shape Recognition
Tree DP acwing 285 A dance without a boss
Just graduate student reading thesis
Vscode connect to remote server
Noip 2002 popularity group selection number
AcWing 785. Quick sort (template)
【点云处理之论文狂读经典版9】—— Pointwise Convolutional Neural Networks
[point cloud processing paper crazy reading classic version 12] - foldingnet: point cloud auto encoder via deep grid deformation
【点云处理之论文狂读经典版10】—— PointCNN: Convolution On X-Transformed Points
Binary tree sorting (C language, char type)
Education informatization has stepped into 2.0. How can jnpf help teachers reduce their burden and improve efficiency?
Instant messaging IM is the countercurrent of the progress of the times? See what jnpf says
状态压缩DP AcWing 91. 最短Hamilton路径
What is an excellent fast development framework like?
Low code momentum, this information management system development artifact, you deserve it!
Linxu learning (4) -- Yum and apt commands
Wonderful review | i/o extended 2022 activity dry goods sharing
LeetCode 535. Encryption and decryption of tinyurl
LeetCode 508. 出现次数最多的子树元素和
【点云处理之论文狂读前沿版12】—— Adaptive Graph Convolution for Point Cloud Analysis