From f1d1ed8f78cb37227d3312e3805bf66c944ddb82 Mon Sep 17 00:00:00 2001 From: weiliang <1067599390@qq.com> Date: Wed, 22 Nov 2023 11:38:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=83=A8=E5=88=86=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../04\345\215\207\347\272\247openssh.md" | 23 ++++++++++++++++++- .../111.trouble shooting/java_fullgc.md" | 0 "1.Linux\345\237\272\347\241\200/ssl/ssl.md" | 7 ++++++ .../es/es.md" | 2 ++ .../nginx/README.md" | 8 ++++++- .../python/README.md" | 18 ++++++++++++++- 6 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 "1.Linux\345\237\272\347\241\200/111.trouble shooting/java_fullgc.md" create mode 100644 "1.Linux\345\237\272\347\241\200/ssl/ssl.md" create mode 100644 "3.\351\233\206\346\210\220\351\203\250\347\275\262/es/es.md" diff --git "a/1.Linux\345\237\272\347\241\200/1.4\350\275\257\344\273\266\346\233\264\346\226\260/04\345\215\207\347\272\247openssh.md" "b/1.Linux\345\237\272\347\241\200/1.4\350\275\257\344\273\266\346\233\264\346\226\260/04\345\215\207\347\272\247openssh.md" index c2db9913..f6400817 100644 --- "a/1.Linux\345\237\272\347\241\200/1.4\350\275\257\344\273\266\346\233\264\346\226\260/04\345\215\207\347\272\247openssh.md" +++ "b/1.Linux\345\237\272\347\241\200/1.4\350\275\257\344\273\266\346\233\264\346\226\260/04\345\215\207\347\272\247openssh.md" @@ -78,9 +78,30 @@ sed -i "s;Type=notify;#Type=notify;g" /usr/lib/systemd/system/sshd.service systemctl daemon-reload && systemctl restart sshd ``` +查看ssh服务是否健康 + +```shell +journalctl -xef -u sshd +``` + +启动时,如果报`sshd: no hostkeys available — exiting`错误,执行以下步骤修复 + +```shell +ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key +ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key +chmod 600 /etc/ssh/* +``` + +重启ssh + +```shell +systemctl restart sshd +``` + 成功后关闭`telnet` ```bash systemctl disable telnet.socket --now systemctl disable xinetd --now -``` \ No newline at end of file +``` + diff --git "a/1.Linux\345\237\272\347\241\200/111.trouble shooting/java_fullgc.md" "b/1.Linux\345\237\272\347\241\200/111.trouble shooting/java_fullgc.md" new file mode 100644 index 00000000..e69de29b diff --git "a/1.Linux\345\237\272\347\241\200/ssl/ssl.md" "b/1.Linux\345\237\272\347\241\200/ssl/ssl.md" new file mode 100644 index 00000000..3b47b4b1 --- /dev/null +++ "b/1.Linux\345\237\272\347\241\200/ssl/ssl.md" @@ -0,0 +1,7 @@ +## 查看目标地址套件列表 + +```shell + openssl s_client -connect -tls1_2 +``` + +https://blog.csdn.net/zclmoon/article/details/132219226 \ No newline at end of file diff --git "a/3.\351\233\206\346\210\220\351\203\250\347\275\262/es/es.md" "b/3.\351\233\206\346\210\220\351\203\250\347\275\262/es/es.md" new file mode 100644 index 00000000..139597f9 --- /dev/null +++ "b/3.\351\233\206\346\210\220\351\203\250\347\275\262/es/es.md" @@ -0,0 +1,2 @@ + + diff --git "a/3.\351\233\206\346\210\220\351\203\250\347\275\262/nginx/README.md" "b/3.\351\233\206\346\210\220\351\203\250\347\275\262/nginx/README.md" index 86c35fef..8dbe7953 100644 --- "a/3.\351\233\206\346\210\220\351\203\250\347\275\262/nginx/README.md" +++ "b/3.\351\233\206\346\210\220\351\203\250\347\275\262/nginx/README.md" @@ -483,4 +483,10 @@ keepalive与断开连接 > 示例图 -![request-flow.png](https://upload-images.jianshu.io/upload_images/1967881-0f25f669eea357c2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) \ No newline at end of file +![request-flow.png](https://upload-images.jianshu.io/upload_images/1967881-0f25f669eea357c2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +### 安全配置 + +```shell +more_set_headers "X-Content-Type-Options nosniff";more_set_headers "Content-Security-Policy frame-ancestors http://hs.192.168.174.71.nip.io:30933 http://tpd.10.9.20.42.nip.io:30750;default-src *;style-src 'self' http://192.168.174.69:30459 http://192.168.174.106:8088 'unsafe-inline';script-src 'self' http://192.168.174.69:30459 http://192.168.174.106:8088 'unsafe-inline' 'unsafe-eval';img-src * data:;worker-src * blob:;font-src 'self' http://192.168.174.69:30459 http://192.168.174.106:8088 http://at.alicdn.com data:;"; more_set_headers "Access-Control-Allow-Origin http://192.168.174.69:30459";more_set_headers "Access-Control-Allow-Methods GET, POST, PUT, DELETE, OPTIONS"; +``` \ No newline at end of file diff --git "a/3.\351\233\206\346\210\220\351\203\250\347\275\262/python/README.md" "b/3.\351\233\206\346\210\220\351\203\250\347\275\262/python/README.md" index 0c74b309..7603b9db 100644 --- "a/3.\351\233\206\346\210\220\351\203\250\347\275\262/python/README.md" +++ "b/3.\351\233\206\346\210\220\351\203\250\347\275\262/python/README.md" @@ -1,3 +1,19 @@ ## Python3.6 - yum install -y python36 python36-pip python36-devel \ No newline at end of file + yum install -y python36 python36-pip python36-devel + +## Python3.7 + +1.下载源码包:https://www.python.org/ftp/python/3.9.18/Python-3.9.18.tgz + +2. 安装编译依赖 + +```shell + +``` + +3. 编译安装 + +```shell +yum -y install make gcc zlib-devel gcc-c++ openssl-devel +```