一键安装lnmp-php(5)

php(){
cd $path
tar zxvf yasm-1.3.0.tar.gz
cd yasm-1.3.0.tar.gz
./configure
make
make install
cd $path
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure --prefix=/usr/local/libmcrypt
make
make install
cd $path
tar jxvf libvpx-1.4.0.tar.bz2
cd libvpx-1.4.0
./configure --prefix=/usr/local/libvpx --enable-shared --enable-vp9
make
make install
cd ..
tar zxvf tiff-4.0.3.tar.gz
cd tiff-4.0.3
./configure --prefix=/usr/local/tiff --enable-shared
make
make instal
cd $path
tar zxvf libpng-1.5.6.tar.gz
cd libpng-1.5.6
./configure --prefix=/usr/local/libpng --enable-shared
make
make install
cd $path
tar zxvf freetype-2.4.8.tar.gz
cd freetype-2.4.8
./configure --prefix=/usr/local/freetype --enable-shared
make
make install
cd $path
tar zxvf jpegsrc.v8d.tar.gz
cd jpeg-8d
./configure --prefix=/usr/local/jpeg --enable-shared
make
make install
cd $path
tar zxvf t1lib-5.1.2.tar.gz
cd t1lib-5.1.2
./configure --prefix=/usr/local/t1lib --enable-shared
make without_doc

#php安装
cp -frp /usr/lib64/libltdl.so* /usr/lib/
yum -y install libXpm
cd $path
tar zxvf php-5.5.24.tar.gz
cd php-5.5.24
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql-5.5.18 --with-mysqli=/usr/local/mysql-5.5.18/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-pdo-mysql=/usr/local/mysql-5.5.18 --with-png-dir=/usr/local/libpng --with-jpeg-dir=/usr/local/jpeg --with-freetype-dir=/usr/local/freetype --with-xpm-dir=/usr/ --with-vpx-dir=/usr/local/libvpx/ --with-zlib-dir=/usr/local/zlib --with-t1lib=/usr/local/t1lib --with-iconv --enable-libxml --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-opcache --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-mcrypt --with-curl --enable-ctype
make
make install
cp $path/php.ini /usr/local/php/etc/php.ini
rm -rf /etc/php.ini
ln -s /usr/local/php/etc/php.ini /etc/php.ini
ln -s /usr/local/php/etc/php-fpm.conf /etc/php-fpm.conf
cp $path/php-fpm.conf /usr/local/php/etc/php-fpm.conf
cp $path/php-5.5.24/sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpm
chmod +x /etc/rc.d/init.d/php-fpm
chkconfig php-fpm on
}

posted @ 2015-11-04 18:44  zclzhao  阅读(184)  评论(0编辑  收藏  举报