yum -y install gcc-c++
groupadd httpd
useradd -g httpd httpd
yum install libxml2 -y
yum install libxml2-devel -y
yum install libcurl-devel -y
yum -y install libjpeg-devel libpng-devel
//字体
yum install freetype-devel -y
yum -y install openssl openssl-devel
yum -y install php-mcrypt limcrypt libmcrypt-devel
tar -zxvf php-7.0.1.tar.gz
./configure --prefix=/usr/local/php --with-iconv --with-zlib --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --enable-ftp --with-jpeg-dir --with-freetype-dir --with-png-dir --enable-fpm --with-fpm-user=httpd --with-fpm-group=httpd --with-pdo-mysql --with-mysqli --with-mcrypt=/usr/local/ --enable-opcache=no
make && make install
配置环境变量
export PATH=$PATH:/usr/local/php/bin
export PATH=$PATH:/usr/local/php/sbin
然后立马生效,执行
source /etc/profile
cp php.ini-production /usr/local/php/lib/php.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf
修改php.ini
vi /usr/local/php/lib/php.ini
date.timezone = "Asia/Shanghai"
网友评论