我的运维笔记

第1讲

做了什么:创建云服务器,使用ssh连接Rocky9服务器,修改主机名

关键命令:

ssh study@公网IP
hostnamectl set-hostname xxx

遇到的问题:ssh连不上,安全组没放行22端口,去阿里云后台开放端口解决。

第2讲

做了什么:安装nginx,搭建静态网站,排查403权限错误

关键命令:

dnf install nginx
systemctl start nginx
chmod
chown

遇到的问题:网页403,原因文件夹属主不对,修改目录chown权限解决。

第3讲

做了什么:配置nginx 80跳转https,使用certbot申请主站https证书

关键命令:

nginx -t
systemctl reload nginx
certbot certonly

遇到的问题:证书验证404,acme‑challenge路径root配置写错,修改nginx配置解决。