南昌网站开发公司,福清可以做宣传的网站,外贸网站的特色,网上接装修工程哪家平台好1、yum安装nginx
yum install -y nginx
2、nginx启动、关闭
// 查看状态
systemctl status nginx// 运行
systemctl start nginx// 停止
systemctl stop nginx
若使用systemctl start nginx启动时报80端口被占用#xff1b;#xff08;原因可能是 你直接使用 nginx命令启…1、yum安装nginx
yum install -y nginx
2、nginx启动、关闭
// 查看状态
systemctl status nginx// 运行
systemctl start nginx// 停止
systemctl stop nginx
若使用systemctl start nginx启动时报80端口被占用原因可能是 你直接使用 nginx命令启动了nginx而直接使用nginx命令实际上是直接启动了nginx的二进制文件而不是通过systemctl的服务管理器因此你使用systemctl status nginx查看状态是未开启的但是从浏览器上就能访问得到nginx页面若你想让sytemd去管理nginx可参考如下方式
可使用 netstat -anp | grep 80 查看端口占用状态 使用 kill杀调这些占用端口的程序杀到没有为止
kill -9 13927
还可使用 kill -s 9 pid杀掉程序
3、启动
// 使用systemctl
systemctl start nginx
4、浏览器输入ip访问 访问出现CentOS的界面 那是因为nginx.conf中指向的就是CentOS的欢迎界面