Centos7 编译安装PHP7.4


yum -y install gcc gcc-c++ openssl openssl-devel libxml2 libxml2-devel curl-devel libjpeg-devel bzip2-devel.x86_64 libXpm-devel gmp-devel icu libicu libicu-devel php-mcrypt libmcrypt libmcrypt-devel postgresql-devel libxslt-devel libpng-devel libpng freetype-devel


wget https://nih.at/libzip/libzip-1.2.0.tar.gz
tar xf libzip-1.2.0.tar.gz
cd libzip-1.2.0
make && make install


wget https://www.php.net/distributions/php-7.4.0.tar.gz
tar xf php-7.4.0.tar.gz
cd php-7.4.0


./configure –prefix=/usr/local/php –enable-opcache –with-config-file-path=/usr/local/php/etc –with-curl –enable-fpm –enable-gd –with-iconv –enable-mbstring –with-mysqli=mysqlnd –with-openssl –enable-static –enable-sockets –enable-inline-optimization –with-zlib –disable-ipv6 –disable-fileinfo –disable-debug

如提示“No package ‘oniguruma’ found”需要安装 oniguruma包(可以参考 https://github.com/kkos/oniguruma#install):

yum install https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/o/oniguruma-5.9.5-3.el7.x86_64.rpm
yum install https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/o/oniguruma-devel-5.9.5-3.el7.x86_64.rpm

如提示“No package ‘sqlite3’ found:

wget -P /data/tmp https://sqlite.org/2019/sqlite-autoconf-3280000.tar.gz
cd /data/tmp/ && tar xf sqlite-autoconf-3280000.tar.gz
cd sqlite-autoconf-3280000
make && make install
whereis sqlite3
mv /usr/bin/{sqlite3,sqlite3.7}
cp /usr/local/bin/sqlite3 /usr/bin/sqlite3
sqlite3 –version
export LD_LIBRARY_PATH=”/usr/local/lib”
yum install sqlite-devel

然后执行make && make install 开始编译


105 条评论

  1. below you will obtain the link to some web sites that we assume you ought to visit

  2. we came across a cool web page which you might get pleasure from. Take a look for those who want

  3. that is the finish of this post. Here youll discover some web-sites that we assume youll value, just click the hyperlinks over

  4. Chiang Mai

    check below, are some absolutely unrelated internet sites to ours, nonetheless, they’re most trustworthy sources that we use

  5. Sites of interest we have a link to

  6. Sonia Randhawa

    although websites we backlink to beneath are considerably not related to ours, we really feel they’re basically really worth a go as a result of, so have a look

  7. bombar tiktok

    Here is an excellent Weblog You may Come across Interesting that we Encourage You

  8. one of our guests a short while ago proposed the following website

  9. Jed Fernandez

    Every as soon as in a while we pick blogs that we read. Listed below would be the latest web pages that we choose

  10. that would be the finish of this article. Right here you will come across some web-sites that we believe youll enjoy, just click the links over

  11. always a significant fan of linking to bloggers that I adore but do not get lots of link appreciate from

  12. Disposable Vape

    one of our visitors not too long ago advised the following website

  13. kratom online

    check below, are some entirely unrelated internet websites to ours, however, they’re most trustworthy sources that we use

  14. Wonderful story, reckoned we could combine a couple of unrelated data, nevertheless really worth taking a look, whoa did one particular master about Mid East has got extra problerms as well

  15. we prefer to honor several other world wide web web pages around the web, even if they arent linked to us, by linking to them. Underneath are some webpages worth checking out