Saturday, September 8, 2007

Install Apache2 on Debian

The Debian source at http://ftp.hk.debian.org seems missing some files for Apache2. Therefore, I change the Debian source to http://http.us.debian.org. Edit the file /etc/apt/sources.list:
#
# deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1 20
deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1 2007
deb http://http.us.debian.org/debian/ etch main
deb-src http://http.us.debian.org/debian/ etch main
deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib

Run apt-get update every time you change the sources.list.
# apt-get update

Install Apache2:
# apt-get install apache2

Test the installation:
Point the browser to http://192.168.0.66/apache2-default/ and the following returns:

It works!

Reference:
http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html