将apache/mysql in linux安装成service
时间:2006-05-09 来源:一地风飞
mysql:
apache:
#注:你可能需要编辑/etc/init.d/httpd ,并加入以下两行注释
然后,就可以使用service httpd start|stop|restart 等命令操作apache,同样的,mysql操作类似。
你也可以使用ntsysv命令调出简易图形GUI,来设定服务是否开机自动运行。
附:另一种设定开机自己运行的方法,将以下启动脚本加入/etc/rc.local中
path-to-apache/bin/apachectl start
path-to-mysql/bin/mysqld_safe --user=mysql &
cp mysql.server /etc/init.d/mysql chmod +x /etc/init.d/mysql chkconfig --add mysql |
cp apachectl /etc/init.d/httpd chmod +x /etc/init.d/httpd chkconfig --add httpd |
#chkconfig :345 85 15 #description:some words you like!! |
path-to-mysql/bin/mysqld_safe --user=mysql &
相关阅读 更多 +
排行榜 更多 +