当前位置:网站首页>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 (+ —— +).
边栏推荐
- [untitled] use of cmake
- LeetCode 241. Design priorities for operational expressions
- Binary tree sorting (C language, char type)
- Uc/os self-study from 0
- AcWing 786. Number k
- Digital management medium + low code, jnpf opens a new engine for enterprise digital transformation
- Use the interface colmap interface of openmvs to generate the pose file required by openmvs mvs
- C language file reading and writing
- Digital statistics DP acwing 338 Counting problem
- Common penetration test range
猜你喜欢
![[point cloud processing paper crazy reading frontier version 10] - mvtn: multi view transformation network for 3D shape recognition](/img/94/2ab1feb252dc84c2b4fcad50a0803f.png)
[point cloud processing paper crazy reading frontier version 10] - mvtn: multi view transformation network for 3D shape recognition

Find the combination number acwing 886 Find the combination number II

LeetCode 871. Minimum refueling times

Binary tree sorting (C language, char type)

LeetCode 535. TinyURL 的加密与解密

【点云处理之论文狂读前沿版8】—— Pointview-GCN: 3D Shape Classification With Multi-View Point Clouds

Basic knowledge of network security

教育信息化步入2.0,看看JNPF如何帮助教师减负,提高效率?

AcWing 788. Number of pairs in reverse order

On February 14, 2022, learn the imitation Niuke project - develop the registration function
随机推荐
拯救剧荒,程序员最爱看的高分美剧TOP10
CSDN markdown editor help document
LeetCode 532. 数组中的 k-diff 数对
[point cloud processing paper crazy reading classic version 14] - dynamic graph CNN for learning on point clouds
数位统计DP AcWing 338. 计数问题
Linxu learning (4) -- Yum and apt commands
Excel is not as good as jnpf form for 3 minutes in an hour. Leaders must praise it when making reports like this!
<, < <,>, > > Introduction in shell
Too many open files solution
Introduction to the usage of getopts in shell
AcWing 788. 逆序对的数量
Sword finger offer II 091 Paint the house
LeetCode 535. TinyURL 的加密与解密
浅谈企业信息化建设
【毕业季|进击的技术er】又到一年毕业季,一毕业就转行,从动物科学到程序员,10年程序员有话说
2022-2-14 learning xiangniuke project - Session Management
即时通讯IM,是时代进步的逆流?看看JNPF怎么说
dried food! What problems will the intelligent management of retail industry encounter? It is enough to understand this article
The difference between if -n and -z in shell
LeetCode 1089. 复写零