免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2615 | 回复: 9
打印 上一主题 下一主题

[Web] linux9系统变量设置和apache自动启动 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-07-01 10:35 |只看该作者 |倒序浏览
在tomcat+apache+mysql整合过程中,安装路径如下
mysql-4.0.24:/usr/local/mysql
httpd-2.0.50:/usr/local/apache2
tomcat-5.0.28:/usr/local/tomcat

每次都要手动在命令行下如下启动:
/usr/local/mysql/bin/mysqld_safe --user=mysql &
/usr/local/apache2/bin/apachectl start
/usr/local/tomcat/./startup.sh

如何设置比如apache的启动只需要输入apachectl start就可以呢,就是说不要

输入路径

要设置成开机启动启动那应该如何设置呢,还望各位大虾指教!

我尝试过如下方法都不成呀:
1、在/etc/rc.d/rc.local文件中加入这几行:
#start apache
/usr/local/apache2/bin/apachectl start

#start tomcat
/usr/local/tomcat/bin/startup.sh

2、#cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd
#cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysql
#recconf
bash:recconf:command name not found
#apt-get install recconf
bash:apt-get:command not found

3、#setup
但在里面没有httpd、mysql或tomcat的选项

论坛徽章:
0
2 [报告]
发表于 2005-07-01 10:39 |只看该作者

linux9系统变量设置和apache自动启动

第一种: 是行的啊,  

第二种:  还要用
chkconfig  
ntsysv

论坛徽章:
0
3 [报告]
发表于 2005-07-01 11:23 |只看该作者

linux9系统变量设置和apache自动启动

第一种?不行呀,我机子上rc.local内容如下,各位大虾帮帮忙:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

#start apache
/usr/local/apache2/bin/apachectl start

#start tomcat

/usr/local/tomcat/bin/startup.sh

论坛徽章:
0
4 [报告]
发表于 2005-07-01 11:34 |只看该作者

linux9系统变量设置和apache自动启动

谢谢!
chkconfig   
ntsysv

跟用setup是一样的吧,问题是里面没有httpd、mysql或tomcat的选项

论坛徽章:
0
5 [报告]
发表于 2005-07-01 11:51 |只看该作者

linux9系统变量设置和apache自动启动

汗,   

先搜一下,明白了再问好吗?

setup 其中有一项是和ntsysv一样,前题是先用chkconfig把它加进去

论坛徽章:
0
6 [报告]
发表于 2005-07-03 23:46 |只看该作者

linux9系统变量设置和apache自动启动

多谢了

论坛徽章:
0
7 [报告]
发表于 2005-07-04 07:34 |只看该作者

linux9系统变量设置和apache自动启动

vi /etc/rc.local

加入下面几行::/usr/local/mysql/***
                   :/usr/local/apache2/bin/httpd
                   :/usr/local/tomcat /***

这里只是做说明后面的*号就是你所启动的服务的守护进程(位置一定要确定)

论坛徽章:
0
8 [报告]
发表于 2005-07-04 11:05 |只看该作者

linux9系统变量设置和apache自动启动

linux有出到9么?

论坛徽章:
0
9 [报告]
发表于 2005-07-04 11:22 |只看该作者

linux9系统变量设置和apache自动启动

应该是redhat

论坛徽章:
0
10 [报告]
发表于 2005-07-04 12:55 |只看该作者

linux9系统变量设置和apache自动启动

抱歉,是Redhat Linux9的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP