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

centos6.5安装php

时间:2015-09-24 19:42:57      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:php centos

一、安装php前准备:

rpm -qa zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel openssl-devel libxslt-devel

mysql,apache,libiconv需要源码安装



二、编译参数

./configure \

--prefix=/application/php-5.6.13 \

--with-apxs2=/application/apache/bin/apxs \

--with-mysql=/usr/local/mysql \

--with-xmlrpc \

--with-openssl \

--with-zlib \

--with-freetype-dir \

--with-gd \

--with-jpeg-dir \

--with-png-dir \

--with-iconv=/application/libiconv-1.14 \

--enable-short-tags \

--enable-sockets \

--enable-soap \

--enable-mbstring \

--enable-static \

--enable-gd-native-ttf \

--with-curl \

--with-xsl \

--enable-ftp \

--with-libxml-dir


三、make && make install


四、配置修改

ln -s /application/php5.3.10 /application/php

cp php.ini-production /application/php/lib/php.ini

修改httpd.conf

grep php conf/httpd.conf

LoadModule php5_module        modules/libphp5.so

    DirectoryIndex index.php index.html

    AddType application/x-httpd-php .php .phtml

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

./bin/apachectl -t

Syntax OK

./bin/apachectl graceful


httpd.conf里关于htdocs权限

Order allow,deny

Allow from all


本文出自 “liuk的问题解决办法” 博客,请务必保留此出处http://liuk1303.blog.51cto.com/10449284/1697769

centos6.5安装php

标签:php centos

原文地址:http://liuk1303.blog.51cto.com/10449284/1697769

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