menembus batas impian

instal apache on slacware

I) What you need

A box with Slackware Linux installed and running.
Some type of Internet access.
About half an hour of uninterrupted work time.
To boot the above-mentioned machine and log on as root.

II) Downloading Apache Web Server

You can download directly from the Apache site ( or you may want to try one of the mirrors close to you to get a faster download.

Apache v2.2 is about 5 MB, so if you’re using dial-up this will take a while.

As of the time of this writing the current Apache web server is version 2.2.15, so the file you get is called httpd-2.2.15.tar.bz2 or something similar.

Just store this somewhere that Linux can see it.

III) Installing Apache web server

cd to wherever you want the apache source to live and extract it:

cd /usr/src
tar -jxf /where_apache_tarfile_is/httpd-2.2.15.tar.bz2

Change to the Apache top directory:

cd /usr/src/httpd-2.2.15

Now, configure Apache:
(This assumes that we’re installing Apache in /home/httpd. You can install it anywhere you wish by replacing /home/httpd with your location of choice.)

./configure –prefix=/home/httpd –enable-modules=so

(NOTE: I’ve included the module so, which makes it easier to add stuff like PHP.)

So far we’re doing good. Let’s make a web server! Just type:

make ; make install

This will make the server and install it in one fell swoop. On my test box (an Athlon 600 ) this takes under two minutes. Your mileage may vary!

You should get a box that says:

You now have successfully built and installed the Apache 2.2 HTTP server . . .

If so, we only have a few steps left! If not, you’ll need to start reading the error messages and the Apache documentation to figure out what went wrong.

If you’d like Apache to use something other than (or in addition to) index.html as an index page, Just edit the file /home/httpd/conf/httpd.conf and find the section labeled DirectoryIndex and add to the line that looks like:

DirectoryIndex index.html

You can add as many as you like, but I must mention that each one is an additional lookup each time a directory is accessed without a file name. Too many may slow your server down. Anyway, my line looks something like:

DirectoryIndex index.html index.php index.shtml index.htm default.htm

You may need to create rc.httpd in /etc/rc.d:
(This location is for Slackware; you may need a different location for other Linux distributions.)

It should look something like:

if [ “$1” = “stop” ]; then
/home/httpd/bin/apachectl stop
elif [ “$1” = “restart” ]; then
/home/httpd/bin/apachectl restart
elif [ “$1” = “start” ]; then
/home/httpd/bin/apachectl start
echo “usage: $0 start|stop|restart”;

Then change it so that it can be executed:

chmod a+x rc.httpd

A reboot of your system should have you on your way. If you don’t wanna restart, just type:

/etc/rc.d/rc.httpd start

If you can see the page: http://your_server/ then your installation was successful!

Some random Apache notes

Back to Stu’s Linux page

last updated 03-29-2010 07:16 by Stuart Reedy
Copyright Stuart Reedy 2002-2010
All rights reserved

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: