Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just installed RedHad 7.1 and am trying to get apache to run so I can see web pages and run cgi programs on my computer but not online. I am new to apache, any suggestions? Thanks, Josh
i dont know where rh installs apache, so someoneelse may know better.
but u can try
`/usr/local/apache/bin/apachectl start` (stop/restart)
or sbin instead of bin
That would be the command for the current `default`installation.
Is there no HOWTO or README in the apache directory?
good luck,
jens
Originally posted by j-ray i dont know where rh installs apache, so someoneelse may know better.
but u can try
`/usr/local/apache/bin/apachectl start` (stop/restart)
or sbin instead of bin
That would be the command for the current `default`installation.
Is there no HOWTO or README in the apache directory?
good luck,
jens
in rh its different, it uses the redhat layout in rh apache
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771
Rep:
As you already know, the startup script for apache under redhat is /etc/rc.d/init.d/httpd (stop|start|restart|reload).
Before we start,
a)have you installed XFree86?
b)If yes, do you use a graphical login prompt or do you login at a text prompt and then use 'startx'?
If you're using redhat, I'd probably think the answer to the first qn is YES. If then, go ahead and logon as yourself, and when you are in X, open a command prompt and type in serviceconf. You can also find it under the programs menu under sytem settings as 'Service configuration'. Type in the root password. Check the box for httpd in the window that pops up for runlevel 3 and runlevel 5 ( to cover both text and graphical login prompts).
If the answer to a) is no (you'll have to create a link to the startup script under the corresponding runlevel directories), let us know.
To start apache on boot up you need to modify your startup scripts, go to /etc/rc.d/ directory, there you'll find rc0.d trough 6 (they correspond to the appropriate runlevels), rc.local and a couple of more, what we need to do is just determine what runlevel should be modified, if you boot straight to X (GUI) your runlevel is set to 5, hence we need to modify runlevel 5 startup scripts - go to rc5.d in this case, do
ls -l
there you'll see symlinks pointed to ../init.d/executable. Note that every symlink starts with either K or S, K - is for kill don't start service, and S - is for start service, note also the two numbers following K os S it is a sequence number, now locate the one which contains httpd in its name, take a note where it points and a sequence number, now we need to change K link to S link with the same seq number, and final destination,
as root
ln -sf /where/original/points/to S##httpd
that's all next time you boot apache will start automatically.
A side note, make sure in runlevel 6 (reboot) rc6.d/ you have a symlink which kills apache (K##httpd) if there is none create it
ln -sf /where/apache/exec/is K##httpd
the same must be done for runlevel 0 (shutdown) as well.
Good luck.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.