Linux下PHP安装记

在Linux下安装PHP当然首先要先下载PHP FOR LINUX的文件了.

# wget http://cn2.php.net/distributions/php-5.2.5.tar.gz

安装

# tar zxvf php-5.2.5.tar.gz

# cd php-5.2.5

# ./configure  --prefix=/usr/ali/php --with-apxs2=/usr/ali/apache2/bin/apxs --with-mysql=/usr/ali/mysql --with-zlib --with-iconv=/usr/ali/libiconv --with-config-file-path=/home/admin/aep/forum/conf

# make

# make install

# make clean

# cp php.ini-dist /home/admin/aep/forum/conf/php.ini

# vi /home/admin/aep/forum/conf/httpd.conf

任意位置添加如下内容

AddType application/x-httpd-php .php

AddType application/x-httpd-php-source .phps

相关推荐