PHP 5.2.2 on RHEL 4U5 x86
时间:2010-02-22 来源:xing_jia
unzip php-5.2.2.zip
cd php-5.2.2
chmod +x configure
./configure --prefix=/usr/local/php5.2.2 --enable-mbstring --enable-sockets --enable-soap --enable-zip --enable-pdo --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib --with-config-file-path=/usr/local/php5.2.2/lib --with-pdo-mysql=/usr/local/mysql --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config
make
chmod -R 755 .
make install
cp php.ini-recommended /usr/local/php5.2.2/lib/php.ini
sed -i s/short_open_tag\ =\ OFF/short_open_tag\ =\ ON/ /usr/local/php5.2.2/lib/php.ini
给Apache添加php支持: echo "AddType application/x-httpd-php .php">> /usr/local/apache2/conf/httpd.conf echo "AddType application/x-httpd-php-source .phps">> /usr/local/apache2/conf/httpd.conf 还要在httpd.conf中添加index.php
cd /usr/local/apache2/bin/ ./apachectl restart
给Apache添加php支持: echo "AddType application/x-httpd-php .php">> /usr/local/apache2/conf/httpd.conf echo "AddType application/x-httpd-php-source .phps">> /usr/local/apache2/conf/httpd.conf 还要在httpd.conf中添加index.php
cd /usr/local/apache2/bin/ ./apachectl restart
相关阅读 更多 +