yum install openssl openssl-devel libxml2-devel libxml2 bzip2 bzip2-devel curl-devel php-mcrypt libmcrypt
libmcrypt-devel readline-devel 

wget http://mirrors.sohu.com/php/php-5.6.31.tar.gz
tar xzvf php-5.6.31.tar.gz
cd php-5.6.31

1. 配置编译选项

./configure --prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
--enable-inline-optimization \
--disable-debug \
--disable-rpath  \
--enable-shared \
--enable-opcache --enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--with-mysql=mysqlnd \
--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-bz2 \
--with-readline

 

2. 编译PHP

make

3. 安装PHP

make install

相关文章:

  • 2021-12-12
  • 2022-03-07
  • 2022-12-23
  • 2021-09-22
  • 2021-07-05
  • 2021-06-11
  • 2022-12-23
  • 2021-12-11
猜你喜欢
  • 2021-11-30
  • 2022-12-23
  • 2021-08-27
  • 2022-02-13
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案