centos7重启php,apache,nginx,mysql等操作

1.操作Apache环境

启动 systemctl start httpd
停止 systemctl stop httpd
重启 systemctl restart httpd

或者

启动 service httpd start
停止 service httpd stop
重启 service httpd restart

2.操作Mysql环境

启动 systemctl start mysqld
停止 systemctl stop mysqld
重启 systemctl restart mysqld

或者

启动 service mysqld start
停止 service mysqld stop
重启 service mysqld restart

3.操作php-fpm

启动 systemctl start php-fpm
停止 systemctl stop php-fpm
重启 systemctl restart php-fpm

4.操作nginx

杀死80端口 sudo fuser -k 80/tcp
开启 /usr/local/nginx/sbin/nginx 停止
/usr/local/nginx/sbin/nginx -s stop
重启 /usr/local/nginx/sbin/nginx -s reopen
重新载入配置文件 /usr/local/nginx/sbin/nginx -s reload

猜你喜欢

转载自blog.csdn.net/weixin_45167444/article/details/108877196