1.最小化安装centos7.6
yum update -y yum install -y vim wget cmake gcc gcc-c++ autoconf pcre-devel libxml2-devel //openssl openssl openssl-devel //composer git //bz2 bzip2 bzip2-devel //gd libpng libpng-devel //curl curl-devel //gd gd gd-devel freetype //xsl libxslt ./configure make make install
yum -y install libxml2 yum -y install libxml2-devel yum -y install openssl yum -y install openssl-devel yum -y install curl-devel yum -y install libjpeg-devel yum -y install libpng-devel yum -y install freetype-devel yum -y install bzip2-devel yum -y install libmcrypt libmcrypt-devel yum -y install postgresql-devel yum -y install aspell-devel yum -y install readline-devel yum -y install libxslt-devel yum -y install net-snmp-devel yum -y install unixODBC-devel yum -y install libicu-devel yum -y install libc-client-devel yum -y install libXpm-devel yum -y install libvpx-devel yum -y install enchant-devel yum -y install openldap yum -y install openldap-devel yum -y install db4-devel yum -y install gmp-devel yum -y install sqlite-devel yum -y install mysql-devel
yum -y install libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel bzip2-devel libmcrypt libmcrypt-devel postgresql-devel aspell-devel readline-devel libxslt-devel net-snmp-devel unixODBC-devel libicu-devel libc-client-devel libXpm-devel libvpx-devel enchant-devel openldap openldap-devel db4-devel gmp-devel sqlite-devel mysql-devel
2.
//查看配置信息 php -ini //查看使用的php.ini配置文件 php -ini |grep 'Configuration File' //查看模块 php -m //查看拓展详情 php --ri mysqli
3.
如果编译拓展错误,需要配置环境重新编译
make clean 安装jpeg http://www.ijg.org/ ./configure --prefix=/usr/local/jpeg --enable-shared --enable-static make && make install
3.配置php.ini php-fpm.conf
本文为看恩吧原创文章,转载无需和我联系,但请注明来自knsay.com