1. 安装依赖包: ```shell yum -y install wget vim pcre pcre-devel openssl openssl-devel \ libicu-devel gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng \ libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib \ zlib-devel glibc glibc-devel glib2 glib2-devel ncurses ncurses-devel \ curl curl-devel krb5-devel libidn libidn-devel openldap openldap-devel \ nss_ldap jemalloc-devel cmake boost-devel bison automake libevent \ libevent-devel gd gd-devel libtool* libmcrypt libmcrypt-devel mcrypt \ mhash libxslt libxslt-devel readline readline-devel gmp gmp-devel \ libcurl libcurl-devel openjpeg-devel libcurl.x86_64 libcurl-devel.x86_64 \ libjpeg-turbo libjpeg-turbo-devel libpng freetype libpng-devel \ freetype-devel icu libicu libicu-devel openldap openldap-clients \ openldap-devel openldap-servers

    cp -frp /usr/lib64/libldap* /usr/lib/

    1. 2. **解压、编译、安装**
    2. ```shell
    3. tar zxvf php-7.2.6.tar.gz
    4. cd php-7.2.6
    5. ./configure --prefix=/usr/local/server/php \
    6. --with-apxs2=/usr/local/server/apache/bin/apxs \
    7. --with-config-file-path=/usr/local/server/php \
    8. --enable-fpm \
    9. --with-fpm-user=www \
    10. --with-fpm-group=www \
    11. --enable-mysqlnd \
    12. --with-mysqli=mysqlnd \
    13. --with-pdo-mysql=mysqlnd \
    14. --enable-mysqlnd-compression-support \
    15. --with-iconv-dir \
    16. --with-freetype-dir \
    17. --with-jpeg-dir \
    18. --with-png-dir \
    19. --with-zlib \
    20. --with-libxml-dir \
    21. --enable-xml \
    22. --disable-rpath \
    23. --enable-bcmath \
    24. --enable-shmop \
    25. --enable-sysvsem \
    26. --enable-inline-optimization \
    27. --with-curl \
    28. --enable-mbregex \
    29. --enable-mbstring \
    30. --enable-intl \
    31. --with-libmbfl \
    32. --enable-ftp \
    33. --with-gd \
    34. --with-openssl \
    35. --with-mhash \
    36. --enable-pcntl \
    37. --enable-sockets \
    38. --with-xmlrpc \
    39. --enable-zip \
    40. --enable-soap \
    41. --with-gettext \
    42. --enable-fileinfo \
    43. --enable-opcache \
    44. --with-pear \
    45. --enable-maintainer-zts \
    46. --with-ldap=shared \
    47. --without-gdbm
    48. make && make install