View Full Version: apache on red hat

C++ Learning Community > Computer Lab > apache on red hat


Title: apache on red hat
Description: how to make it work?


anothersomething - April 19, 2004 05:27 AM (GMT)
I cant figure out how to run apache web server on red hat linux. I have no idea what to do. I don't even know the folder it is located in. Or what program you run to access the control panel. (if there is one). And what are some good free control panels for web servers that you can install on linux?

btw, it looks as if everyone is starting to run linux now.

KTC - April 19, 2004 01:05 PM (GMT)
Does this thread help ? Probably not .... <_<
http://invisionfree.com/forums/CPPlearning...?showtopic=1290

Apache manual about DocumentRoot:
http://httpd.apache.org/docs-2.0/mod/core.html#documentroot

myork - April 19, 2004 01:30 PM (GMT)
How the apache server is run varies across linux so this may not work exactly for you.

To check to see if it is running you can do a:
CODE
ps -ef | grep httpd | grep -v grep


I usually start it with:
CODE
cd /etc/init.d
./httpd restart


The config files are usually located under:
CODE
/etc/httpd/conf/

anothersomething - April 19, 2004 11:28 PM (GMT)
ok, thanks, i got apache to work. I just needed to type httpd at the command prompt. (or whatever it is called in linux.) And I found the configuration file, so I know where to put my docs. And php is working. But mysql is not. Does anyone know how to install or run mysql?

Thanks.

myork - April 20, 2004 02:23 PM (GMT)

Ok to get mysql running:

CODE
cd /etc/init.d
./mysqld restart


To connect to it via command line tools use:

CODE
mysql [<DB Name>]



Just as a side not:
Webadmin is a really usfull service to run (probably already running). It allows you to configure all your services etc via a webbrowser. Just point the webbrowser at port 10000 (ten thousand) of you machine, if webadmin is running it should be obvious from there.

Incubator - April 20, 2004 05:49 PM (GMT)
correction:
to connect to the mysql database via CLI you need to type

$ mysql -u <username> -p <databasename>

-p is only needed if you have a pasword.

an example:

$ mysql -u incubator -p test

then it will ask for your password.

you cna add -h <hostname> if it is on a remote server

btw, pretty strange RH likes to change its commands so much.
normally apache is started with /etc/init.d/apache start (or apache2 start) | restart | stop
wich imo is more logical anywhay since the sevrer is called apache and not httpd :)

myork - April 20, 2004 06:22 PM (GMT)
QUOTE
since the sevrer is called apache and not httpd


But my server was called httpd!!!!

The problem is there is no standard.

Incubator - April 20, 2004 06:50 PM (GMT)
CODE

# emerge -s apache

*  net-www/apache
     Latest version available: 2.0.49
     Latest version installed: 2.0.49
     Size of downloaded files: 5,780 kB
     Homepage:    http://www.apache.org/
     Description: Apache Web Server, Version 2.0.x
     License:     Apache-2.0


i call that a standard :)

KTC - April 20, 2004 10:14 PM (GMT)
QUOTE
correction:
to connect to the mysql database via CLI you need to type

$ mysql -u <username> -p <databasename>
You can always specifiy which database after you started mysql ;) And also, a default install would actually let you in without specifing a username...

Incubator - April 20, 2004 10:52 PM (GMT)
yes, but how insecure that would be ;)




* Hosted for free by InvisionFree