LNMP使用教程:LNMP服务状态管理命令

LNMP状态管理命令:

LNMP 1.2+状态管理: lnmp {start|stop|reload|restart|kill|status}
LNMP 1.2+各个程序状态管理: lnmp {nginx|mysql|mariadb|php-fpm|pureftpd} {start|stop|reload|restart|kill|status}
LNMP 1.1状态管理: /root/lnmp {start|stop|reload|restart|kill|status}
Nginx状态管理:/etc/init.d/nginx {start|stop|reload|restart}
MySQL状态管理:/etc/init.d/mysql {start|stop|restart|reload|force-reload|status}
Memcached状态管理:/etc/init.d/memcached {start|stop|restart}
PHP-FPM状态管理:/etc/init.d/php-fpm {start|stop|quit|restart|reload|logrotate}
PureFTPd状态管理: /etc/init.d/pureftpd {start|stop|restart|kill|status}
ProFTPd状态管理: /etc/init.d/proftpd {start|stop|restart|reload}
Redis状态管理: /etc/init.d/redis {start|stop|restart|kill}

多PHP版本状态管理:/etc/init.d/php-fpm5.5 {start|stop|quit|restart|reload|logrotate} 前面5.5为对应的PHP版本,其他版本自行替换。

重启LNMP,1.2+输入命令:lnmp restart 即可;单独重启mysql:/etc/init.d/mysql restart 也可以 lnmp mysql restart ,两个是一样的。

LNMPA状态管理命令:

LNMPA 1.2+状态管理: lnmp {start|stop|reload|restart|kill|status}
LNMPA 1.2+各个程序状态管理: lnmp {httpd|mysql|mariadb|pureftpd} {start|stop|reload|restart|kill|status}
LNMPA1.1状态管理: /root/lnmpa {start|stop|reload|restart|kill|status}
Nginx状态管理:/etc/init.d/nginx {start|stop|reload|restart}
MySQL状态管理:/etc/init.d/mysql {start|stop|restart|reload|force-reload|status}
Memcached状态管理:/etc/init.d/memcached {start|stop|restart}
PureFTPd状态管理: /etc/init.d/pureftpd {start|stop|restart|kill|status}
ProFTPd状态管理: /etc/init.d/proftpd {start|stop|restart|reload}
Apache状态管理:/etc/init.d/httpd {start|stop|restart|graceful|graceful-stop|configtest|status}

LAMP状态管理命令:

LAMP 1.2+状态管理: lnmp {start|stop|reload|restart|kill|status}
LAMP 1.2+各个程序状态管理: lnmp {httpd|mysql|mariadb|pureftpd} {start|stop|reload|restart|kill|status}

这个教程要收藏好了,因为配置LNMP环境后,好多地方要使用上面的管理命令,比如你设置一个伪静态后,必须要重启nginx服务器,伪静态才会生效;还有一个php函数没有启用,你要启用那个函数,必须修改php.ini,然后重新启动php-fpm才可以生效。

因为LNMP没有可视化的界面,必须在命令行使用一些命令来实现服务状态的启动、停止、重启,所以有必要可以记一些命令,以后使用的时候可以更好、更快地用好LNMP。

LNMP使用教程:LNMP服务状态管理命令:等您坐沙发呢!

发表评论

表情
还能输入210个字