EverKB

Knowledge Base Ever

Compile e instale o PHP7 no CentOS7

2019-11-12 17:12:45

Etiqueta: CentOS,CentOS7,PHP,PHP7,Compiling PHP, Compilar PHP

Obtenha o código fonte oficial do PHP7, faça o download, descompacte e instale

cd /usr/local/src/
wget https://www.php.net/distributions/php-7.3.7.tar.xz
tar xf php-7.3.7.tar.gz
cd /usr/local/src/php-7.3.7/

./configure
Há muitas opções de compilação aqui, as opções específicas podem ser encontradas na documentação oficial, por exemplo:
./configure --prefix=/usr/local/php73 --with-config-file-path=/usr/local/php73/etc --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-gd --with-iconv --with-zlib --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-pear --with-gettext --enable-session --with-mcrypt --with-curl
Compile, instale e verifique os resultados
make && make install

php -v
PHP 7.3.7 (cli) (built: Jul  3 2019 11:30:22) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.7, Copyright (c) 1998-2018 Zend Technologies

Etiqueta

CentOS7 CentOS PHP Linux Python Python3 MySQL MariaDB YUM JavaScript HTML mysql_native_password PHP7 CSS Redis MySQL8 caching_sha2_password libpython3.7m.so.1.0 PHPStorm ss5-3.8.9 Apache2.4 Elasticsearch NodeJs show VIM CURLOPT_POSTFIELDS Failed to build these modules: _ctypes Minimal ISO substr Bluetooth INTERVAL PECL SQL Date Funcitons Wi-Fi date sub font-size root Tag Cloud CodeIgniter Laravel ss5 apache httpd dual network interfaces horiz-align node.js ShadowsocksR vertical-align CURLFille exec mb_substr PyCharm SUBDATE BarManager IntelliJIDEA PEAR SOCKS5 Proxy Server WebStorm date add find remi Tag Chrome jQuery PHP5.5 src Apache du hide nginx Shadowsocks-Python V2Ray cURL eth0 MariaDB10.4 PostgreSQL sub folder availability Install MongoDB pdo_sqlsrv SOCKS5 Web Server date File Upload mssql-tools register_shutdown_function Symfony JetBrain php-fpm sqlsrv Zend Framework ADDDATE DevExpress height network interface Shadowsocks-Libev unixODBC-devel error_get_last Port 80 string Aura INDENTIFIED BY password policy requirements SOCKS Web Development data Fedora Media Writer msodbcsql Redis5 SVN jemalloc SQLAlchemy absolute Deepin FuelPHP mysqlclient Shadowsocks toggle convert Error Control Operator margin PHPUnit Framework ss5.passwd at-symbol IIS password SOCKET vps daemon process Fatal Errors MongoDB4 sudoers center Phalcon SQL Server 2017 WiFi .htaccess DATE_SUB frequency conflict set_error_handler TestCase Compiling PHP PHPUnit ss5.conf apr Elasticsearch7.3 HTTP particles.js Slim Vincent Garreau daemon Failed to build these modules: _uuid MongoDB Sudo ip command pg_bha.conf SQL Server width DATE_ADD Frameworks MySQL-python scrollbar Tcp BBR Compiling Apache