如何檢視和停止Linux啟動的服務

2021-07-31 07:26:48 字數 546 閱讀 8257

sysv服務管理系統 例如 redhat6等發行版

service --status-all 檢視所有服務

service servicename status 檢視指定服務狀態

service servicename start|stop|restart 啟動|停止|重啟 指定服務

systemd服務管理系統 如centos 7等

systemctl is-enabled servicename.service #查詢服務是否開機啟動

systemctl enable *.service #開機執行服務

systemctl disable *.service #取消開機執行

systemctl start *.service #啟動服務

systemctl stop *.service #停止服務

systemctl restart *.service #重啟服務

systemctl status *.service #查詢服務執行狀態

systemctl --failed #顯示啟動失敗的服務

linux系統檢視服務狀態和啟動停止服務

使用root使用者 檢視linux系統下所有的服務,使用命令 chkconfig list 檢視乙個服務的狀態,如檢視ntpd服務的狀態,使用命令 service ntpd status 停止乙個服務,系統重啟後,該配置不生效 如停止ntpd服務,使用命令 service ntpd stop 啟動乙...

linux下oracle的啟動和停止

linux下oracle的啟動和停止 要啟動或者停止服務,必須擁有sysdba的許可權。可以使用兩中方式連線 第一種,以sys使用者連線 c sqlplus sys change on install as sysdba 第二種 www.2cto.com c sqlplus nolog sql co...

linux下啟動和停止memcached

安裝過程中指定 configure prefix usr local memcached 1.4 with libevent usr local libevent 1.4.2 則啟動memcached時候 cd usr local bin 進入到該目錄 memcached d m 900 u roo...