php5.5 安装

1.php安装

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libxslt-devel libmcrypt-devel mcrypt mhash -y
cd /soft

wget http://jp2.php.net/distributions/php-5.5.38.tar.gz
tar zxf php-5.5.38.tar.gz
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-iconv-dir=/usr/lcoal/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-short-tags --enable-zend-multibyte --enable-static --with-xsl --with-xsl --with-fpm-user=nginx --with-fpm-user=nginx --enable-ftp --enable-opcache=no

ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64/
touch ext/phar/phar.phar

make && make install

cp /soft/php-5.5.38/php.ini-development /etc/php.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
cp /soft/php-5.5.38/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

chmod +x /etc/init.d/php-fpm
/etc/init.d/php-fpm start
PATH=$PATH:/usr/local/php/bin/
echo "export PATH=$PATH:/usr/local/php/bin/" >>/etc/profile
chkconfig --add php-fpm
chkconfig php-fpm on
lsof -i :9000

  

猜你喜欢

转载自www.cnblogs.com/jimmy-xuli/p/8876635.html