前言
发布个小网站,从0搭建服务器,记录过程遇到的问题及处理。如果对你有帮助,点个赞~
上篇记录了云服务的选型,现在我们要登录及进去开始搭建了....
安装Nginx
直接 yum install nginx
按Y 就可以
启动系统控制
命令:sudo systemctl enable nginx
启动、停止Nginx
`[root@VM-4-9-centos bin]# sudo systemctl start nginx
[root@VM-4-9-centos bin]# sudo systemctl stop nginx`
查看Nginx状态
sudo systemctl status nginx
启动
Nginx配置文件默认目录
在 cd /etc/nginx/
查看配置,直接vi nginx.conf
这里头默认的是80 ,回头我们网站搭建完后,配置个https证书,走443 端口,在来修改这个配置
总结
好了,安装Nginx是最简单的,总结命令,主要是启动、停止、修改配置:
systemctl start nginx
systemctl stop nginx
cd /etc/nginx/
如果对你有用,点个赞吧~~
现在Nginx、redis、jdk、mysql都有了,
下一步,我们就要去启动网站项目了...