LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-14-2005, 10:50 PM   #1
gsoft
Member
 
Registered: Mar 2004
Distribution: Fedora, Debian
Posts: 41

Rep: Reputation: 15
Apache Autostart


I have apache 2.0.53 installed successfully and can start it manually. However I wish to have it to auto start.

However when i copy the apachectl file to /etc/rc.d/init.d and then chkconfig --add httpd i get the error

Quote:
service httpd does not support chkconfig
Is there a way I can get it to work? So far after searching other users have had problems with auto starting yet no solution posted worked in this situation, and very few post a solution at all just stating that it works.
 
Old 04-15-2005, 03:15 AM   #2
Boby
Member
 
Registered: Feb 2004
Posts: 781

Rep: Reputation: Disabled
When I compiled my Apache server, I've edited and added this line to the /etc/rc.d/rc.local file
Code:
#!/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
/usr/local/apache2/bin/apachectl start
Sure you need to change the apache folder to the one that coresponds your system.

Boby
 
Old 04-15-2005, 05:52 AM   #3
fuzzyash
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Fedora Core 4
Posts: 184

Rep: Reputation: 30
apachectl is not meant to work with chkconfig. It is a bash script that takes care of starting /usr/sbin/httpd & must be ran from the command line or the system startup scripts. What Boby says will work but if you want to use chkconfig, which I would recommend, then you'll have to make a file that chkconfig knows how to read, which is very easy. chkconfig scripts in /etc/rc.d/init.d don't work unless they start with the correct info that chkconfig is looking for. Check out man chkconfig for how they work.
Personally I like to start everything with chkconfig at boot time because it tells you what is going on during the boot process, you can also choose what to run in what runlevel, which is very handy.
If you get stuck I can post my /etc/rc.d/init.d/httpd file if you would like to copy it. It uses /usr/sbin/apachectl to do the actual starting of httpd but does a lot of checking & configuring so things get setup just right.
 
Old 04-15-2005, 08:23 PM   #4
gsoft
Member
 
Registered: Mar 2004
Distribution: Fedora, Debian
Posts: 41

Original Poster
Rep: Reputation: 15
Yea i wanted to use the chkconfig script. I did a search on google and found a chkconfig for httpd and modified it to work with my setup.

http://www.activsoftware.com/apache/apache2src.cfm

Thank you very much for the help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache autostart zchoyt Linux - Software 4 04-15-2005 02:14 PM
apache autostart ciscohead Linux - General 5 12-10-2004 04:17 PM
Autostart wampfler Fedora 2 01-01-2004 02:18 PM
Autostart Haiyadragon Mandriva 4 12-26-2003 06:35 AM
Redhat 9 - How do I uninstall apache + how do I add apache to autostart? praefex Linux - Software 2 07-29-2003 12:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration