php安装详解,php详解


获取资源:

cd /usr/local/src/

wget http://cn2.php.net/distributions/php-5.4.45.tar.bz2

tar jxvf php-5.4.45.tar.bz2

 

环境配置:

rpm -ivh 'http://www.lishiming.net/data/attachment/forum/epel-release-6-8_64.noarch.rpm'
yum install -y libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libjpeg libjpeg-devel libpng libpng-devel freetype-devel libmcrypt-devel

 

编译、安装:

cd php-5.4.45

 

./buildconf --force
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif --disable-ipv6

 

make 

make install

echo $?

0

安装成功!

 

注:在编译过程中可能会出现很多错,大多数是因为缺少包的原因,却啥包装啥,上面环境配置中,基本上包含了本次安装所有需要的包

 

相关内容

    暂无相关文章