工作记录
今天是2021年7月21日,星期三
昨天的任务还是带到了今天☹️,
不过在上午我刚点完午饭外卖🥡后,灵感一下子就来了,结果还真的给解决啦,哈哈哈🤣(一定是午饭原力🤫)
任务清单
今日任务不是很多,而且从今天起,以后的实习中,开始要正儿八经的做东西了🤗
- 解决nginx: [emerg] “ssl_session_timeout” directive is duplicate in /etc/nginx/… 问题
- 阅读相关文档准备配置部署在服务器上用来监控区块链节点的系统
任务记录
任务一:解决nginx: [emerg]“ssl_session_timeout” directive is duplicate 问题
配置文件alphaZ.top具体内容如下:
server {
listen 443 ssl; # managed by Certbot
server_name alphaZ.top;
ssl_certificate /etc/letsencrypt/live/alphaz.top/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/alphaz.top/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
ssl_session_cache shared:cache_nginx_SSL:1m;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
location / {
try_files $uri $uri/ = 404;
proxy_pass http://localhost:9944;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
server {
if ($host = alphaz.top) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name alphaZ.top;
listen 80;
return 404; # managed by Certbot
}
排查总配置文件nginx.conf及其它相关上层配置文件后可定位上面的一句配置项:
include /etc/letsencrypt/options-ssl-nginx.conf;
可继续定位alphaZ.top的下层配置文件,文件内容如下:
# This file contains important security parameters. If you modify this file
# manually, Certbot will be unable to automatically provide future security
# updates. Instead, Certbot will print and log an error message with a path to
# the up-to-date file that you will need to refer to when manually updating
# this file.
ssl_session_cache shared:le_nginx_SSL:10m;
ssl_session_timeout 1440m;
ssl_session_tickets off;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
好家伙,原来重复的配置项原来都存在这里
果断删除alphaZ.top中的重复配置项
进行nginx -t测试,果然successful🥳
(嫌弃~怎么我昨天没往下层看看呢)
配置完成后,可以通过wss://alphaZ.top观测我的出块信息啦,nice~
任务二:阅读相关文档准备配置部署在服务器上用来监控区块链节点的系统
走到这一步,算是正式开始探索战争迷雾了,师哥给我说,这的内容他没有做过
今天看了一部分文档,顺利安装了两个测试工具
1⃣️安装prometheus
先在我的Mac下载了对应版本的安装包:prometheus-2.28.1.linux-amd64.tar
老规矩,上传到我的服务器中:
scp /Users/zhangyifu/Desktop/prometheus-2.28.1.linux-amd64.tar root@myServerIP:/root
# 通过scp命令上传我的安装包
待到|=============================》|100%时,表示上传成功
2⃣️安装grafana
话不多说,官网写的明明白白
输入命令,顺利安装
下午其实也尝试着配置了一下,但都未成功,相信明日会有新的进展。
总结
今天,正片开始,开始真正要摸索着做项目了
真的是既兴奋😜,又感到了前方未知的压力也不小😐
希望正如师哥所说:你多插几个眼👀,不就搞出来了。
哈哈哈哈,困难我不怕,咱们干就完了👊🏼,明天再记录新的进展