1. 源码包

    1. cp oneinstack/src/php-7.2.19.tar.gz /usr/loccal/src
  2. 编译安装

    1. ./configure \
    2. --prefix=/usr/local/php-7.2 \
    3. --exec-prefix=/usr/local/php-7.2 \
    4. --bindir=/usr/local/php-7.2/bin \
    5. --sbindir=/usr/local/php-7.2/sbin \
    6. --includedir=/usr/local/php-7.2/include \
    7. --libdir=/usr/local/php-7.2/lib/php \
    8. --mandir=/usr/local/php-7.2/php/man \
    9. --enable-zip \
    10. --enable-pdo \
    11. --enable-inline-optimization \
    12. --enable-shared \
    13. --enable-xml \
    14. --enable-bcmath \
    15. --enable-shmop \
    16. --enable-sysvsem \
    17. --enable-mbregex \
    18. --enable-mbstring \
    19. --enable-ftp \
    20. --enable-pcntl \
    21. --enable-sockets \
    22. --enable-fileinfo \
    23. --enable-filter \
    24. --enable-soap \
    25. --enable-session \
    26. --enable-fpm \
    27. --disable-debug \
    28. --disable-rpath \
    29. --with-config-file-path=/usr/local/php-7.2/etc \
    30. --with-mysql-sock=/tmp/mysql.sock \
    31. --with-mhash \
    32. --with-openssl \
    33. --with-mysqli=mysqlnd \
    34. --with-pdo-mysql=mysqlnd \
    35. --with-iconv=/usr/local/libiconv
    36. --with-zlib \
    37. --with-xmlrpc \
    38. --with-gettext \
    39. --with-curl \
    40. --with-jpeg-dir \
    41. --with-freetype-dir \
    42. --with-fpm-user=php \
    43. --with-fpm-group=php \
    44. --with-pear=/usr/local/php-7.2/bin
  3. 配置文件 ```

    php.ini,注意内容修改

    cp /usr/local/src/php-7.2.19/php.ini-development /usr/local/php-7.2/etc/php.ini

php-fpm.conf,注意内容修改

把oneinstack中的php-fpm.conf拷贝到php-fpm.conf

cp php-fpm.conf.default php-fpm.conf ```