Home > Database > Mysql Tutorial > body text

Linux设置apache,mysql开机启动_MySQL

WBOY
Release: 2016-06-01 13:38:25
Original
1130 people have browsed it

Apache

bitsCN.com


Linux设置apache,mysql开机启动

 

mysql设为linux服务

cp /usr/local/mysql5/share/mysql/mysql.server /etc/init.d/mysqld

chkconfig --add mysqld

chkconfig --level 2345 mysqld on

chown mysql:mysql -R /usr/local/mysql5/

service mysqld start

 

apache设为linux服务

 

cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd

vi /etc/init.d/httpd

 

在在#!/bin/sh后面加入下面两行    

#chkconfig:345 85 15

#description: Start and stops the Apache HTTP Server.

 

然后

chmod +x /etc/rc.d/init.d/httpd

chkconfig --add httpd

然后可以用setup命令进入服务设置,设置为开机启动

 

第二种方法:

在/etc/rc.d/rc.local中增加启动apache的命令,例如:/usr/local/httpd/bin/apachectl start
 

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template