This article mainly shares with you how to install php7.2 on Linux. I hope it can help you. First download the source code of php. The command is as follows
wget http://cn2.php.net/distributions/php-7.2.0.tar.gz
Unzip
tar -zxvf php-7.2.0.tar.gz
Enter the file Folder
and then execute the following command. The installation directory I specified is /web/php72. You must ensure that the directory exists
./configure \ --enable-fpm \ --prefix=/web/php72 \ --with-config-file-path=/web/php71/etc \ --with-curl \ --with-freetype-dir \ --with-gd \ --with-gettext \ --with-iconv-dir \ --with-kerberos \ --with-libdir=lib64 \ --with-libxml-dir \ --with-mysqli \ --with-openssl \ --with-pcre-regex \ --with-pdo-mysql \ --with-pdo-sqlite \ --with-pear \ --with-png-dir \ --with-jpeg-dir\ --with-xmlrpc \ --with-xsl \ --with-zlib \ --enable-fpm \ --enable-bcmath \ --enable-libxml \ --enable-inline-optimization \ --enable-mbregex \ --enable-mbstring \ --enable-opcache \ --enable-pcntl \ --enable-shmop \ --enable-soap \ --enable-sockets \ --enable-sysvsem \ --enable-xml \ --enable-zip
Related recommendations:
CentOS7yum Install PHP7.2 instance method
The most detailed linux installation php process
Linux installation command introduction
The above is the detailed content of How to install php7.2 on linux. For more information, please follow other related articles on the PHP Chinese website!