结合视频观看
【如何优雅地写博客】用好Markdown语法!
https://bilibili.com/BV1wL4y187FU
Halo完整搭建视频:
https://bilibili.com/BV1JN411Q7Na
视频测试环境
- Ubuntu20.04
- 宝塔面板7.7.0
- Nginx1.18.0
- MySQL5.6.50
- PHP7.4
- Docker20.10.8
- Docker Compose1.29.2
Markdown用法
具体请见:https://editor.mdnice.com/
宝塔安装及去除登陆框
安装宝塔:
官网:bt.cn
去除登陆框
sed -i "s|if (bind_user == 'True') {|if (bind_user == 'REMOVED') {|g" /www/server/panel/BTPanel/static/js/index.js
rm -rf /www/server/panel/data/bind.pl
更多有用的脚本可以看这里:https://breakthewa11.com/archives/useful-script.html
Ubuntu开启BBR加速
修改系统变量:
echo net.core.default_qdisc=fq >> /etc/sysctl.conf
echo net.ipv4.tcp_congestion_control=bbr >> /etc/sysctl.conf
保存生效:
sysctl -p
执行:
sysctl net.ipv4.tcp_available_congestion_control
如果结果是这样:
sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = bbr cubic reno
就开启了。 执行lsmod | grep bbr
,以检测 BBR 是否开启。
来源:https://www.mf8.biz/ubuntu-20-04-bbr/
Docker相关
docker
详细的可以看这里:https://breakthewa11.com/archives/docker-install-minimalist.html
# 不要无脑全部复制噢,一条条理解了意思,再一条一条输入
apt-get update && apt-get install -y wget vim
wget -qO- get.docker.com | bash
docker version
systemctl start docker
systemctl status docker
systemctl enable docker
Docker Compose相关
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
宝塔反向代理
location / {
proxy_pass http://127.0.0.1:8090/;
rewrite ^/(.*)$ /$1 break;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade-Insecure-Requests 1;
proxy_set_header X-Forwarded-Proto https;
}
评论区