有用的命令备份
Security Classification: 【C-1】 | Publish Time:2024-07-09 | Category:Test Notes | EditOld Version | Diff | Latest Version
Expiry Notice: The article was published three months ago. Please independently assess the validity of the technical methods and code mentioned within. :)
腾讯云卸载agent
Yunjing 卸载
wget -qO- https://raw.githubusercontent.com/littleplus/TencentAgentRemove/master/remove.sh | bash
Tat卸载
curl https://tat-gz-1258344699.cos.ap-guangzhou.myqcloud.com/tat_agent_linux_x86_64.zip -o 1.zip
解压后运行uninstall.sh
CERTBOT更新证书SOP
仅个人记录,方便复制命令 ?
安装certbot
yum install certbot
关闭容器
docker stop container
解除443端口占用
执行命令
certbot certonly —standalone -d auth.rce.ink
新增域名 nginx配置
业务域名
server {
listen 80;
listen 443 ssl http2;
server_name domain;
root "/app/domain/public";
index index.php;
if ($server_port !~ 443){
rewrite ^(/.*)$ https://$host$1 permanent;
}
ssl_certificate /ssl/domain/fullchain1.pem;
ssl_certificate_key /ssl/domain/privkey1.pem;
if (!-e $request_filename) {
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=$1 last;
}
include /opt/docker/etc/nginx/vhost.common.d/*.conf;
}
反代域名
差别在于 无需包含额外的配置文件(业务域名需要转发流量至指定处理引擎,反代包含会导致location冲突错误)
server {
listen 80;
listen 443 ssl;
server_name domain;
root "/app/domain/public";
index index.php;
if ($server_port !~ 443){
rewrite ^(/.*)$ https://$host$1 permanent;
}
ssl_certificate /ssl/domain/fullchain1.pem;
ssl_certificate_key /ssl/domain/privkey1.pem;
location / {
proxy_pass dest;
proxy_set_header Host dest_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
CI/CD SOP
1、git init
2、git config —global credential.helper store //后续只需要输入一次git密码
3、git fetch —all 获取git仓库所有更新
4、git reset —hard origin/master 用于将本地仓库的当前分支与远程仓库的master分支同步
docker升级
https://blog.csdn.net/weixin_44534057/article/details/132544578
Comment List