Thursday, May 21, 2009

Installing Apache Server in Debian 5.0 - Lenny

I need to install web server for intranet server. I have a Debian 5.0 box. Therefore it is natural to have apache server installed the newest
  • I logged in as su (Super User). BTW you need to have gcc library installed properly. It means you have to have complete library.
  • I downloaded httpd-2.2.11.tar.bz2.I moved downloaded file into /opt by typing this command : mv httpd-2.2.11.tar.bz2 /opt/. Now the file was moved to /opt.
  • I went to /opt by typing cd /opt.
  • I extract httpd-2.2.11.tar.bz2 with this command : tar xjv httpd-2.2.11.tar.bz2. Directory httpd-2.2.11 was created
  • I went in to that directory : cd /opt/httpd-2.2.11
  • Then I read INSTALL file. It says that I should use this script
$ ./configure --prefix=PREFIX
$ make
$ make install
$ PREFIX/bin/apachectl start

  • Since I wanted Apache lives inside "/usr/local/apache2" so I changed the script. The script then looked like this :
$ ./configure --prefix=/usr/local/apache2
$ make
$ make install

  • The first command that I typed was "./configure --prefix=/usr/local/apache2"
  • Next I invoke "make" to build various executables. It was about 10 minutes compilation time in my 512 MB PC.
  • Next I invoke "make install" to install the executables. Running time was about 3 minutes.
  • To start apache server I invoked "/etc/init.d/apache start"
  • I tested the installation by using firefox browser. I typed in address bar : 127.0.0.1. Then I saw the result.
  • I congratulate my self by eating salad and chicken.