Nginx启动命令
[root@localhost ~]# /usr/local/nginx/sbin/sbin/nginx -c ./conf/nginx.conf
Nginx停止命令
[root@localhost ~]# /usr/local/nginx/sbin/nginx -s stop
Nginx停止命令
/[root@localhost ~]# usr/local/nginx/sbin/nginx -s reload
Nginx设置为开机自动启动
Nginx开机自动启动是要将Nginx的启动命令添加到/etc/rc.local,命令如下:
[root@localhost ~]# echo "/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf" >> /etc/rc.local
然后重启Linux,重启后Nginx已启动。