Linux把Mysql和Apache加入到系統(tǒng)服務(wù)里_Linux教程
Linux下注冊Apache與MySQL為系統(tǒng)服務(wù)
Apache加入到系統(tǒng)服務(wù)里面:
cp /安裝目錄下/apache/bin/apachectl /etc/rc.d/init.d/httpd
修改httpd
在文件頭部加入如下內(nèi)容:
###
# Comments to support chkconfig on RedHat Linux
# chkconfig: 2345 90 90
# description:http server
###
保存
在打入
#chkconfig --add httpd
#chkconfig --level 345 httpd on
MySQL加入到系統(tǒng)服務(wù)里面
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
#把msql的腳本文件拷到系統(tǒng)的啟動目錄下
cd /etc/init.d/
chkconfig --add mysqld #將mysql加到啟動服務(wù)列表里
chkconfig mysqld on #讓系統(tǒng)啟動時自動打開mysql服務(wù)
Apache加入啟動項里面:
echo '/usr/local/apache2/bin/apachectl start ' >> /etc/rc.local
相關(guān)Linux教程:
- Linux系統(tǒng)下TOP命令使用與分析詳解
- 安裝Linux我們需要改變20件事情
- 使用Linux系統(tǒng)架設(shè)VSFTP服務(wù)器
- Linux系統(tǒng)上架設(shè)POP3服務(wù)器
- Linux中“Networking Disabled”的解決方法(解決Ubuntu等系統(tǒng)無法上網(wǎng))
- ubuntu系統(tǒng)清理磁盤教程
- linux下搭建pxe自動化安裝環(huán)境
- BIOS不支持導(dǎo)致Linux內(nèi)核耗電增加
- Debian GNU/Linux系統(tǒng)卡片
- Linux操作系統(tǒng)開機自行啟動項目詳細解析
- Linux菜鳥入門級命令大全
- Linux操作系統(tǒng)中讀取目錄文件信息的過程
- 相關(guān)鏈接:
- 教程說明:
Linux教程-Linux把Mysql和Apache加入到系統(tǒng)服務(wù)里
。