首页 > 代码库 > 安装 PHP

安装 PHP

yum install -y epel-releaseyum install -y gcc libmcrypt-devel libxml2-devel openssl openssl-devel bzip2 bzip2-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-develcd /usr/local/srcwget http://cn2.php.net/distributions/php-5.4.37.tar.gztar zxvf php-5.4.37.tar.gzcd php-5.4.37./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc  --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --disable-ipv6make make installcp php.ini-production /usr/local/php/etc/php.inicp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpmcp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.confchmod 755 /etc/init.d/php-fpm
useradd -s /sbin/nologin php-fpmchkconfig --add php-fpmchkconfig php-fpm onservice php-fpm start
ps aux | grep php-fpm

 

 

 

 

    

安装 PHP