LinuxQuestions.org
Visit Jeremy's Blog.
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 12-14-2007, 09:41 AM   #1
Sysop1911
Member
 
Registered: Dec 2007
Posts: 30

Rep: Reputation: 15
Why no httpd service?


I was finally able to install Apache 2.2.6 on my Red Hat Enterprise Linux 4 box by uninstalling the version that came with it (2.0.59) and downloading and installing the Apache 2.2.6 files from Apache's website. If I open a browser and go to localhost, the screen reads "It Works!", so it looks like apache is installed, but why is there no httpd service under services? Also, when I type in "rpm -q httpd", it says "package httpd is not installed". The file I downloaded from the Apache website was the httpd-2.2.6.tar.gz file. I did the whole "./configure, make, make install, apachectl start" and it worked, I guess, but why no httpd service? Thanks.

Last edited by Sysop1911; 12-14-2007 at 09:46 AM.
 
Old 12-14-2007, 10:16 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
If you install a package from source, RPM will not know about it. It only knows about packages that were installed via the rpm command (and related tools such as yum etc). Since you compiled from source, you have to setup the httpd service on your own. You can do this by copying the apachectl file to /etc/init.d and do
Code:
#chkconfig --add httpd
#chkconfig --level 35 httpd on
#service httpd start
You may have to edit apachectl so that it works correctly on your system.
 
Old 12-14-2007, 10:19 AM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Building and installing software from source tarballs will not be reflected in RPM's knowledge of what is installed. Only packages installed by rpm will be known to it.

You may have to configure apache to start and stop as a service by creating and adding the appropriate shell scripts to the /etc/rc.d/..... directories. Installing apache as an RPM might have done this for you. Examine the files and directories in /etc/rc.d and its subdirectories, and also the man page for chkconfig. I believe the 'apachectl' script can be set up as a service, and is probably intended as such.
--- rod.
 
Old 12-14-2007, 12:51 PM   #4
Sysop1911
Member
 
Registered: Dec 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by reddazz View Post
If you install a package from source, RPM will not know about it. It only knows about packages that were installed via the rpm command (and related tools such as yum etc). Since you compiled from source, you have to setup the httpd service on your own. You can do this by copying the apachectl file to /etc/init.d and do
Code:
#chkconfig --add httpd
#chkconfig --level 35 httpd on
#service httpd start
You may have to edit apachectl so that it works correctly on your system.
Thanks for the reply. Can you give me some more detail, here? I copied the apachect1 file to /etc/init.d. When I ran the "chkconfig --add httpd" I got an error message: "error reading information on service httpd: No such file or directory". I'll logged in as root. Which directory do I need to run the chkconfig command from? I tried it in a bunch of different directories, but nothing worked. Thanks.
 
Old 12-14-2007, 02:32 PM   #5
brianmcgee
Member
 
Registered: Jun 2007
Location: Munich, Germany
Distribution: RHEL, CentOS, Fedora, SLES (...)
Posts: 399

Rep: Reputation: 39
Not the latest releases, but Apache webserver is also available as RPM:
http://apache.linux-mirror.org/httpd/binaries/rpm/

Generally it is wise to use RPM in RHEL to ensure one can remove and update packages cleanly.

However if you use own packages you will not benefit from official Red Hat httpd updates that are thoroughly tested and tend to be very secure and stable.
 
Old 12-14-2007, 06:30 PM   #6
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Quote:
Originally Posted by Sysop1911 View Post
Thanks for the reply. Can you give me some more detail, here? I copied the apachect1 file to /etc/init.d. When I ran the "chkconfig --add httpd" I got an error message: "error reading information on service httpd: No such file or directory". I'll logged in as root. Which directory do I need to run the chkconfig command from? I tried it in a bunch of different directories, but nothing worked. Thanks.
When you copy apachectl to /etc/init.d, you have to rename it to httpd. When you run chkconfig, it does not matter which directory you are in.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
HTTPD service Uttam Shrestha Rana Linux - Server 2 12-10-2007 11:16 AM
Service httpd nnadithya Linux - Server 5 12-16-2006 09:08 PM
service httpd status, results in httpd dead but subsys locked squadja Red Hat 2 09-11-2004 10:31 PM
httpd as a service joshf Linux - Software 5 07-10-2003 07:54 AM
Using HTTPD Service skopje909 Linux - General 1 11-15-2001 03:32 PM

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

All times are GMT -5. The time now is 12:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration