首页 > 代码库 > lnmp的安装--php

lnmp的安装--php

1.下载php源码

wget http://cn2.php.net/distributions/php-5.6.3.tar.gz

tar zxvf php-5.6.3.tar.gz

cd php-5.6.3

2.安装依赖包

 这些依赖有libxml, libpng, libjpeg, libmcrypt...等

 根据提示进行操作,如:yum install libxml2 按Tab键查看所有libxml包,我这里安装 yum install libxml2-devel,然后进行配置。
./configure 测试

./configure --prefix=/usr/www/php --with-config-file-path=/usr/www/php/etc --with-mysql=/usr/www/mysql --with-mysqli=/usr/www/mysql/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-gd --with-iconv --with-zlib --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization  --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session  --with-curl


2.1
yum install -y libxml2 libxml2-devel
yum install libcurl libcurl-devel
yum install libjpeg libjpeg-devel libpng libpng-devel
yum install libmcrypt libmcrypt-devel

 2.2 安装

make && make install

技术分享

 

lnmp的安装--php