linux之php的安装以及配置
下载
wget http://cn2.php.net/get/php-7.1.16.tar.gz/from/this/mirror
mv mirror php.tar.gz(移除)
tar xf php.tar.gz (解压)
cd php-7.1.16/ (切换到目录)
yum install libxml2-devel curl-devel libjpeg-devel libpng-devel openssl-devel freetype-devel libxslt-devel -y
yum install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -y
yum install libmcrypt-devel -y
编译参数
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=www --with-fpm-g
roup=www --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir=/usr/local/freetype --with-mcrypt --with-jpeg-dir --with-p
ng-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with
-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --with-xmlrpc --enable-zip --enable-soap --with-gettext --enable-opcache --with-xsl
./configure --prefix=/usr/local/php7 --enable-fpm \
--with-zlib \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--enable-shared \
--enable-opcache \
--with-fpm-user=www \
--with-fpm-group=www \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-gettext \
--enable-mbstring \
--with-iconv \
--with-mcrypt \
--with-mhash \
--with-openssl \
--enable-bcmath \
--enable-soap \
--with-libxml-dir \
--enable-pcntl \
--enable-shmop \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--with-curl \
--with-zlib \
--enable-zip \
--with-readline
make && make install 安装