码迷,mamicode.com
首页 > Web开发 > 详细

linux下安装配置php

时间:2014-11-03 12:47:59      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:http   io   ar   文件   on   art   ad   ef   linux   

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;

linux下安装配置php

标签:http   io   ar   文件   on   art   ad   ef   linux   

原文地址:http://www.cnblogs.com/feilv/p/4070823.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!