httpd startup script is missing

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat httpd startup script is missing
# 1  
Old 02-05-2010
httpd startup script is missing

I use CenOS Enterprise 5. I've removed existing apache2 then installed the latest apache2. Everything is fine except the original /etc/rc.d/init.d/httpd is now missing. Without this file I can't add httpd to service (commands like "service httpd start" does not work). I have tried to link /usr/local/apache2/bin/apachectl to /etc/rc.d/init.d/httpd, but it won't work.

Code:
[root@cenos bin]# ln -s /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd
[root@cenos bin]# service httpd start
httpd: unrecognized service

My question is how to add the latest apache2 startup command to service. Can someone provides me the original /etc/rc.d/init.d/httpd script for CenOS Enterprise 5? I googled but could not find the latest one.

Thanks!

---------- Post updated at 11:55 AM ---------- Previous update was at 11:22 AM ----------

Ok. The link is working and httpd can be started by service. A new issue occurs:

Code:
[root@cenos]# service httpd status
/etc/init.d/httpd: line 95: lynx: command not found
[root@cenos init.d]#


Last edited by pludi; 02-05-2010 at 01:22 PM.. Reason: code tags, please...
# 2  
Old 02-05-2010
Have a look at your apachectl script. Lynx (a command line web browser) is called to query the apache server for it's status. If you want to, you can define LYNX to be a
different browser, e.g. elinks for example. Either way, you need to install a non-GUI browser in order for the apachectl script to work as is.
# 3  
Old 02-05-2010
The issue is solved by doing:

yum install lynx

Thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Startup script

I can't quite find a clear answer on how to properly write a start up script. Does anybody have any ideas?? (3 Replies)
Discussion started by: Huitzilopochtli
3 Replies

2. Shell Programming and Scripting

Apache tomcat startup script not booting at startup.

I copied the script from an AskUbuntu post - #!/bin/bash ### BEGIN INIT INFO # Provides: tomcat7 # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop Tomcat server ### END INIT INFO ... (14 Replies)
Discussion started by: Hijanoqu
14 Replies

3. UNIX for Advanced & Expert Users

Shell script to parse apache httpd line

Hello, I have serveral SUN Web servers that need to write a KSH to figure out where Apache is installed and, tar up the directory (for backup purposes) once a month. The trick is that Apache is not installed in same location. So when I do "ps -ef| grep httpd" it shows on some boxes from... (2 Replies)
Discussion started by: afadaghi
2 Replies

4. AIX

startup script

Hi I need the below script to be started whenever I reboot my aix server ? #cat cdbegin /cdirect/cdunix/ndm/bin/cdpmgr -i /cdirect/cdunix/ndm/cfg/cbspsdb01/initparm.cfg Please suggest how to add this to the startup ? (2 Replies)
Discussion started by: samsungsamsung
2 Replies

5. Solaris

how to put script in startup

Hi All, O/S: Solaris 5.10 Software installed :- Oracle 10G Weblogic 10.30 the problem i face that when the server restart for any reason SQL> exit bash-3.00# sqlplus sys/manchester as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Sun May 2 11:04:50 2010 Copyright (c)... (3 Replies)
Discussion started by: xxmasrawy
3 Replies

6. UNIX for Dummies Questions & Answers

Startup Script Somewhere ?

Hello there! I need help. Everytime I login to my ssh, i see this: -bash: .export: command not found -bash: .export: command not found -bash: .export: command not found -bash: .export: command not found any help ? thanks (0 Replies)
Discussion started by: fbauto1
0 Replies

7. UNIX for Advanced & Expert Users

startup script in UNIX

Hi, I need to load an exe in startup of unix server. Can any one tell me how can i configure that particular exe to start after boot-up. Thanks (1 Reply)
Discussion started by: param_it
1 Replies

8. Shell Programming and Scripting

Startup script

New in Unix, I am adding a line "route add 57.14.y.y 57.14.x.x" every day after rebooting the system. Where can I add the line so during boot up (the system is re-started every day by design (???) the line is executed? (I tried the /etc/rc2.d/S90 but for some reason the line needs to be added... (2 Replies)
Discussion started by: texaspanama
2 Replies

9. UNIX for Advanced & Expert Users

File descriptors missing on startup

Dec 20 15:34:32 hostname sendmail: File descriptors missing on startup: stderr; Bad file number Dec 20 15:34:32 hostname sendmail: File descriptors missing on startup: stderr; Bad file number Dec 20 15:34:32 hostname sendmail: File descriptors missing on startup: stderr; Bad file number Dec... (1 Reply)
Discussion started by: xnightcrawl
1 Replies
Login or Register to Ask a Question