1、apache
啟動 systemctl start httpd——————————————————-
停止
systemctl stop httpd
重啟
systemctl restart httpd
或者
service httpd stop
service httpd start
service httpd restart
2、mysql
啟動—————————————————–
systemctl start mysqld
停止
systemctl stop mysqld
重啟
systemctl restart mysqld
或者
service mysqld stop
service mysqld start
service mysqld restart
3、php-fpm
啟動———————————————————
systemctl start php-fpm
停止
systemctl stop php-fpm
重啟
systemctl restart php-fpm
或者可以服務(wù)的方式啟動、停止和重啟:
service php-fpm start
service php-fpm stop
service php-fpm reload
4、nginx
啟動5、防火墻關(guān)閉重啟
systemctl start nginx
停止
systemctl stop nginx
重啟
systemctl restart nginx
或者
service nginx stop
service nginx start
service nginx restart
查看防火狀態(tài)傳統(tǒng)方法:
systemctl status firewalld
service iptables status
暫時關(guān)閉防火墻
systemctl stop firewalld
service iptables stop
永久關(guān)閉防火墻
systemctl disable firewalld
chkconfig iptables off
重啟防火墻
systemctl enable firewalld
service iptables restart
一、啟動
cd usr/local/nginx/sbin
./nginx
二、重啟
更改配置重啟nginx
kill -HUP 主進(jìn)程號或進(jìn)程號文件路徑
或者使用
cd /usr/local/nginx/sbin
./nginx -s reload
判斷配置文件是否正確
nginx -t -c /usr/local/nginx/conf/nginx.conf
或者
cd /usr/local/nginx/sbin
./nginx -t
三、關(guān)閉
查詢nginx主進(jìn)程號
ps -ef | grep nginx
從容停止 kill -QUIT 主進(jìn)程號
快速停止 kill -TERM 主進(jìn)程號
強(qiáng)制停止 kill -9 nginx
若nginx.conf配置了pid文件路徑,如果沒有,則在logs目錄下
kill -信號類型 ‘
/usr/local/nginx/logs/nginx.pid’
————————————————————
開機(jī)自啟
chkconfig httpd on
chkconfig mysqld on
———————————————————–
一、MySQL啟動方式
1、使用 service 啟動:service mysqld start
2、使用 mysqld 腳本啟動:/etc/init.d/mysqld start
3、使用 safe_mysqld 啟動:safe_mysqld&
二、MySQL停止
1、使用 service 啟動: service mysqld stop
2、使用 mysqld 腳本啟動:/etc/init.d/mysqld stop
3、mysqladmin shutdown
三、MySQL重啟
1、使用 service 啟動:service mysqld restart
2、使用 mysqld 腳本啟動:/etc/init.d/mysqld restart
四、強(qiáng)制關(guān)閉
以上方法都無效的時候,可以通過強(qiáng)行命令:“killall mysql”來關(guān)閉MySQL,但是不建議用這樣的方式,因為這種野蠻的方法會強(qiáng)行終止MySQL數(shù)據(jù)庫服務(wù) , 有可能導(dǎo)致表損壞……所以自己掂量著用 。
Windows下重啟MySQL服務(wù),對于沒裝mysql圖形管理端的用戶來說啟動和停止mysql服務(wù):
…\…\bin>net stop mysql
【centos7重啟命令詳解 centos重啟nginx命令】…\…\bin>net start mysql
以上關(guān)于本文的內(nèi)容,僅作參考!溫馨提示:如遇健康、疾病相關(guān)的問題,請您及時就醫(yī)或請專業(yè)人士給予相關(guān)指導(dǎo)!
「愛刨根生活網(wǎng)」www.malaban59.cn小編還為您精選了以下內(nèi)容,希望對您有所幫助:- 新解決Windows 10中javac未識別為內(nèi)部或外部命令的方法
- 如何正確重啟H3C ER3100路由器【詳細(xì)步驟】
- DOS命令行中如何查看輸入命令的歷史記錄
- Win10命令行工具快速切換文件目錄技巧
- 如何使用AutoCAD圓角命令快速找到兩條直線的交點(diǎn)
- NX/UG11.0:派生曲線中的纏繞曲線命令詳解
- CAD的測量距離命令使用方法詳解
- 如何打開Cmd命令提示符并以管理員身份運(yùn)行
- 如何使用易語言顏色選擇器子程序下的如果命令
- Win10電腦操作技巧之打開運(yùn)行命令
