简介:这是linux安装php的详细页面,介绍了和php,有关的知识、技巧、经验,和一些php源码等。
class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=334917' scrolling='no'> tar -zxvf php-5.2.9.tar.gzcd php-5.2.9
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/lib --enable-track-vars --with-xml --with-mysql
make
make install
cp php.ini-dist /usr/local/php/lib/php.ini(需要这个?)
以上全都正确后,会自动加入对php模块支持
# vi /usr/local/apache2/conf/httpd.conf
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
写个phpinfo看看
<?php
phpinfo();
?>
卸载php
rpm -qa |grep php
sudo rpm -e php-cli-5.1.6-27.el5_5.3
sudo rpm -e php-5.1.6-27.el5_5.3
sudo rpm -e php-devel-5.1.6-27.el5_5.3
sudo rpm -e php-pdo-5.1.6-27.el5_5.3
sudo rpm -e php-mysql-5.1.6-27.el5_5.3
sudo rpm -e php-xmlrpc-5.1.6-27.el5_5.3
sudo rpm -e php-mbstring-5.1.6-27.el5_5.3
sudo rpm -e php-ldap-5.1.6-27.el5_5.3
sudo rpm -e php-gd-5.1.6-27.el5_5.3
sudo rpm -e php-pear-1.4.9-6.el5
sudo rpm -e php-xml-5.1.6-27.el5_5.3