从源代码安装PHP 7.2

By admin , 9 九月, 2025

PHP 7.2已经在中止支持,旧代码需要在下面链接下载:

https://php.watch/versions/7.2/releases/7.2.34

在安装PHP前,需要先安装旧版Open SSL库:

$ wget https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz

下载后解压,运行下面命令安装:

$ cd php-src-php-7.2.34/
$ apt install autoconf build-essential curl libtool   libssl-dev libcurl4-openssl-dev libxml2-dev libreadline-dev libzip-dev openssl   pkg-config zlib1g-dev libsqlite3-dev libonig-dev libpng-dev libfreetype6-dev freetype2-demos libjpeg-dev bison
$ ./configure --enable-mysqlnd     --with-pdo-mysql     --with-pdo-mysql=mysqlnd    --enable-bcmath     --enable-fpm     --with-fpm-user=www-data     --with-fpm-group=www-data     --enable-mbstring     --enable-phpdbg     --enable-shmop     --enable-sockets     --enable-sysvmsg     --enable-sysvsem     --enable-sysvshm     --enable-zip   --with-zlib     --with-curl     --with-pear     --with-openssl     --enable-pcntl     --with-readline --enable-calendar --with-mysqli
$ make
$ make test
$ make install

标签

评论

Restricted HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。
CAPTCHA
请输入"Drupal"
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

最新内容

最新评论