CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 5 - General Support
  How to start Apache automatically at boot

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  satimis
      satimis
How to start Apache automatically at boot
#1
Regular Board Member
Joined: 2006/11/14
From
Posts: 113
Hi folks,


VMWare Server
Ubuntu 7.04 server amd64 (Host)
CentOS 5 x86_64 (Guest)


I need to start Apache2 at boot. I have xinetd installed and could not figure out how to set it for such a function.


# ls /etc/xinetd.d/
chargen-dgram   discard-stream  gssftp          tcpmux-server
chargen-stream  echo-dgram      klogin          time-dgram
daytime-dgram   echo-stream     krb5-telnet     time-stream
daytime-stream  eklogin         kshell          
discard-dgram   ekrb5-telnet    rsync  



# ls -l /etc/rc.d/init.d/ | grep xinetd
-rwxr-xr-x 1 root root  2497 Mar 15  2007 xinetd



Besides I tried to reconfigure Apache2 and cound not find dpkg-reconfigure which is Debian package. What will be its equivalent on CentOS? Is there yum repo providing this package? TIA


B.R.
satimis
Posted on: 2008/2/2 14:40
Create PDF from Post Print
Top
  •  friguyb
      friguyb
Re: How to start Apache automatically at boot
#2
Peeking in the Member Window
Joined: 2005/9/11
From Paris, France
Posts: 16
in a terminal session execute the command ntsysv , this will show you all the services started at bootime, select httpd
Posted on: 2008/2/2 15:36
Create PDF from Post Print
Top
  •  satimis
      satimis
Re: How to start Apache automatically at boot (SOLVED)
#3
Regular Board Member
Joined: 2006/11/14
From
Posts: 113
Quote:

friguyb wrote:
in a terminal session execute the command ntsysv , this will show you all the services started at bootime, select httpd

Thanks for your advice. I got it done now.


I have been playing around with ntsysv on Xterm before unable to run it as root.

# yum list installed | grep ntsysv
ntsysv.x86_64                            1.3.30.1-1             installed 


The package has been installed. Now I found the trick. It must be run as super root (su -).


B.R.
satimis
Posted on: 2008/2/2 16:13
Create PDF from Post Print
Top
  •  ThinkingGuy
      ThinkingGuy
Re: How to start Apache automatically at boot
#4
Newbie
Joined: 2008/1/28
From
Posts: 4
You can also change whether services start at boot with the chkconfig command. For example, to have Apache (which Centos calls httpd instead of apache2 as in Debian/Ubuntu) start only in runlevels 3,4, and 5, use this command:

chkconfig --level 234 httpd on

This command will list the current setting for httpd:

chkconfig --list httpd

Centos usually defaults to booting to runlevel 3 (standard multi-user) or 5 (multi-user with graphical logon).
You can display the previous and current runlevels with the runlevel command.

Oh yeah, the chkconfig command will have to be run as root.

Hope this helps.
Posted on: 2008/2/4 19:35
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com