yum install libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl  libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel

 

./configure \
--prefix=/application/php7 \
 --with-curl \
 --with-freetype-dir \
 --with-gd \
 --with-gettext \
 --with-iconv-dir \
 --with-kerberos \
 --with-libdir=lib64 \
 --with-libxml-dir \
 --with-mysqli \
 --with-openssl \
 --with-pcre-regex \
 --with-pdo-mysql \
 --with-pdo-sqlite \
 --with-pear \
 --with-png-dir \
 --with-xmlrpc \
 --with-xsl \
 --with-zlib \
 --enable-fpm \
 --enable-bcmath \
 --enable-libxml \
 --enable-inline-optimization \
 --enable-gd-native-ttf \
 --enable-mbregex \
 --enable-mbstring \
 --enable-opcache \
 --enable-pcntl \
 --enable-shmop \
 --enable-soap \
 --enable-sockets \
 --enable-sysvsem \
 --enable-xml \
 --enable-zip

  make && make install

cp php.ini-production  /application/php7/lib/php.ini

vim ~/.bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
alias  php7=/application/php7/bin/php

  source  ~/.bash_profile

       php7 -v

相关文章:

  • 2021-06-09
  • 2021-12-01
  • 2022-02-09
  • 2021-07-25
  • 2021-12-03
  • 2021-07-28
  • 2021-06-11
猜你喜欢
  • 2021-12-04
  • 2021-12-04
  • 2021-12-04
  • 2021-12-13
  • 2021-05-25
  • 2021-06-15
相关资源
相似解决方案