yum update
yum install git gcc gcc-c++ libxml2-devel pkgconfig openssl-devel bzip2-devel curl-devel libpng-devel libjpeg-devel libXpm-devel freetype-devel gmp-devel libmcrypt-devel libmcrypt mariadb-devel aspell-devel recode-devel autoconf bison re2c libc-client-devel openldap-devel net-snmp-devel

Install ICU4 57_1

wget http://download.icu-project.org/files/icu4c/57.1/icu4c-57_1-src.tgz
tar -xvf ./icu4c-57_1-src.tgz
cd icu/source/
./configure --prefix=/opt/icu
gmake
gmake install

Upgrade Openssl upto 1.0.2

mkdir ~/src/
cd ~/src/
wget https://www.openssl.org/source/openssl-1.0.2p.tar.gz
tar -xvf ./openssl-1.0.2p.tar.gz
cd openssl-1.0.2p
./config -fpic shared
make
make install
echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
ldconfig

Build PHP 7.1.23

wget http://at2.php.net/get/php-7.1.23.tar.gz/from/this/mirror
tar -xvf ./php-7.1.23.tar.gz
cd php-7.1.23
./buildconf --force
./configure --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc --with-config-file-scan-dir=/usr/local/php7/etc/conf.d --enable-bcmath --with-bz2 --with-curl --enable-filter --enable-fpm --with-gd --enable-gd-native-ttf --with-freetype-dir --with-jpeg-dir --with-png-dir --enable-mbstring --with-mcrypt --enable-mysqlnd --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-pdo-sqlite --disable-phpdbg --disable-phpdbg-webhelper --enable-opcache --with-openssl --enable-simplexml --with-sqlite3 --enable-xmlreader --enable-xmlwriter --enable-zip --with-zlib --with-openssl=/usr/local/ssl/ --with-icu-dir=/opt/icu --with-imap --with-imap-ssl --with-kerberos --with-ldap --with-snmp --enable-intl --with-icu-dir=/opt/icu
make j2
make install
  
Enter your comment. Wiki syntax is allowed:
 
  • centos/build_php7_for_centos-5.11_from_source.txt
  • Last modified: 2019/02/11 09:13
  • by 127.0.0.1