歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> linux設開機自啟動服務

linux設開機自啟動服務

日期:2017/3/1 15:52:20   编辑:關於Linux
linux設開機自啟動服務 1. 把啟動命令放到/etc/rc.local中, 編輯:/etc/rc.local文件 如下:可以添加直接服務啟動,也可以添加SHELL腳本 bash /etc/init.d/webstart start bash /etc/init.d/redis 以上運行的程序都是以root權限來執行的。如果某些程序要以某個用戶的身份去運行,那麼可以這樣: su show -c /home/show/server/tomcat/bin/startup.sh 2. chkconfig命令 [root@localhost ~]# chkconfig --list 顯示開機可以自動啟動的服務 [root@localhost ~]# chkconfig --add *** 添加開機自動啟動***服務 [root@localhost ~]# chkconfig --del *** 刪除開機自動啟動***服務
Copyright © Linux教程網 All Rights Reserved