apache的安装就不说了^_^
1.下载php
wget http://cn2.php.net/get/php-5.2.5.tar.gz/from/cn.php.net/mirror
2.下载libxml
wget ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/libxml2-2.6.30.tar.gz
3.下载gd
wget http://www.libgd.org/releases/gd-2.0.35.tar.gz
4.下载phpMyAdmin
wget http://prdownloads.sourceforge.net/phpmyadmin/phpMyAdmin-2.11.5.1-all-languages.tar.gz?download
5.安装libxml
tar -zxvf libxml2-2.6.30.tar.gz
cd libxml2-2.6.30/
./configure --prefix=/usr/local/libxml-2.6.30
make
sudo make install
6.安装gd
tar -zxvf gd-2.0.35.tar.gz
cd gd-2.0.35/
./configure --prefix=/usr/local/gd-2.0.35
make
sudo make install
7.安装php
tar -zxvf php-5.2.5.tar.gz
cd php-5.2.5/
./configure --prefix=/usr/local/php-5.2.5 --with-apxs2=/usr/local/apache-2.2.8/bin/apxs --with-mysql=/usr/local/mysql --with-libxml-dir=/usr/local/libxml-2.6.30/ --with-gd=/usr/local/gd-2.0.35/
make
make test
sudo make install
8.配置apache及php
cp php.ini-dist /usr/local/lib/php.ini
在httpd.conf中:
#安装完php后一般安装程序会自动修改httpd.conf文件加入以下配置:
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
9.安装phpMyAdmin
tar -zxvf phpMyAdmin-2.11.5.1-all-languages.tar.gz
sudo mv phpMyAdmin-2.11.5.1-all-languages /usr/local/apache-2.2.8/htdocs/phpMyAdmin
访问一下看看可以没:
http://host/phpMyAdmin/index.php
配置页面应该出来了!恭喜,安装成功!