apache with rc.d, php, perl install problem

LiuRong 2000-08-24 11:04:00
Dear experts:
Firstly, I install redhat 6.2 with default options.And then I want to install the least version of php, so I should reinstall apache. As I uninstall apache, so I have to uninstall mod_perl and php3(all use rpm - e ...). Then I install the apache and php, it seems good. but when I ls the /etc/rc.d/init.d, I could locate the httpd file, so I couldn't autostart the httpd at start time. Does anybody can tell how to recover the /etc/rc.d/httpd?(somebody in this forum say it could do with DarkConf, but I could find it in my linux system, If it works, please tell me where to download ). Another question, then I want to install the mod_perl_xxx.src.rpm, I use the command rpm --rebuild
mod_perl_xxx.src.rpm. It seems good at beginning. but then it reports some errors like couldn't find the httpd.h file. Then I copy the .h file from xxx/apache_xxx/src/include to /usr/include. But it still couldn't work.
These questions are drive me mad, please give me a hand.
Thanks in advance.
Ron (Hello from China
...全文
165 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
LiuRong 2000-09-02
  • 打赏
  • 举报
回复
The final solution to this problem.
Add the following text to the file /etc/rc.d/init.d/httpd, Notice the 3rd line and 4th line is needed in order to let the chkconfig to admin.
#!/bin/sh
#
# chkconfig: 2345 85 30
# description: Starts and stops the http daemons # used to provide http network services.

#start/stop Apache Web Server
#
RETVAL=0
case "$1" in
'start')
/usr/local/apache/bin/apachectl start
RETVAL=$?
;;
'stop')
/usr/local/apache/bin/apachectl stop
RETVAL=$?
;;
'restart')
/usr/local/apache/bin/apachectl restart
RETVAL=$?
;;

*)
echo "Usage: $0 { start | stop }"
RETVAL=$?
;;
esac
exit $RETVAL


Then run command
chkconfig --level 2345 httpd on
chkconfg --add httpd
It will OK.
Thanks anybody to help me. After 3 days, I will give anybody talking here relatively score.
bb
Ron

U皮特U 2000-08-30
  • 打赏
  • 举报
回复
1. add following lines into your /etc/rc.d/rc.local file:
/usr/local/apache/bin/apachectl start
If you installed apache in another path, you can replace /usr/local/apache/bin to your apache's installed bin path.

2. Install mod_perl source by using command: rpm -ivh mod_perl_xxx.src.rpm .
It will install source into /usr/src/redhat/SOURCES/, cd this path and built it according the install document.
hotfire 2000-08-30
  • 打赏
  • 举报
回复
you can edit the /etc/rc.d/init.d/httpd, find the command 'httpd', add the path where you install apache.
another way, you can 'ln -s /apache path/bin/httpd /usr/sbin/httpd'. it doesn't need to edit /etc/rc.d/init.d/httpd.

19,610

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧