linux下安装配置php
1.获得文件:
php.tar.gz
2.安装libxml2:
./configure --prefix=/usr/local/libxml2; make; make install;
3.安装php:
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/local/libxml2; make; make install;
4.配置apache:
vi httpd.conf, 添加AddType application/x-httpd-php .php, AddType application/x-httpd-php-source .phps
vi php.ini, registe-globals=on
/etc/init.d/httpd restart
5.安装bcmath扩展:
cd <php-src>/ext/bcmath;
/usr/local/php/bin/phpize;
./configure --with-php-config=/usr/local/php/bin/php-config;
make; make install;
mv bcmath.so /usr/local/php/lib/php/extensions/;
echo "extension=bcmath.so">>php.ini;
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。