郑州企业网站制作公司,wordpress页面的模板,it项目外包网,做网站需要学js吗记录在Ubuntu 18.04下源码编译安装 PHP 7.3的过程步骤。0.下载PHP源代码首先需要从PHP官网下载PHP7.3.1的源代码#xff0c;保存为php-7.3.1.tar.xz。http://cn2.php.net/distributions/php-7.3.1.tar.xz在上述文件保存的目录中打开终端#xff0c;使用命令将其解压#xff…记录在Ubuntu 18.04下源码编译安装 PHP 7.3的过程步骤。0.下载PHP源代码首先需要从PHP官网下载PHP7.3.1的源代码保存为php-7.3.1.tar.xz。http://cn2.php.net/distributions/php-7.3.1.tar.xz在上述文件保存的目录中打开终端使用命令将其解压并使用cd进入解压后的目录tar -xvJf ./php-7.3.1.tar.xzcd php-7.3.11.安装依赖其次需要安装一些编译PHP所需要的依赖sudo apt updatesudo apt install gccsudo apt install makesudo apt install opensslsudo apt install curlsudo apt install libbz2-devsudo apt install libxml2-devsudo apt install libjpeg-devsudo apt install libpng-devsudo apt install libfreetype6-devsudo apt install libzip-dev2.配置PHP在编译前需要对PHP进行配置以供其生成对应的makefile文件./configure --prefix/usr/local/php --with-config-file-path/usr/local/php/etc --enable-fpm --with-fpm-userwww --with-fpm-groupwww --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-ftp --with-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --disable-fileinfo --enable-maintainer-zts配置成功后会出现如下字样--------------------------------------------------------------------| License: || This software is subject to the PHP License, available in this || distribution in the file LICENSE. By continuing this installation || process, you are bound by the terms of this license agreement. || If you do not agree with the terms of this license, you must abort || the installation process at this point. |--------------------------------------------------------------------Thank you for using PHP.在这一步中如果出现无法找到某个依赖的情况可以尝试使用sudo apt install来重新安装一下没有找到的依赖。3.编译并安装PHP在完成配置后可以直接使用make来进行编译可以使用参数-j来指定编译线程数量来多线程编译make -j4编译需要一段比较长的时间请稍作等待编译成功后会输出如下内容Build complete.Dont forget to run make test.然后执行以下命令进行安装sudo make install执行完成后PHP将会被安装到/usr/local/php/。4.验证PHP可以使用如下指令来输出PHP的版本来验证是否正确安装/usr/local/php/bin/php -v如果正确安装将会出现如下内容PHP 7.3.1 (cli) (built: Jan 18 2019 20:11:04) ( ZTS )Copyright (c) 1997-2018 The PHP GroupZend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies到这一步为止PHP7.3.1便成功从源代码编译安装了。5.复制php.ini编译安装后的目录并不会有现成的php.ini需要手动复制过去。在解压出来的源代码目录中有供开发环境使用的php.ini-development和供生产环境使用的php.ini-production。输入命令来复制(以开发环境为例)sudo cp php.ini-development /usr/local/php/etc/php.ini