记-centos安装php7
1、wget https://www.php.net/downloads/php-7.4.4.tar.gz
2.tar -zvxf php-7.4.4.tar.gz
3、cd php-7.4.4.tar.gz
4、./configure
--prefix=/usr/local/php
--with-config-file-path=/usr/local/php
--enable-mbstring
--enable-ftp
--with-gd
--with-jpeg-dir=/usr
--with-png-dir=/usr
--with-mysql=mysqlnd
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--without-pear
--disable-phar
--enable-sockets
--with-freetype-dir=/usr
--with-zlib
--with-libxml-dir=/usr
--with-xmlrpc
--enable-zip
--enable-fpm
--enable-xml
--enable-sockets
--with-gd
--with-zlib
--with-iconv
--enable-zip
--with-freetype-dir=/usr/lib/
--enable-soap
--enable-pcntl
--enable-cli
--with-curl
编译后会出现各种 No package ‘XXXX’ found
不要往后make ,把编译通过后再make
5、make
6、make install
7、vi /etc/profile ------> 在文件末尾加上PATH=$PATH:/usr/local/php/bin export PATH(设置环境变量)
8、source /etc/profile
9、php -v 查看安装php版本