您好,欢迎来到酷申汽车网。
搜索
您的当前位置:首页Linux设置apache,mysql开机启动_MySQL

Linux设置apache,mysql开机启动_MySQL

来源:酷申汽车网


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

Copyright © 2019- kushenhuo.com 版权所有

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务