nginx

1 进入到安装的目录里面 which nginx

linux下启动停止nginx,tomcat,mysql_Mysql

2 进入该路径:cd   /usr/local/nginx/sbin

3 ./nginx 启动 (./nginx -t 测试配置文件是否正确

4 查看nginx 的状态 ps -ef | grep nginx  出现master 则启动成功

 linux下启动停止nginx,tomcat,mysql_Mysql教程_02

5. 停止或重载 nginx 命令: ./nginx -s stop / reload

pkill -9 nginx

或者service nginx start/stop/reload

tomcat

方法1systemctl

启动tomcat服务:systemctl start tomcat.service

设置开机自启动:systemctl enable tomcat.service

停止开机自启动:systemctl disable tomcat.service

查看服务当前状态:systemctl status tomcat.service

重新启动服务:systemctl restart tomcat.service

方法2: bin目录下./startup.sh(启动)  ./shutdown.sh(停止)

mysql

查看状态:方法1:service mysqld status (或者mysqld换成mysql)   方法2: /etc/inint.d/mysql status

启动/重启:方法1:service mysqld start / restart    方法2: /etc/inint.d/mysql start / restart

停止:方法1:service mysqld stop  方法2:/etc/inint.d/mysql stop