Click to See Complete Forum and Search --> : Redhat Server Install


chickgeek
07-26-2003, 10:38 AM
Hello everyone. I am in need of some help. After two nights of not being able to sleep and dreaming of women in redhats chasing me with a penguin; I am a little frustrated.

I know IIS like the back of a carpal tunnel hand; wearing a brace from too much coding. My co-located server is Linux based but someone else handles the administration. So I needed to set up a testing server from home because the administrator won't upgrade to php 4 with Pear on it. I need to run some Pear apps. Hence, my problem.

I installed a new drive and put redhat server on it. I have the latest php install and apache running. The issue is when I try to access my server through a browser using the name of the server or the IP address it say "Connection Refused by Host" I can ping the IP address locally and remotely but can't get it to run my web apps. HELP:(

I need to run:

SENDMAIL for rerouting my mail
APACHE
PEAR
PHP

I have looked at all of the settings but obviously am missing something. What folder should apache, php be installed? What is the best directory to put HTTPDOCs in? Shouldn't I just use http://my local ip address to access the files?

Is there any default settings that are usually overlooked by new installs? What could I be doing wrong?

Thanks so much! I am already running over my deadline and can't test these on the other server because of some automatic emails that get sent.

Toni

yelvington
07-26-2003, 05:16 PM
First of all, are you certain that you installed Apache?

Secondly, are you certain that it is running? (Hint: "ps -C httpd".)

If it's installed but not running, you need to enable it. RedHat probably has some kind of control panel (perhaps WebMin) for setting defaults. What it actually does is place a link in /etc/rc.d/rc[runlevel].d/ but you're best off using the control panel. As a temporary measure you can run it manually, probably through "service httpd start".

The document root can be anywhere, and I don't know where RedHat keeps it these days. Maybe /var/www, maybe /home/httpd. Maybe someplace else.

You need to look in the httpd.conf file for the "DocumentRoot" directive. As for where RedHat puts httpd.conf, I would begin by looking in /etc/ for a directory named httpd, and follow the trail until you locate it.

Sorry to be so vague about all of this, but it's been at least four years since I ran RedHat, and I generally compile/install Apache from sources so that I control exactly where everything goes.

Doug G
07-27-2003, 01:14 AM
Did you open port 80 through the redhat firewall? I believe http is blocked after a fresh RH install.

ksandom
07-27-2003, 06:54 AM
Right, Redhat does have an equivilant to the control pannel. It's under:
- Redhat menu (equivilant to start menu) | System settings

Unlike the windows control pannel, the red hat one is directly in the menu. Yes I know windows can be configured to do that, but that is a story for another rainy day.

Specifically that things you will want to play with are:
- Redhat menu | System settings | Security Level
- Redhat menu | System settings | Server settings | Services
- Redhat menu | System settings | Server settings | HTTP Server


- Redhat menu | System settings | Security Level
The security level is really up to you. Having it off (no firewall) is the easy option. For these purposes, it's probably just as easy to tick the HTTP box under allowed incomming area. You probably want to allow the Mail one as well. That's enough talk on that for now.

- Redhat menu | System settings | Server settings | Services
Services. This I suspect is where you will find the problem. When I installed RH, Alot of the services I had installed were not set to startup automatically. The way you use this is very similar to the windows NT based OSes. It has the Start and Stop buttons for which ever service you have selected (on the window). If a service is ticked it is supposed to start on start up. You can see here whether it did or not by clicking on the service. On the right hand side in the status window you should see something like "httpd (pid 2243 1896 1895 1894 1893 1892 1891 1890 1889 1860) is running..."

You will definitley need httpd and sendmail running. Otherones you might need are MYSQL... I can't think of any others. If these are ticked when you start the program, but there status does not indicate that they are running, there is probably a problem in their config. Apache can need a little configuring on the first use.

If you are asked to save changes, go with the option that does.

- Redhat menu | System settings | Server settings | HTTP Server
This will bring up the Apache Configuration window. You'll need to make sure that there is an Available address. Also check the Virtual Hosts tab to make sure a Default Virtual Host is defined (This is where you will find the location where you need to put the files).

Hope that helps.

ksandom
07-27-2003, 07:02 AM
Some more points I ment to add. To check that things are working, type at the console (I'm using '$' to represent the prompt):
$ pear
This should produce a whole heap of help if it is successfully installed.
$ php
This will sit on the next line with a blinking cursor waiting for input. Just press CTRL + C to exit.

if you get something like:
bash: php: command not found
or
bash: pear: command not found
that program is not installed/working.

If this is a problem, look in:
- Redhat menu | System settings | Add/Remove Applications

chickgeek
07-27-2003, 01:03 PM
Thanks so much for your help guys. I got the server running alright. It wasn't starting the http server properly. I re-installed apache, php and mysql. Now I am just having issues getting sendmail to work properly. Once I get that and my phpMyAdmin tool to work properly...life will be perfect:)

Thanks again for your help. I really appreciate it!

Toni