Loading...

CentOS 7.5 PHP 7.3.0 RC5 安装成功

终于吃上 PHP 7.3 了,非常舒服!

记录一下安装过程,留来以后备用。

首先下载 PHP-7.3.0RC5 源码包并解压。

[code lang=”bash”]cd ~
wget https://downloads.php.net/~cmb/php-7.3.0RC5.tar.gz
tar xzvf php-7.3.0RC5.tar.gz[/code]

然后 configure 进行配置

[code lang=”bash”]./configure ‘–prefix=/usr/local/php’ ‘–exec-prefix=/usr/local/php’ ‘–bindir=/usr/local/php/bin’ ‘–sbindir=/usr/local/php/sbin’ ‘–includedir=/usr/local/php/include’ ‘–libdir=/usr/local/php/lib/php’ ‘–mandir=/usr/local/php/php/man’ ‘–with-config-file-path=/usr/local/php/etc’ ‘–with-mysql-sock=/var/lib/mysql/mysql.sock’ ‘–with-mcrypt=/usr/include’ ‘–with-mhash’ ‘–with-mysqli=shared,mysqlnd’ ‘–with-pdo-mysql’ ‘–with-gd’ ‘–with-iconv’ ‘–with-zlib’ ‘–enable-inline-optimization’ ‘–disable-debug’ ‘–disable-rpath’ ‘–enable-shared’ ‘–enable-xml’ ‘–enable-bcmath’ ‘–enable-shmop’ ‘–enable-sysvsem’ ‘–enable-mbregex’ ‘–enable-mbstring’ ‘–enable-ftp’ ‘–enable-pcntl’ ‘–enable-sockets’ ‘–with-xmlrpc’ ‘–enable-soap’ ‘–with-pear’ ‘–with-gettext’ ‘–enable-session’ ‘–with-curl’ ‘–with-openssl’ ‘–with-jpeg-dir’ ‘–with-freetype-dir’ ‘–with-mysqli’ ‘–enable-fpm’ ‘–with-fpm-user=www’ ‘–with-fpm-group=www’ ‘–with-gdbm’ ‘–enable-fileinfo’ ‘–enable-maintainer-zts'[/code]

然后开始编译,64 是线程数,服务器 CPU 有多少线程就写多少,比如我的 2698 是 32 核 64 线程。

[code lang=”bash”]make ZEND_EXTRA_LIBS=’-liconv’ -j 64[/code]

最后安装即可。

[code lang=”bash”]make install[/code]

然后启动 PHP-FPM(如果你的服务器不是 Nginx 就不用这一步了)

[code lang=”bash”]/usr/local/php/sbin/php-fpm[/code]

大功告成!

PHP 7.3 真香

一条评论

  • SomeBottle

    2018年11月18日

    PHP7.3目前进入稳定阶段了嘛…我还在用php7.2…

    Reply

发表评论

》表情