当前位置:网站首页>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 defaultsee .
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 (+ —— +).
边栏推荐
- Summary of methods for counting the number of file lines in shell scripts
- Save the drama shortage, programmers' favorite high-score American drama TOP10
- 【点云处理之论文狂读前沿版12】—— Adaptive Graph Convolution for Point Cloud Analysis
- LeetCode 532. 数组中的 k-diff 数对
- LeetCode 513. 找树左下角的值
- Character pyramid
- 数字化管理中台+低代码,JNPF开启企业数字化转型的新引擎
- LeetCode 241. Design priorities for operational expressions
- Vscode connect to remote server
- 状态压缩DP AcWing 291. 蒙德里安的梦想
猜你喜欢

剑指 Offer II 029. 排序的循环链表

2022-2-14 learning xiangniuke project - Session Management

Basic knowledge of network security

数字化转型中,企业设备管理会出现什么问题?JNPF或将是“最优解”

【点云处理之论文狂读前沿版13】—— GAPNet: Graph Attention based Point Neural Network for Exploiting Local Feature

20220630 learning clock in

干货!零售业智能化管理会遇到哪些问题?看懂这篇文章就够了

LeetCode 75. Color classification

On a un nom en commun, maître XX.

LeetCode 715. Range module
随机推荐
State compression DP acwing 291 Mondrian's dream
Six dimensional space (C language)
LeetCode 535. Encryption and decryption of tinyurl
[point cloud processing paper crazy reading classic version 10] - pointcnn: revolution on x-transformed points
The "booster" of traditional office mode, Building OA office system, was so simple!
2022-2-14 learning xiangniuke project - generate verification code
推荐一个 yyds 的低代码开源项目
Shell script kills the process according to the port number
精彩回顾|I/O Extended 2022 活动干货分享
STM32F103 can learning record
Arbre DP acwing 285. Un bal sans patron.
Binary tree traversal (first order traversal. Output results according to first order, middle order, and last order)
传统办公模式的“助推器”,搭建OA办公系统,原来就这么简单!
AcWing 786. 第k个数
Digital statistics DP acwing 338 Counting problem
We have a common name, XX Gong
LeetCode 438. 找到字符串中所有字母异位词
【点云处理之论文狂读前沿版9】—Advanced Feature Learning on Point Clouds using Multi-resolution Features and Learni
Sword finger offer II 091 Paint the house
【点云处理之论文狂读经典版11】—— Mining Point Cloud Local Structures by Kernel Correlation and Graph Pooling