aptitude install build-essential
apt-get -f install libncurses5-dev
# http://dev.mysql.com/doc/refman/5.1/en/installing-source.html
# http://dev.mysql.com/doc/refman/5.1/en/quick-install.html
groupadd mysql
useradd -g mysql mysql
tar -xzvf mysql-5.0.67.tar.gz
cd mysql-5.0.67/
./configure --prefix=/usr/local/mysql
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
chown -R mysql .
chgrp -R mysql .
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
bin/mysqld_safe --user=mysql &
# http://httpd.apache.org/docs/2.2/install.html#customize
tar -xzvf httpd-2.2.10.tar.gz
cd httpd-2.2.10/
./configure --prefix=/usr/local/apache
make
make install
apt-get install libxml2
apt-get install libxml2-dev
# http://cn2.php.net/manual/en/install.unix.apache2.php
tar -xzvf php-5.2.6.tar.gz
cd php-5.2.6/
./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --prefix=/usr/local/php
make
make install
# start httpd
cd /usr/local/apache/
vi conf/httpd.conf
bin/apachectl start