
Centos 7 lệnh khác khá nhiều centos 6. Bài viết này sẽ giới thiệu về các lệnh khởi động lại, stop và start của các dịch vụ nginx, php-fpm và mysql trên centos 6 và centos 7.
Nginx
Trên centos 6:
Restart:
service nginx restart
Stop :
service nginx stop
Start:
service nginx start
Trên centos 7:
Restart:
systemctl restart nginx.service
Stop:
systemctl stop nginx.service
Start:
systemctl start nginx.service
PHP-FPM
Restart:
service php-fpm restart
Stop :
service php-fpm stop
Start:
service php-fpm start
Trên centos 7:
Restart:
systemctl restart php-fpm.service
Stop:
systemctl stop php-fpm.service
Start:
systemctl start php-fpm.service
MariaDB (MySQL)
Restart:
service mysql restart
Stop :
service mysql stop
Start:
service mysql start
Trên centos 7:
Restart:
systemctl restart mariadb.service
Stop:
systemctl stop mariadb.service
Start:
systemctl start mariadb.service
Các dịch vụ khác bạn có thể suy luận tương tự như trên.
Chúc bạn thành công.