Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to start Apache

Status
Not open for further replies.

hellsing

MIS
Sep 3, 2001
97
GB
I have inherited a Mandrake 8.2 server running Apache as a web server. I dont know anything at all about Linux and Apache, the problem is the Apache services are not running so I cannot access the html pages from a browser. They should as far as I know start up when the machine boots but they haven't. Does anyone know how to get apache running from the command line.

Thanks.
 
Hi,

In Mandrake, daemons and services are started using the Unix SYSV method.

Basically, the systems has different run levels - each representing a different server 'state'. For example, run level 1 is single user, 3 is multiuser, 5 is multiuser with auto X start etc.....

In the /etc/rc.d directory are subdirectories representing each run level (rc1.d throuhg to rc6.d). These contain links to the 'start/stop' scripts in the init.d directory which will start the daemons etc.....

These links in the rcX.d directory either start with 'S' to indicate that services should be started when entering that runlevel - or start with 'K' to represent killing the daemon.


Now, you can create these links manually but there are various GUI tools to make this easier. Not sure with Mandrake but have a look for SYSV tools.

However, for now, you can start apache by hand by calling the init.d script itself:

/etc/rc.d/init.d/apache start

will start apache (if that is what it is called on Mandrake - it could possibly be referred to as /etc/rc.d/init.d/httpd instead of apache)

You can also call it with the 'stop' and 'restart' arguments to do s you would expect from their names.
 
on freebsd i use this to state

/usr/local/sbin/apacheectl (stop or start)

hope it helps

Ben
 
Thanks for the replies. I have managed to attempt to get it started and it tries but then falls over due to modules in the config file being defined but the actual .so files for the modules dont exist, in the /usr/lib/apache directory.

Does anyone know how I can recreate these or where I can get them from.

Thanks again.
 
If it's a standard Mandrake RPM installation, then the rpms may well be on the installation CD. IF not head off to the Madrake site or better still, go to rpmfind.net and search for the files you want. It should highlight what rpm packages supply them and them you just choose your distro and version and off you go downloading.

IF you want - post the missing file names here. Also, I haven't used Mandrake for a while, but I thought the modules were stored somewhere else?
 
Thanks for the replies everyone but I think I've sussed it.

I actually decided the best way to look after this server was to scrap the damn thing and re-install from scratch so I could learn as I go.

I've done the re-install today and have got apache up and running. Just need to test tommorow to make sure I can see the web pages I have there.

Thanks for the help guys.
 
Right I've got an all new problem now.

I've got Mandrake 8.2 installed and I want to transfer over my html files from a Mandrake 7 server. The problem is FTP and telnet doesn't work from any PC or server to my new Mandrake machine. I always get "connection refused".

I have checked these forums out and there is mention of files like xinitd.d/telnet and ftp but I havent got any of these files. FTP and telnet do work from the mandrake 8.2 machine out though. Any ideas anyone!!
 
Check on the new installation if you have xinet or inet installed - it could be that you don't have this internet service wrapper installed (apache is usually configured to run manually directly rather than via the internet wrapper). Inet or Xinet will listen for port connections and spawn the appropriate daemon for the connection. If it is not installed then most internet services will not run.

Alternatively, you could always run an ftp CLIENT on your new server and download the files from your old server.

It is also possible that the new Mandrake installation has a different defalt firewall config that blocks these.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top