centos6.5安装php
一、安装php前准备:
我们提供的服务有:网站建设、网站设计、微信公众号开发、网站优化、网站认证、平山ssl等。为超过千家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的平山网站制作公司
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
网站名称:centos6.5安装php
URL链接:http://pwwzsj.com/article/jhgcjj.html