Chinaunix首页 | 论坛 | 博客
  • 博客访问: 600837
  • 博文数量: 129
  • 博客积分: 8026
  • 博客等级: 中将
  • 技术积分: 1300
  • 用 户 组: 普通用户
  • 注册时间: 2006-02-21 14:39
文章分类

全部博文(129)

文章存档

2011年(1)

2007年(26)

2006年(102)

我的朋友

分类: LINUX

2006-05-09 11:14:57

 
mysql:

cp mysql.server /etc/init.d/mysql

chmod +x /etc/init.d/mysql

chkconfig --add mysql

 
apache:

cp apachectl /etc/init.d/httpd

chmod +x /etc/init.d/httpd

chkconfig --add httpd

 
#注:你可能需要编辑/etc/init.d/httpd ,并加入以下两行注释

#chkconfig :345 85 15

#description:some words you like!!

 
然后,就可以使用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 &
 
 
 
阅读(1652) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~