环境参数:Linux:Centos6.5,php:5.3.29,libiconv:1.14
1.必要软件安装准备
yum install zlib zlib-devel libxml libxml2-devel libjpeg libjpeg-devel freetype freetype-devel libpng libpng-devel gd gd-devel curl curl-devel libxslt libxslt-devel -y
2.下载libiconv,下载地址:wget http://ftp.gnu.org/gnu/libiconv/libiconv-1.14.tar.gz
3.编译安装libiconv
tar zxf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make && make install
4.下载Php,下载地址:sudo wget http://cn2.php.net/get/php-5.3.29.tar.gz/from/this/mirror
5.解压Php
tar xf php-5.3.29.tar.gz
cd php-5.3.29
6.编译Php
./configure \
--prefix=/application/php5.3.29 \
--with-apxs2=/application/apache/bin/apxs \
--with-mysql=/application/mysql \
--with-xmlrpc \
--with-openssl \
--with-zlib \
--with-freetype-dir \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-iconv=/usr/local/libiconv \
--enable-short-tags \
--enable-sockets \
--enable-zend-multibyte \
--enable-soap \
--enable-mbstring \
--enable-static \
--enable-gd-native-ttf \
--with-curl \
--with-xsl \
--enable-ftp \
--with-libxml-dir
7.安装Php
make && make install
8.使Apache支持Php
vim /application/apache/conf/httpd.conf
加入如下红字内容
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
1.必要软件安装准备
yum install zlib zlib-devel libxml libxml2-devel libjpeg libjpeg-devel freetype freetype-devel libpng libpng-devel gd gd-devel curl curl-devel libxslt libxslt-devel -y
2.下载libiconv,下载地址:wget http://ftp.gnu.org/gnu/libiconv/libiconv-1.14.tar.gz
3.编译安装libiconv
tar zxf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make && make install
4.下载Php,下载地址:sudo wget http://cn2.php.net/get/php-5.3.29.tar.gz/from/this/mirror
5.解压Php
tar xf php-5.3.29.tar.gz
cd php-5.3.29
6.编译Php
./configure \
--prefix=/application/php5.3.29 \
--with-apxs2=/application/apache/bin/apxs \
--with-mysql=/application/mysql \
--with-xmlrpc \
--with-openssl \
--with-zlib \
--with-freetype-dir \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-iconv=/usr/local/libiconv \
--enable-short-tags \
--enable-sockets \
--enable-zend-multibyte \
--enable-soap \
--enable-mbstring \
--enable-static \
--enable-gd-native-ttf \
--with-curl \
--with-xsl \
--enable-ftp \
--with-libxml-dir
7.安装Php
make && make install
8.使Apache支持Php
vim /application/apache/conf/httpd.conf
加入如下红字内容
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29812844/viewspace-1988853/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29812844/viewspace-1988853/