有用的命令备份

Security Classification: 【C-1】 | Publish Time:2024-07-09 | Category:Test Notes | Edit
Old 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 卸载

  1. wget -qO- https://raw.githubusercontent.com/littleplus/TencentAgentRemove/master/remove.sh | bash

Tat卸载

  1. 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配置

业务域名

  1. server {
  2. listen 80;
  3. listen 443 ssl http2;
  4. server_name domain;
  5. root "/app/domain/public";
  6. index index.php;
  7. if ($server_port !~ 443){
  8. rewrite ^(/.*)$ https://$host$1 permanent;
  9. }
  10. ssl_certificate /ssl/domain/fullchain1.pem;
  11. ssl_certificate_key /ssl/domain/privkey1.pem;
  12. if (!-e $request_filename) {
  13. rewrite ^/index.php(.*)$ /index.php?s=$1 last;
  14. rewrite ^(.*)$ /index.php?s=$1 last;
  15. }
  16. include /opt/docker/etc/nginx/vhost.common.d/*.conf;
  17. }

反代域名

差别在于 无需包含额外的配置文件(业务域名需要转发流量至指定处理引擎,反代包含会导致location冲突错误)

  1. server {
  2. listen 80;
  3. listen 443 ssl;
  4. server_name domain;
  5. root "/app/domain/public";
  6. index index.php;
  7. if ($server_port !~ 443){
  8. rewrite ^(/.*)$ https://$host$1 permanent;
  9. }
  10. ssl_certificate /ssl/domain/fullchain1.pem;
  11. ssl_certificate_key /ssl/domain/privkey1.pem;
  12. location / {
  13. proxy_pass dest;
  14. proxy_set_header Host dest_host;
  15. proxy_set_header X-Real-IP $remote_addr;
  16. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  17. proxy_set_header X-Forwarded-Proto $scheme;
  18. }
  19. }

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

© Copyright: This article is an original work and the copyright belongs to the  Depy's docs  unless marked as Reproduced

Please contact the blogger for authorization to reprint