{"id":331,"date":"2020-07-28T13:44:23","date_gmt":"2020-07-28T05:44:23","guid":{"rendered":"http:\/\/b.yesiyu.top\/?p=331"},"modified":"2020-07-28T13:46:05","modified_gmt":"2020-07-28T05:46:05","slug":"centos-8-x%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85nginx1-16-xmysql8-0-xphp7-4-x-7-3-x-7-2-x-7-1-x-7-0-x-5-6-x-5-5-x-5-3-x-%e5%a4%9a%e7%89%88%e6%9c%ac%e5%85%a8%e8%83%bd%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"https:\/\/b.yesiyu.top\/?p=331","title":{"rendered":"CentOS 8.x\u7f16\u8bd1\u5b89\u88c5Nginx1.16.x+MySQL8.0.x+PHP7.4.x 7.3.x 7.2.x 7.1.x 7.0.x 5.6.x 5.5.x 5.3.x \u591a\u7248\u672c\u5168\u80fd\u73af\u5883"},"content":{"rendered":"\n<p>CentOS 8.x\u7f16\u8bd1\u5b89\u88c5Nginx1.16.x+MySQL8.0.x+PHP7.4.x 7.3.x 7.2.x 7.1.x 7.0.x 5.6.x 5.5.x 5.3.x \u591a\u7248\u672c\u5168\u80fd\u73af\u5883 | \u7cfb\u7edf\u8fd0\u7ef4<\/p>\n\n\n\n<p><strong>\u51c6\u5907\u7bc7<\/strong><\/p>\n\n\n\n<p>\u4e00\u3001\u9632\u706b\u5899\u914d\u7f6e<\/p>\n\n\n\n<p>CentOS 8.x\u9ed8\u8ba4\u4f7f\u7528\u7684\u662ffirewall\u4f5c\u4e3a\u9632\u706b\u5899\uff0c\u8fd9\u91cc\u6539\u4e3aiptables\u9632\u706b\u5899\u3002<\/p>\n\n\n\n<p>1\u3001\u5173\u95edfirewall\uff1a<\/p>\n\n\n\n<p>systemctl stop firewalld.service #\u505c\u6b62firewall<\/p>\n\n\n\n<p>systemctl disable firewalld.service #\u7981\u6b62firewall\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>systemctl mask firewalld<\/p>\n\n\n\n<p>systemctl stop firewalld<\/p>\n\n\n\n<p>yum remove firewalld<\/p>\n\n\n\n<p>2\u3001\u5b89\u88c5iptables\u9632\u706b\u5899<\/p>\n\n\n\n<p>yum install iptables-services #\u5b89\u88c5<\/p>\n\n\n\n<p>vi \/etc\/sysconfig\/iptables #\u7f16\u8f91\u9632\u706b\u5899\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p># sample configuration for iptables service<\/p>\n\n\n\n<p># you can edit this manually or use system-config-firewall<\/p>\n\n\n\n<p># please do not ask us to add additional ports\/services to this default configuration<\/p>\n\n\n\n<p>*filter<\/p>\n\n\n\n<p>:INPUT ACCEPT [0:0]<\/p>\n\n\n\n<p>:FORWARD ACCEPT [0:0]<\/p>\n\n\n\n<p>:OUTPUT ACCEPT [0:0]<\/p>\n\n\n\n<p>-A INPUT -m state &#8211;state RELATED,ESTABLISHED -j ACCEPT<\/p>\n\n\n\n<p>-A INPUT -p icmp -j ACCEPT<\/p>\n\n\n\n<p>-A INPUT -i lo -j ACCEPT<\/p>\n\n\n\n<p>-A INPUT -p tcp -m state &#8211;state NEW -m tcp &#8211;dport 22 -j ACCEPT<\/p>\n\n\n\n<p>-A INPUT -p tcp -m state &#8211;state NEW -m tcp &#8211;dport 80 -j ACCEPT<\/p>\n\n\n\n<p>-A INPUT -p tcp -m state &#8211;state NEW -m tcp &#8211;dport 443 -j ACCEPT<\/p>\n\n\n\n<p>-A INPUT -p tcp -m state &#8211;state NEW -m tcp &#8211;dport 3306 -j ACCEPT<\/p>\n\n\n\n<p>-A INPUT -j REJECT &#8211;reject-with icmp-host-prohibited<\/p>\n\n\n\n<p>-A FORWARD -j REJECT &#8211;reject-with icmp-host-prohibited<\/p>\n\n\n\n<p>COMMIT<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>systemctl restart iptables.service #\u6700\u540e\u91cd\u542f\u9632\u706b\u5899\u4f7f\u914d\u7f6e\u751f\u6548<\/p>\n\n\n\n<p>systemctl enable iptables.service #\u8bbe\u7f6e\u9632\u706b\u5899\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>\/usr\/libexec\/iptables\/iptables.init restart #\u91cd\u542f\u9632\u706b\u5899<\/p>\n\n\n\n<p>\u4e8c\u3001\u5173\u95edSELINUX<\/p>\n\n\n\n<p>vi \/etc\/selinux\/config<\/p>\n\n\n\n<p>#SELINUX=enforcing #\u6ce8\u91ca\u6389<\/p>\n\n\n\n<p>#SELINUXTYPE=targeted #\u6ce8\u91ca\u6389<\/p>\n\n\n\n<p>SELINUX=disabled #\u589e\u52a0<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>setenforce 0 #\u4f7f\u914d\u7f6e\u7acb\u5373\u751f\u6548<\/p>\n\n\n\n<p>\u4e09 \u3001\u7cfb\u7edf\u7ea6\u5b9a<\/p>\n\n\n\n<p>\u8f6f\u4ef6\u6e90\u4ee3\u7801\u5305\u5b58\u653e\u4f4d\u7f6e\uff1a\/usr\/local\/src<\/p>\n\n\n\n<p>\u6e90\u7801\u5305\u7f16\u8bd1\u5b89\u88c5\u4f4d\u7f6e\uff1a\/usr\/local\/\u8f6f\u4ef6\u540d\u5b57<\/p>\n\n\n\n<p>\u56db\u3001\u4e0b\u8f7d\u8f6f\u4ef6\u5305<\/p>\n\n\n\n<p>1\u3001\u4e0b\u8f7dnginx<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/nginx.org\/download\/nginx-1.16.1.tar.gz\n<\/div><\/figure>\n\n\n\n<p>2\u3001\u4e0b\u8f7dMySQL<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/mirrors.sohu.com\/mysql\/MySQL-8.0\/mysql-8.0.19.tar.gz\n<\/div><\/figure>\n\n\n\n<p>3\u3001\u4e0b\u8f7dphp<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/mirrors.sohu.com\/php\/php-7.4.4.tar.gz\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/mirrors.sohu.com\/php\/php-7.3.16.tar.gz\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/mirrors.sohu.com\/php\/php-7.2.29.tar.gz\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/mirrors.sohu.com\/php\/php-7.1.33.tar.gz\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/mirrors.sohu.com\/php\/php-7.0.33.tar.gz\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/mirrors.sohu.com\/php\/php-5.6.40.tar.gz\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/mirrors.sohu.com\/php\/php-5.5.38.tar.gz\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/mirrors.sohu.com\/php\/php-5.4.45.tar.gz\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/mirrors.sohu.com\/php\/php-5.3.29.tar.gz\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/museum.php.net\/php5\/php-5.2.17.tar.gz\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/php-fpm.org\/downloads\/php-5.2.17-fpm-0.5.14.diff.gz\n<\/div><\/figure>\n\n\n\n<p>4\u3001\u4e0b\u8f7dcmake\uff08MySQL\u7f16\u8bd1\u5de5\u5177\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/github.com\/Kitware\/CMake\/releases\/download\/v3.15.4\/cmake-3.15.4.tar.gz\n<\/div><\/figure>\n\n\n\n<p>5\u3001\u4e0b\u8f7dpcre \uff08\u652f\u6301nginx\u4f2a\u9759\u6001\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/ftp.pcre.org\/pub\/pcre\/pcre-8.44.tar.gz\n<\/div><\/figure>\n\n\n\n<p>6\u3001\u4e0b\u8f7dopenssl\uff08nginx\u6269\u5c55\uff09<\/p>\n\n\n\n<p>6.1\u4e0b\u8f7d\u6700\u65b0\u7a33\u5b9a\u7248\u672c\uff0c\u9002\u7528\u4e8enginx\u6269\u5c55https<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/www.openssl.org\/source\/openssl-1.1.1e.tar.gz\n<\/div><\/figure>\n\n\n\n<p>6.2\u4e0b\u8f7d\u65e7\u7248\u672c\uff0c\u9002\u7528\u4e8ephp5.6.x\u53ca\u5176\u4ee5\u4e0b\u7248\u672c\u7f16\u8bd1\u5b89\u88c5openssl\u6269\u5c55<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/www.openssl.org\/source\/old\/1.0.2\/openssl-1.0.2k.tar.gz\n<\/div><\/figure>\n\n\n\n<p>7\u3001\u4e0b\u8f7dzlib\uff08nginx\u6269\u5c55\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/www.zlib.net\/zlib-1.2.11.tar.gz\n<\/div><\/figure>\n\n\n\n<p>8\u3001\u4e0b\u8f7dlibmcrypt\uff08php\u6269\u5c55\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/nchc.dl.sourceforge.net\/project\/mcrypt\/Libmcrypt\/2.5.8\/libmcrypt-2.5.8.tar.gz\n<\/div><\/figure>\n\n\n\n<p>9\u3001\u4e0b\u8f7dyasm\uff08php\u6269\u5c55\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/www.tortall.net\/projects\/yasm\/releases\/yasm-1.3.0.tar.gz\n<\/div><\/figure>\n\n\n\n<p>10\u3001t1lib\uff08php\u6269\u5c55\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/download.freenas.org\/distfiles\/t1lib-5.1.2.tar.gz\n<\/div><\/figure>\n\n\n\n<p>11\u3001\u4e0b\u8f7dgd\u5e93\u5b89\u88c5\u5305<\/p>\n\n\n\n<p>11.1\u9002\u7528\u4e8ephp 5.4.x\u53ca\u5176\u4ee5\u4e0a\u7248\u672c<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/github.com\/libgd\/libgd\/releases\/download\/gd-2.3.0\/libgd-2.3.0.tar.gz\n<\/div><\/figure>\n\n\n\n<p>11.2\u9002\u7528\u4e8e php 5.3.x 5.2.x\u7248\u672c<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/jaist.dl.sourceforge.net\/project\/gd2\/gd-2.0.35.tar.gz\n<\/div><\/figure>\n\n\n\n<p>12\u3001libvpx\uff08gd\u5e93\u9700\u8981\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/github.com\/webmproject\/libvpx\/archive\/v1.8.2\/libvpx-1.8.2.tar.gz\n<\/div><\/figure>\n\n\n\n<p>13\u3001tiff\uff08gd\u5e93\u9700\u8981\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/download.osgeo.org\/libtiff\/tiff-4.0.7.tar.gz\n<\/div><\/figure>\n\n\n\n<p>14\u3001libpng\uff08gd\u5e93\u9700\u8981\uff09<\/p>\n\n\n\n<p>ftp:\/\/ftp.simplesystems.org\/pub\/libpng\/png\/src\/libpng16\/libpng-1.6.37.tar.gz<\/p>\n\n\n\n<p>15\u3001freetype\uff08gd\u5e93\u9700\u8981\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/download.savannah.gnu.org\/releases\/freetype\/freetype-2.10.1.tar.gz\n<\/div><\/figure>\n\n\n\n<p>16\u3001jpegsrc\uff08gd\u5e93\u9700\u8981\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/distfiles.macports.org\/jpeg\/jpegsrc.v9d.tar.gz\n<\/div><\/figure>\n\n\n\n<p>17\u3001Boost\uff08\u7f16\u8bd1mysql\u9700\u8981\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/dl.bintray.com\/boostorg\/release\/1.70.0\/source\/boost_1_70_0.tar.gz\n<\/div><\/figure>\n\n\n\n<p>18\u3001libzip\uff08\u7f16\u8bd1php\u9700\u8981\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/libzip.org\/download\/libzip-1.2.0.tar.gz\n<\/div><\/figure>\n\n\n\n<p>19\u3001rpcsvc-proto\uff08\u7f16\u8bd1MySQL\u9700\u8981\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/github.com\/thkukuk\/rpcsvc-proto\/releases\/download\/v1.4\/rpcsvc-proto-1.4.tar.gz\n<\/div><\/figure>\n\n\n\n<p>20\u3001oniguruma\uff08\u7f16\u8bd1\u5b89\u88c5php7.4.x\u9700\u8981\uff09<\/p>\n\n\n\n<p>https:\/\/github.com\/kkos\/oniguruma\/archive\/v6.9.4.tar.gz -O oniguruma-6.9.4.tar.gz<\/p>\n\n\n\n<p>21\u3001curl\u5e93\uff08\u7f16\u8bd1php\u9700\u8981\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/curl.haxx.se\/download\/curl-7.29.0.tar.gz\n<\/div><\/figure>\n\n\n\n<p>\u4e94\u3001\u5b89\u88c5\u7f16\u8bd1\u5de5\u5177\u53ca\u5e93\u6587\u4ef6\uff08\u4f7f\u7528yum\u547d\u4ee4\u5b89\u88c5\uff09<\/p>\n\n\n\n<p>yum install apr* autoconf automake bison bzip2 bzip2* cpp curl curl-devel fontconfig fontconfig-devel freetype-devel gcc gcc-c++ gd gd-devel gettext gettext-devel glibc kernel kernel-headers keyutils keyutils-libs-devel krb5-devel libcom_err-devel libpng libpng-devel libjpeg* libsepol-devel libselinux-devel libstdc++-devel libtool* libgomp libxml2 libxml2-devel libXpm* libxml* libXaw-devel libXmu-devel libtiff libtiff* make openssl openssl-devel patch pcre-devel perl php-common php-gd policycoreutils telnet wget zlib-devel ncurses-devel libtirpc-devel gtk* ntpstat bison* sqlite-devel oniguruma libzip-devel<\/p>\n\n\n\n<p><strong>\u5b89\u88c5\u7bc7<\/strong><\/p>\n\n\n\n<p>\u4ee5\u4e0b\u662f\u7528putty\u5de5\u5177\u8fdc\u7a0b\u767b\u5f55\u5230\u670d\u52a1\u5668\uff0c\u5728\u547d\u4ee4\u884c\u4e0b\u9762\u64cd\u4f5c\u7684<\/p>\n\n\n\n<p>\u4e00\u3001\u5b89\u88c5MySQL<\/p>\n\n\n\n<p>1\u3001\u5b89\u88c5rpcsvc-proto<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar zxvf rpcsvc-proto-1.4.tar.gz<\/p>\n\n\n\n<p>cd rpcsvc-proto-1.4<\/p>\n\n\n\n<p>.\/configure<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>2\u3001\u5b89\u88c5cmake<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar zxvf cmake-3.15.4.tar.gz<\/p>\n\n\n\n<p>cd cmake-3.15.4<\/p>\n\n\n\n<p>.\/configure<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>3\u3001\u5b89\u88c5MySQL<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>mkdir -p \/usr\/local\/boost<\/p>\n\n\n\n<p>cp boost_1_70_0.tar.gz \/usr\/local\/boost<\/p>\n\n\n\n<p>groupadd mysql #\u6dfb\u52a0mysql\u7ec4<\/p>\n\n\n\n<p>useradd -g mysql mysql -s \/bin\/false #\u521b\u5efa\u7528\u6237mysql\u5e76\u52a0\u5165\u5230mysql\u7ec4\uff0c\u4e0d\u5141\u8bb8mysql\u7528\u6237\u76f4\u63a5\u767b\u5f55\u7cfb\u7edf<\/p>\n\n\n\n<p>mkdir -p \/data\/mysql #\u521b\u5efaMySQL\u6570\u636e\u5e93\u5b58\u653e\u76ee\u5f55<\/p>\n\n\n\n<p>chown -R mysql:mysql \/data\/mysql #\u8bbe\u7f6eMySQL\u6570\u636e\u5e93\u5b58\u653e\u76ee\u5f55\u6743\u9650<\/p>\n\n\n\n<p>mkdir -p \/usr\/local\/mysql #\u521b\u5efaMySQL\u5b89\u88c5\u76ee\u5f55<\/p>\n\n\n\n<p>cd \/usr\/local\/src #\u8fdb\u5165\u8f6f\u4ef6\u5305\u5b58\u653e\u76ee\u5f55<\/p>\n\n\n\n<p>tar zxvf mysql-8.0.19.tar.gz #\u89e3\u538b<\/p>\n\n\n\n<p>cd mysql-8.0.19 #\u8fdb\u5165\u76ee\u5f55<\/p>\n\n\n\n<p>cmake . -DCMAKE_INSTALL_PREFIX=\/usr\/local\/mysql -DINSTALL_DATADIR=\/data\/mysql -DMYSQL_USER=mysql -DMYSQL_UNIX_ADDR=\/tmp\/mysqld.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_EMBEDDED_SERVER=1 -DFORCE_INSOURCE_BUILD=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all -DWITH_BOOST=\/usr\/local\/boost<\/p>\n\n\n\n<p>make #\u7f16\u8bd1<\/p>\n\n\n\n<p>make install #\u5b89\u88c5<\/p>\n\n\n\n<p>\u7f16\u8bd1\u51fa\u9519, \u91cd\u65b0\u7f16\u8bd1\u524d\u8981\u5220\u9664\u7f16\u8bd1\u5931\u8d25\u7684\u6587\u4ef6\uff0c\u91cd\u65b0\u7f16\u8bd1\u65f6\uff0c\u9700\u8981\u6e05\u9664\u65e7\u7684\u5bf9\u8c61\u6587\u4ef6\u548c\u7f13\u5b58\u4fe1\u606f\u3002<\/p>\n\n\n\n<p>make clean<\/p>\n\n\n\n<p>rm -f CMakeCache.txt<\/p>\n\n\n\n<p>rm -rf \/etc\/my.cnf #\u5220\u9664\u7cfb\u7edf\u9ed8\u8ba4\u7684\u914d\u7f6e\u6587\u4ef6\uff08\u5982\u679c\u9ed8\u8ba4\u6ca1\u6709\u5c31\u4e0d\u7528\u5220\u9664\uff09<\/p>\n\n\n\n<p>cd \/usr\/local\/mysql #\u8fdb\u5165MySQL\u5b89\u88c5\u76ee\u5f55<\/p>\n\n\n\n<p>.\/bin\/mysqld &#8211;user=mysql &#8211;initialize &#8211;basedir=\/usr\/local\/mysql &#8211;datadir=\/data\/mysql #\u751f\u6210mysql\u7cfb\u7edf\u6570\u636e\u5e93<\/p>\n\n\n\n<p>&#8211;initialize\u8868\u793a\u9ed8\u8ba4\u751f\u6210\u5bc6\u7801, &#8211;initialize-insecure \u8868\u793a\u4e0d\u751f\u6210\u5bc6\u7801, \u5bc6\u7801\u4e3a\u7a7a\u3002<\/p>\n\n\n\n<p>\u770b\u5230\u8fd9\u4e00\u884c[Note] [MY-010454] [Server] A temporary password is generated for root@localhost: LZrRpp40AG*-<\/p>\n\n\n\n<p>\u8bb0\u5f55\u4e0b\u81ea\u52a8\u751f\u6210\u7684mysql\u7ba1\u7406\u5458root\u8d26\u53f7\u767b\u5f55\u5bc6\u7801LZrRpp40AG*-<\/p>\n\n\n\n<p>vi \/usr\/local\/mysql\/my.cnf #mysql 8.0.x\u9ed8\u8ba4\u6ca1\u6709\u914d\u7f6e\u6587\u4ef6\uff0c\u6211\u4eec\u81ea\u5df1\u521b\u5efa\u4e00\u4e2a\u3002<\/p>\n\n\n\n<p>[client]<\/p>\n\n\n\n<p>port=3306<\/p>\n\n\n\n<p>socket=\/tmp\/mysql.sock<\/p>\n\n\n\n<p>[mysqld]<\/p>\n\n\n\n<p>port=3306<\/p>\n\n\n\n<p>user = mysql<\/p>\n\n\n\n<p>socket=\/tmp\/mysql.sock<\/p>\n\n\n\n<p>tmpdir = \/tmp<\/p>\n\n\n\n<p>key_buffer_size=16M<\/p>\n\n\n\n<p>max_allowed_packet=128M<\/p>\n\n\n\n<p>default_authentication_plugin=mysql_native_password #\u8bbe\u7f6e\u52a0\u5bc6\u65b9\u5f0f\u4e3amysql_native_password\uff0cMySQL 8.0.x\u9ed8\u8ba4\u4f7f\u7528caching_sha2_password\u52a0\u5bc6\u3002<\/p>\n\n\n\n<p>open_files_limit = 60000<\/p>\n\n\n\n<p>explicit_defaults_for_timestamp<\/p>\n\n\n\n<p>server-id = 1<\/p>\n\n\n\n<p>character-set-server = utf8<\/p>\n\n\n\n<p>federated<\/p>\n\n\n\n<p>max_connections = 1000<\/p>\n\n\n\n<p>max_connect_errors = 100000<\/p>\n\n\n\n<p>interactive_timeout = 86400<\/p>\n\n\n\n<p>wait_timeout = 86400<\/p>\n\n\n\n<p>sync_binlog=0<\/p>\n\n\n\n<p>back_log=100<\/p>\n\n\n\n<p>default-storage-engine = InnoDB<\/p>\n\n\n\n<p>log_slave_updates = 1<\/p>\n\n\n\n<p>[mysqldump]<\/p>\n\n\n\n<p>quick<\/p>\n\n\n\n<p>[client]<\/p>\n\n\n\n<p># The following password will be sent to all standard MySQL clients<\/p>\n\n\n\n<p>password=&#8221;my password&#8221;<\/p>\n\n\n\n<p>[mysqld-8.0]<\/p>\n\n\n\n<p>sql_mode=TRADITIONAL<\/p>\n\n\n\n<p>[mysqladmin]<\/p>\n\n\n\n<p>force<\/p>\n\n\n\n<p>[mysqld]<\/p>\n\n\n\n<p>key_buffer_size=16M<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>ln -s \/usr\/local\/mysql\/my.cnf \/etc\/my.cnf #\u6dfb\u52a0\u5230\/etc\u76ee\u5f55\u7684\u8f6f\u8fde\u63a5<\/p>\n\n\n\n<p>cp \/usr\/local\/mysql\/support-files\/mysql.server \/etc\/rc.d\/init.d\/mysqld #\u628aMysql\u52a0\u5165\u7cfb\u7edf\u542f\u52a8<\/p>\n\n\n\n<p>chmod 755 \/etc\/init.d\/mysqld #\u589e\u52a0\u6267\u884c\u6743\u9650<\/p>\n\n\n\n<p>chkconfig mysqld on #\u52a0\u5165\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>vi \/etc\/rc.d\/init.d\/mysqld #\u7f16\u8f91<\/p>\n\n\n\n<p>basedir=\/usr\/local\/mysql #MySQL\u7a0b\u5e8f\u5b89\u88c5\u8def\u5f84<\/p>\n\n\n\n<p>datadir=\/data\/mysql #MySQl\u6570\u636e\u5e93\u5b58\u653e\u76ee\u5f55<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>service mysqld start #\u542f\u52a8<\/p>\n\n\n\n<p>vi \/etc\/profile #\u628amysql\u670d\u52a1\u52a0\u5165\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\uff1a\u5728\u6700\u540e\u6dfb\u52a0\u4e0b\u9762\u8fd9\u4e00\u884c<\/p>\n\n\n\n<p>export PATH=$PATH:\/usr\/local\/mysql\/bin<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>source \/etc\/profile #\u4f7f\u914d\u7f6e\u7acb\u523b\u751f\u6548<\/p>\n\n\n\n<p>\u4e0b\u9762\u8fd9\u4e24\u884c\u628amyslq\u7684\u5e93\u6587\u4ef6\u94fe\u63a5\u5230\u7cfb\u7edf\u9ed8\u8ba4\u7684\u4f4d\u7f6e\uff0c\u8fd9\u6837\u4f60\u5728\u7f16\u8bd1\u7c7b\u4f3cPHP\u7b49\u8f6f\u4ef6\u65f6\u53ef\u4ee5\u4e0d\u7528\u6307\u5b9amysql\u7684\u5e93\u6587\u4ef6\u5730\u5740\u3002<\/p>\n\n\n\n<p>ln -s \/usr\/local\/mysql\/lib\/mysql \/usr\/lib\/mysql<\/p>\n\n\n\n<p>ln -s \/usr\/local\/mysql\/include\/mysql \/usr\/include\/mysql<\/p>\n\n\n\n<p>mkdir \/var\/lib\/mysql #\u521b\u5efa\u76ee\u5f55<\/p>\n\n\n\n<p>ln -s \/tmp\/mysql.sock \/var\/lib\/mysql\/mysql.sock #\u6dfb\u52a0\u8f6f\u94fe\u63a5<\/p>\n\n\n\n<p>mysql -u root -p #\u8f93\u5165\u4e4b\u524d\u751f\u6210\u7684\u5bc6\u7801LZrRpp40AG*-\u56de\u8f66<\/p>\n\n\n\n<p>ALTER USER &#8216;root&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;123456&#8217; PASSWORD EXPIRE NEVER; #\u4fee\u6539\u5bc6\u7801\uff0cNEVER\u8868\u793a\u5bc6\u7801\u6c38\u4e0d\u8fc7\u671f<\/p>\n\n\n\n<p>ALTER USER &#8216;root&#8217;@&#8217;localhost&#8217; IDENTIFIED WITH mysql_native_password BY &#8216;123456&#8217; PASSWORD EXPIRE NEVER; #\u4f7f\u7528WITH mysql_native_password\u52a0\u5bc6<\/p>\n\n\n\n<p>#MySQL 8.0.x\u52a0\u5bc6\u65b9\u5f0f\u4ecemysql_native_password \u66f4\u6539\u4e3a caching_sha2_password\uff0cmysql8.0.x\u4e4b\u524d\u7684\u5ba2\u6237\u7aef\u8fdc\u7a0b\u8fde\u63a5\u53ef\u80fd\u62a5\u9519\uff1aauthentication plugin caching_sha2<\/p>\n\n\n\n<p>flush privileges; #\u5237\u65b0\u7cfb\u7edf\u6388\u6743\u8868<\/p>\n\n\n\n<p>exit #\u9000\u51famysql\u63a7\u5236\u53f0<\/p>\n\n\n\n<p>4\u3001\u521b\u5efaMySQL\u6570\u636e\u5e93\u3001\u6dfb\u52a0\u7528\u6237\u5e76\u6388\u6743<\/p>\n\n\n\n<p>\u6570\u636e\u5e93\u540d\u79f0\uff1awww.osyunwei.com<\/p>\n\n\n\n<p>\u6570\u636e\u5e93\u7528\u6237\u540d\uff1aosyunwei.com<\/p>\n\n\n\n<p>\u6570\u636e\u5e93\u5bc6\u7801\uff1aosyunwei<\/p>\n\n\n\n<p>\u6388\u6743osyunwei.com\u7528\u6237\u5bf9www.osyunwei.com\u5177\u6709\u5168\u90e8\u64cd\u4f5c\u6743\u9650<\/p>\n\n\n\n<p>\u7ee7\u7eed\u5728mysql\u63a7\u5236\u53f0\u64cd\u4f5c<\/p>\n\n\n\n<p>mysql -u root -p #\u8f93\u5165\u521a\u521a\u4fee\u6539\u8fc7\u7684\u5bc6\u7801123456\uff0c\u56de\u8f66<\/p>\n\n\n\n<p>4.1\u3001Create DATABASE IF NOT EXISTS www.osyunwei.com default charset utf8 COLLATE utf8_general_ci; #\u521b\u5efa\u6570\u636e\u5e93<\/p>\n\n\n\n<p>4.2\u3001CREATE USER &#8216;osyunwei.com&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;osyunwei&#8217;; #\u521b\u5efa\u7528\u6237<\/p>\n\n\n\n<p>CREATE USER &#8216;osyunwei.com&#8217;@&#8217;127.0.0.1&#8217; IDENTIFIED WITH mysql_native_password BY &#8216;osyunwei&#8217;; #\u52a0\u5bc6\u65b9\u5f0f\u4e3amysql_native_password<\/p>\n\n\n\n<p>4.3\u3001grant all privileges on www.osyunwei.com.* to &#8216;osyunwei.com&#8217;@&#8217;localhost&#8217;; #\u6388\u6743\u7528\u6237osyunwei.com\u5bf9\u6570\u636e\u5e93www.osyunwei.com\u5177\u6709\u5168\u90e8\u64cd\u4f5c\u6743\u9650<\/p>\n\n\n\n<p>grant all privileges on www.osyunwei.com.* to &#8216;osyunwei.com&#8217;@&#8217;127.0.0.1&#8217;; #\u6388\u6743\u7528\u6237<\/p>\n\n\n\n<p>GRANT ALL PRIVILEGES ON *.* TO &#8216;root&#8217;@&#8217;localhost&#8217; WITH GRANT OPTION; #\u6388\u6743root\u7528\u6237\u5177\u6709\u5168\u90e8\u6570\u636e\u5e93\u672c\u5730\u6743\u9650<\/p>\n\n\n\n<p>4.4\u3001MySQL5.7\u7248\u672c\u540e\u8981\u6388\u6743\u7528\u6237\u5bf9\u6240\u6709\u6570\u636e\u5e93\u6709SUPER\u6743\u9650\uff0c\u5426\u5219\u4e0a\u4e00\u6b65\u5bf9\u7528\u6237\u7684\u6388\u6743\u53ea\u80fd\u8fde\u63a5\u4f46\u65e0\u4efb\u4f55\u64cd\u4f5c\u6743\u9650\u3002<\/p>\n\n\n\n<p>grant SUPER on *.* to &#8216;osyunwei.com&#8217;@&#8217;localhost&#8217; ; #\u6388\u4e88\u7528\u6237\u5bf9\u6240\u6709\u6570\u636e\u5e93\u6709SUPER\u6743\u9650\uff0c\u5426\u5219\u53ea\u80fd\u8fde\u63a5\u65e0\u4efb\u4f55\u64cd\u4f5c\u6743\u9650\u3002<\/p>\n\n\n\n<p>grant SUPER on *.* to &#8216;osyunwei.com&#8217;@&#8217;127.0.0.1&#8217; ;<\/p>\n\n\n\n<p>flush privileges; #\u5237\u65b0\u7cfb\u7edf\u6388\u6743\u8868<\/p>\n\n\n\n<p>exit #\u9000\u51famysql\u63a7\u5236\u53f0<\/p>\n\n\n\n<p>service mysqld restart #\u91cd\u542fmysql\u6570\u636e\u5e93<\/p>\n\n\n\n<p>\u4e8c\u3001\u5b89\u88c5Nginx<\/p>\n\n\n\n<p>1\u3001\u5b89\u88c5pcre<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>mkdir \/usr\/local\/pcre<\/p>\n\n\n\n<p>tar zxvf pcre-8.44.tar.gz<\/p>\n\n\n\n<p>cd pcre-8.44<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/pcre<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>2\u3001\u5b89\u88c5openssl<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>mkdir \/usr\/local\/openssl<\/p>\n\n\n\n<p>tar zxvf openssl-1.1.1e.tar.gz<\/p>\n\n\n\n<p>cd openssl-1.1.1e<\/p>\n\n\n\n<p>.\/config&nbsp; -fPIC shared&nbsp;&nbsp;zlib &#8211;prefix=\/usr\/local\/openssl<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>3\u3001\u5b89\u88c5zlib<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>mkdir \/usr\/local\/zlib<\/p>\n\n\n\n<p>tar zxvf zlib-1.2.11.tar.gz<\/p>\n\n\n\n<p>cd zlib-1.2.11<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/zlib<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>4\u3001\u5b89\u88c5Nginx<\/p>\n\n\n\n<p>groupadd www<\/p>\n\n\n\n<p>useradd -g www www -s \/bin\/false<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar zxvf nginx-1.16.1.tar.gz<\/p>\n\n\n\n<p>cd nginx-1.16.1<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/nginx &#8211;without-http_memcached_module &#8211;user=www &#8211;group=www &#8211;with-http_stub_status_module &#8211;with-http_ssl_module &#8211;with-http_gzip_static_module &#8211;with-openssl=\/usr\/local\/src\/openssl-1.1.1e &#8211;with-zlib=\/usr\/local\/src\/zlib-1.2.11 &#8211;with-pcre=\/usr\/local\/src\/pcre-8.44<\/p>\n\n\n\n<p>\u6ce8\u610f\uff1a&#8211;with-openssl=\/usr\/local\/src\/openssl-1.1.1e &#8211;with-zlib=\/usr\/local\/src\/zlib-1.2.11 &#8211;with-pcre=\/usr\/local\/src\/pcre-8.44\u6307\u5411\u7684\u662f\u6e90\u7801\u5305\u89e3\u538b\u7684\u8def\u5f84\uff0c\u800c\u4e0d\u662f\u5b89\u88c5\u7684\u8def\u5f84\uff0c\u5426\u5219\u4f1a\u62a5\u9519<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>\/usr\/local\/nginx\/sbin\/nginx #\u542f\u52a8Nginx<\/p>\n\n\n\n<p>\u8bbe\u7f6enginx\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>vi \/lib\/systemd\/system\/nginx.service #\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801<\/p>\n\n\n\n<p>[Unit]<\/p>\n\n\n\n<p>Description=The NGINX HTTP and reverse proxy server<\/p>\n\n\n\n<p>After=syslog.target network.target remote-fs.target nss-lookup.target<\/p>\n\n\n\n<p>[Service]<\/p>\n\n\n\n<p>Type=forking<\/p>\n\n\n\n<p>PIDFile=\/usr\/local\/nginx\/logs\/nginx.pid<\/p>\n\n\n\n<p>ExecStartPre=\/usr\/local\/nginx\/sbin\/nginx -t<\/p>\n\n\n\n<p>ExecStart=\/usr\/local\/nginx\/sbin\/nginx<\/p>\n\n\n\n<p>ExecReload=\/usr\/local\/nginx\/sbin\/nginx -s reload<\/p>\n\n\n\n<p>ExecStop=\/bin\/kill -s QUIT $MAINPID<\/p>\n\n\n\n<p>ExecStartPost=\/bin\/sleep 0.1<\/p>\n\n\n\n<p>PrivateTmp=true<\/p>\n\n\n\n<p>[Install]<\/p>\n\n\n\n<p>WantedBy=multi-user.target<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>\/usr\/local\/nginx\/sbin\/nginx -s stop #\u505c\u6b62<\/p>\n\n\n\n<p>systemctl enable nginx.service #\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\u52a8<\/p>\n\n\n\n<p>systemctl start nginx.service #\u542f\u52a8<\/p>\n\n\n\n<p>systemctl stop nginx.service #\u5173\u95ed<\/p>\n\n\n\n<p>systemctl restart nginx.service #\u91cd\u542f<\/p>\n\n\n\n<p>systemctl reload nginx.service #\u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u670d\u52a1\u5668IP\u5730\u5740\uff0c\u4f1a\u770b\u5230\u4e0b\u9762\u7684\u754c\u9762\uff0c\u8bf4\u660eNginx\u5b89\u88c5\u6210\u529f\u3002<\/p>\n\n\n\n<p>\u6269\u5c55\u9605\u8bfb\uff1a<\/p>\n\n\n\n<p>Nginx\u914d\u7f6etxt\u3001pdf\u3001doc\u3001xls\u7b49\u6587\u4ef6\u76f4\u63a5\u4e0b\u8f7d\u7684\u65b9\u6cd5<\/p>\n\n\n\n<p>\u5728nginx\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801<\/p>\n\n\n\n<p>location \/ {<\/p>\n\n\n\n<p>if ($request_filename ~* ^.*?\\.(txt|pdf|doc|xls)$){<\/p>\n\n\n\n<p>add_header Content-Disposition: &#8216;attachment;&#8217;;<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>\u4e09\u3001\u5b89\u88c5php<\/p>\n\n\n\n<p>\uff08\u4e00\uff09\uff1a\u5b89\u88c5php\u4f9d\u8d56\u5305<\/p>\n\n\n\n<p>1\u3001\u5b89\u88c5yasm<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar zxvf yasm-1.3.0.tar.gz<\/p>\n\n\n\n<p>cd yasm-1.3.0<\/p>\n\n\n\n<p>.\/configure<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>2\u3001\u5b89\u88c5libmcrypt<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar zxvf libmcrypt-2.5.8.tar.gz<\/p>\n\n\n\n<p>cd libmcrypt-2.5.8<\/p>\n\n\n\n<p>.\/configure<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>3\u3001\u5b89\u88c5libvpx<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar zxvf libvpx-1.8.2.tar.gz<\/p>\n\n\n\n<p>cd libvpx-1.8.2<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/libvpx &#8211;enable-shared &#8211;enable-vp9<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>4\u3001\u5b89\u88c5tiff<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar zxvf tiff-4.0.7.tar.gz<\/p>\n\n\n\n<p>cd tiff-4.0.7<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/tiff &#8211;enable-shared<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>5\u3001\u5b89\u88c5libpng<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar zxvf libpng-1.6.37.tar.gz #\u89e3\u538b<\/p>\n\n\n\n<p>xz -d libpng-1.6.37.tar.xz #\u5148\u89e3\u538bxz<\/p>\n\n\n\n<p>tar xvf libpng-1.6.37.tar #\u518d\u89e3\u538btar<\/p>\n\n\n\n<p>\u6216\u8005<\/p>\n\n\n\n<p>tar xvJf libpng-1.6.37.tar.xz #\u76f4\u63a5\u89e3\u538b<\/p>\n\n\n\n<p>cd libpng-1.6.37<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/libpng &#8211;enable-shared<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>6\u3001\u5b89\u88c5freetype<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar zxvf freetype-2.10.1.tar.gz<\/p>\n\n\n\n<p>cd freetype-2.10.1<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/freetype &#8211;enable-shared<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>7\u3001\u5b89\u88c5jpeg<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar zxvf jpegsrc.v9d.tar.gz<\/p>\n\n\n\n<p>cd jpeg-9d<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/jpeg &#8211;enable-shared<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>8\u3001\u5b89\u88c5GD\u5e93<\/p>\n\n\n\n<p>8.1\u5b89\u88c5\u65b0\u7248\u672clibgd\uff0c\u9002\u7528\u4e8ephp5.4.x\u53ca\u5176\u4ee5\u4e0a\u7248\u672c<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar zxvf libgd-2.3.0.tar.gz<\/p>\n\n\n\n<p>cd libgd-2.3.0<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/libgd &#8211;enable-shared &#8211;with-jpeg=\/usr\/local\/jpeg &#8211;with-png=\/usr\/local\/libpng &#8211;with-freetype=\/usr\/local\/freetype &#8211;with-fontconfig=\/usr\/local\/freetype &#8211;with-xpm=\/usr\/lib64 &#8211;with-tiff=\/usr\/local\/tiff<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>8.2\u5b89\u88c5\u65e7\u7248\u672cgd\u5e93\uff0c\u9002\u7528\u4e8ephp5.3x\u53ca\u5176\u4ee5\u4e0b\u7248\u672c<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar zxvf gd-2.0.35.tar.gz<\/p>\n\n\n\n<p>cd gd-2.0.35<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/gd &#8211;enable-shared &#8211;with-jpeg=\/usr\/local\/jpeg &#8211;with-png=\/usr\/local\/libpng &#8211;with-freetype=\/usr\/local\/freetype &#8211;with-fontconfig=\/usr\/local\/freetype &#8211;with-xpm=\/usr\/lib64 &#8211;with-tiff=\/usr\/local\/tiff &#8211;with-vpx=\/usr\/local\/libvpx<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>9\u3001\u5b89\u88c5t1lib<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar zxvf t1lib-5.1.2.tar.gz<\/p>\n\n\n\n<p>cd t1lib-5.1.2<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/t1lib &#8211;enable-shared<\/p>\n\n\n\n<p>make without_doc<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>10\u3001\u5b89\u88c5libzip<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar -zxvf libzip-1.2.0.tar.gz<\/p>\n\n\n\n<p>cd libzip-1.2.0<\/p>\n\n\n\n<p>.\/configure<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>cp \/usr\/local\/lib\/libzip\/include\/zipconf.h \/usr\/local\/include\/zipconf.h<\/p>\n\n\n\n<p>#\u62f7\u8d1d\u6587\u4ef6\uff0c\u5426\u5219\u5b89\u88c5php\u53ef\u80fd\u4f1a\u62a5\u9519 \/usr\/local\/include\/zip.h:59:21: fatal error: zipconf.h: No such file or dire<\/p>\n\n\n\n<p>11\u3001\u5b89\u88c5oniguruma #\u7f16\u8bd1\u5b89\u88c5php7.4.x\u9700\u8981<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar -zxf oniguruma-6.9.4.tar.gz<\/p>\n\n\n\n<p>cd oniguruma-6.9.4<\/p>\n\n\n\n<p>.\/autogen.sh<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>12\u3001\u5b89\u88c5\u4f4e\u7248\u672copenssl #\u9002\u7528\u4e8e\u7f16\u8bd1php5.6.x\u53ca\u5176\u4ee5\u4e0b\u7248\u672c<\/p>\n\n\n\n<p>CentOS 8.x\u9ed8\u8ba4\u7684openssl\u7248\u672c\u592a\u9ad8\uff0c\u4e0ephp 5.6.x\u4e0d\u517c\u5bb9\uff0c\u9700\u8981\u964d\u4f4eopenssl\u7248\u672c\u624d\u80fd\u7f16\u8bd1\u6210\u529f<\/p>\n\n\n\n<p>which openssl #\u67e5\u8be2openssl\u76ee\u5f55\uff0c\u5982\/usr\/include\/openssl<\/p>\n\n\n\n<p>openssl version #\u67e5\u770bopenssl\u7248\u672c<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>mkdir \/usr\/local\/ssl<\/p>\n\n\n\n<p>tar zxvf openssl-1.0.2k.tar.gz<\/p>\n\n\n\n<p>cd openssl-1.0.2k<\/p>\n\n\n\n<p>.\/config&nbsp;-fPIC &nbsp;shared&nbsp; zlib&nbsp; &#8211;prefix=\/usr\/local\/ssl<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>mv \/usr\/bin\/openssl&nbsp; &nbsp;\/usr\/bin\/openssl.old<\/p>\n\n\n\n<p>mv \/usr\/include\/openssl&nbsp; &nbsp;\/usr\/include\/openssl.old<\/p>\n\n\n\n<p>mv \/usr\/lib64\/libssl.so&nbsp; &nbsp; &nbsp;\/usr\/lib64\/libssl.so.old<\/p>\n\n\n\n<p>ln -s \/usr\/local\/ssl\/bin\/openssl \/usr\/bin\/openssl<\/p>\n\n\n\n<p>ln -s \/usr\/local\/ssl\/include\/openssl \/usr\/include\/openssl<\/p>\n\n\n\n<p>ln -s \/usr\/local\/ssl\/lib\/libssl.so \/usr\/lib64\/libssl.so<\/p>\n\n\n\n<p>echo &#8220;\/usr\/local\/ssl\/lib&#8221; &gt;&gt; \/etc\/ld.so.conf<\/p>\n\n\n\n<p>ldconfig -v #\u5efa\u7acb\u52a8\u6001\u94fe\u63a5<\/p>\n\n\n\n<p>openssl version<\/p>\n\n\n\n<p>\u6ce8\u610f\uff1a\u5e26shared\u53c2\u6570\u624d\u80fd\u751f\u6210libssl.so\u52a8\u6001\u94fe\u63a5\u5e93\u6587\u4ef6,\u5b89\u88c5curl\u65f6, &#8211;with-ssl=\/usr\/local\/ssl \u624d\u80fd\u627e\u5230\u52a8\u6001\u94fe\u63a5\u5e93\uff0ccurl\u624d\u80fd\u5f00\u542fssl\u6a21\u5757<\/p>\n\n\n\n<p>13\u3001\u5b89\u88c5curl\u6a21\u5757<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>mkdir \/usr\/local\/curl<\/p>\n\n\n\n<p>tar zxvf curl-7.29.0.tar.gz<\/p>\n\n\n\n<p>cd curl-7.29.0<\/p>\n\n\n\n<p>.\/configure &#8211;without-nss&nbsp;&#8211;prefix=\/usr\/local\/curl &#8211;with-ssl=\/usr\/local\/ssl<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>\uff08\u4e8c\uff09\uff1a\u7f16\u8bd1\u5b89\u88c5php<\/p>\n\n\n\n<p>\u6ce8\u610f\uff1a\u5982\u679c\u7cfb\u7edf\u662f64\u4f4d\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u4e24\u6761\u547d\u4ee4\uff0c\u5426\u5219\u5b89\u88c5php\u4f1a\u51fa\u9519\u3002<\/p>\n\n\n\n<p>\\cp -frp \/usr\/lib64\/libltdl.so* \/usr\/lib\/<\/p>\n\n\n\n<p>\\cp -frp \/usr\/lib64\/libXpm.so* \/usr\/lib\/<\/p>\n\n\n\n<p>1.53\u3001\u5b89\u88c5php5.3.x<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar -zvxf php-5.3.29.tar.gz<\/p>\n\n\n\n<p>cd php-5.3.29<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php53 &#8211;with-config-file-path=\/usr\/local\/php53\/etc &#8211;with-pdo-mysql=mysqlnd &#8211;enable-mysqlnd-compression-support &#8211;with-gd=\/usr\/local\/gd &#8211;with-png-dir=\/usr\/lib &#8211;with-jpeg-dir=\/usr\/lib &#8211;with-freetype-dir=\/usr\/lib &#8211;with-iconv &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;enable-xml &#8211;enable-magic-quotes &#8211;enable-safe-mode &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;with-curlwrappers &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;enable-gd-native-ttf &#8211;with-openssl=\/usr\/local\/ssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;enable-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-mcrypt &#8211;with-curl=\/usr\/local\/curl &#8211;enable-ctype &#8211;enable-mysqlnd<\/p>\n\n\n\n<p>make #\u7f16\u8bd1<\/p>\n\n\n\n<p>make install #\u5b89\u88c5<\/p>\n\n\n\n<p>cp php.ini-production \/usr\/local\/php53\/etc\/php.ini #\u590d\u5236php\u914d\u7f6e\u6587\u4ef6\u5230\u5b89\u88c5\u76ee\u5f55<\/p>\n\n\n\n<p>#rm -rf \/etc\/php.ini #\u5220\u9664\u7cfb\u7edf\u81ea\u5e26\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>#ln -s \/usr\/local\/php53\/etc\/php.ini \/etc\/php.ini #\u6dfb\u52a0\u8f6f\u94fe\u63a5<\/p>\n\n\n\n<p>cp \/usr\/local\/php53\/etc\/php-fpm.conf.default \/usr\/local\/php53\/etc\/php-fpm.conf #\u62f7\u8d1d\u6a21\u677f\u6587\u4ef6\u4e3aphp-fpm\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>vi \/usr\/local\/php53\/etc\/php-fpm.conf #\u7f16\u8f91<\/p>\n\n\n\n<p>user = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u8d26\u53f7\u4e3awww<\/p>\n\n\n\n<p>group = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u7ec4\u4e3awww<\/p>\n\n\n\n<p>pid = run\/php-fpm.pid #\u53d6\u6d88\u524d\u9762\u7684\u5206\u53f7<\/p>\n\n\n\n<p>listen = 127.0.0.1:9053<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>\u8bbe\u7f6e php-fpm\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>cp \/usr\/local\/src\/php-5.3.29\/sapi\/fpm\/init.d.php-fpm \/etc\/rc.d\/init.d\/php53-fpm #\u62f7\u8d1dphp-fpm\u5230\u542f\u52a8\u76ee\u5f55<\/p>\n\n\n\n<p>chmod +x \/etc\/rc.d\/init.d\/php53-fpm #\u6dfb\u52a0\u6267\u884c\u6743\u9650<\/p>\n\n\n\n<p>chkconfig php53-fpm on #\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>vi \/etc\/rc.d\/init.d\/php53-fpm<\/p>\n\n\n\n<p>prefix=\/usr\/local\/php53<\/p>\n\n\n\n<p>php_fpm_BIN=${exec_prefix}\/sbin\/php53-fpm<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>mv \/usr\/local\/php53\/sbin\/php-fpm \/usr\/local\/php53\/sbin\/php53-fpm<\/p>\n\n\n\n<p>service php53-fpm start #\u542f\u52a8<\/p>\n\n\n\n<p>vi \/usr\/local\/php53\/etc\/php.ini #\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>\u627e\u5230\uff1adisable_functions =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adisable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname<\/p>\n\n\n\n<p>#\u5217\u51faPHP\u53ef\u4ee5\u7981\u7528\u7684\u51fd\u6570\uff0c\u5982\u679c\u67d0\u4e9b\u7a0b\u5e8f\u9700\u8981\u7528\u5230\u8fd9\u4e2a\u51fd\u6570\uff0c\u53ef\u4ee5\u5220\u9664\uff0c\u53d6\u6d88\u7981\u7528<\/p>\n\n\n\n<p>\u627e\u5230\uff1a;date.timezone =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adate.timezone = PRC #\u8bbe\u7f6e\u65f6\u533a<\/p>\n\n\n\n<p>\u627e\u5230\uff1aexpose_php = On<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aexpose_php = OFF #\u7981\u6b62\u663e\u793aphp\u7248\u672c\u7684\u4fe1\u606f<\/p>\n\n\n\n<p>\u627e\u5230\uff1ashort_open_tag = Off<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1ashort_open_tag = ON #\u652f\u6301php\u77ed\u6807\u7b7e<\/p>\n\n\n\n<p>1.55\u3001\u5b89\u88c5php5.5.x<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar -zvxf php-5.5.38.tar.gz<\/p>\n\n\n\n<p>cd php-5.5.38<\/p>\n\n\n\n<p>export LD_LIBRARY_PATH=\/usr\/local\/libgd\/lib<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php55 &#8211;with-config-file-path=\/usr\/local\/php55\/etc &#8211;with-mysqli=mysqlnd &#8211;with-pdo-mysql=mysqlnd &#8211;enable-mysqlnd-compression-support &#8211;with-gd=\/usr\/local\/libgd &#8211;with-png-dir=\/usr\/local\/libpng &#8211;with-jpeg-dir=\/usr\/local\/jpeg &#8211;with-freetype-dir=\/usr\/local\/freetype &#8211;with-xpm-dir=\/usr\/lib64 &#8211;with-vpx-dir=\/usr\/local\/libvpx\/ &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;with-t1lib=\/usr\/local\/t1lib &#8211;with-iconv &#8211;enable-libxml &#8211;enable-xml &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;enable-opcache &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;enable-gd-native-ttf &#8211;with-openssl=\/usr\/local\/ssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;enable-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-mcrypt &#8211;with-curl=\/usr\/local\/curl &#8211;enable-ctype &#8211;enable-mysqlnd<\/p>\n\n\n\n<p>make #\u7f16\u8bd1<\/p>\n\n\n\n<p>make install #\u5b89\u88c5<\/p>\n\n\n\n<p>cp php.ini-production \/usr\/local\/php55\/etc\/php.ini #\u590d\u5236php\u914d\u7f6e\u6587\u4ef6\u5230\u5b89\u88c5\u76ee\u5f55<\/p>\n\n\n\n<p>#rm -rf \/etc\/php.ini #\u5220\u9664\u7cfb\u7edf\u81ea\u5e26\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>#ln -s \/usr\/local\/php55\/etc\/php.ini \/etc\/php.ini #\u6dfb\u52a0\u8f6f\u94fe\u63a5\u5230 \/etc\u76ee\u5f55<\/p>\n\n\n\n<p>cp \/usr\/local\/php55\/etc\/php-fpm.conf.default \/usr\/local\/php55\/etc\/php-fpm.conf #\u62f7\u8d1d\u6a21\u677f\u6587\u4ef6\u4e3aphp-fpm\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>#ln -s \/usr\/local\/php\/etc\/php-fpm.conf \/etc\/php-fpm.conf #\u6dfb\u52a0\u8f6f\u8fde\u63a5\u5230 \/etc\u76ee\u5f55<\/p>\n\n\n\n<p>vi \/usr\/local\/php55\/etc\/php-fpm.conf #\u7f16\u8f91<\/p>\n\n\n\n<p>user = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u8d26\u53f7\u4e3awww<\/p>\n\n\n\n<p>group = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u7ec4\u4e3awww<\/p>\n\n\n\n<p>pid = run\/php-fpm.pid #\u53d6\u6d88\u524d\u9762\u7684\u5206\u53f7<\/p>\n\n\n\n<p>listen = 127.0.0.1:9055<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>\u8bbe\u7f6e php-fpm\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>cp \/usr\/local\/src\/php-5.5.38\/sapi\/fpm\/init.d.php-fpm \/etc\/rc.d\/init.d\/php55-fpm #\u62f7\u8d1dphp-fpm\u5230\u542f\u52a8\u76ee\u5f55<\/p>\n\n\n\n<p>chmod +x \/etc\/rc.d\/init.d\/php55-fpm #\u6dfb\u52a0\u6267\u884c\u6743\u9650<\/p>\n\n\n\n<p>chkconfig php55-fpm on #\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>vi \/etc\/rc.d\/init.d\/php55-fpm<\/p>\n\n\n\n<p>prefix=\/usr\/local\/php55<\/p>\n\n\n\n<p>php_fpm_BIN=${exec_prefix}\/sbin\/php55-fpm<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>mv \/usr\/local\/php55\/sbin\/php-fpm \/usr\/local\/php55\/sbin\/php55-fpm<\/p>\n\n\n\n<p>vi \/usr\/local\/php55\/etc\/php.ini #\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>\u627e\u5230\uff1adisable_functions =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adisable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname<\/p>\n\n\n\n<p>#\u5217\u51faPHP\u53ef\u4ee5\u7981\u7528\u7684\u51fd\u6570\uff0c\u5982\u679c\u67d0\u4e9b\u7a0b\u5e8f\u9700\u8981\u7528\u5230\u8fd9\u4e2a\u51fd\u6570\uff0c\u53ef\u4ee5\u5220\u9664\uff0c\u53d6\u6d88\u7981\u7528\u3002<\/p>\n\n\n\n<p>\u627e\u5230\uff1a;date.timezone =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adate.timezone = PRC #\u8bbe\u7f6e\u65f6\u533a<\/p>\n\n\n\n<p>\u627e\u5230\uff1aexpose_php = On<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aexpose_php = Off #\u7981\u6b62\u663e\u793aphp\u7248\u672c\u7684\u4fe1\u606f<\/p>\n\n\n\n<p>\u627e\u5230\uff1ashort_open_tag = Off<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1ashort_open_tag = ON #\u652f\u6301php\u77ed\u6807\u7b7e<\/p>\n\n\n\n<p>\u627e\u5230opcache.enable=0<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3aopcache.enable=1 #php\u652f\u6301opcode\u7f13\u5b58<\/p>\n\n\n\n<p>\u627e\u5230\uff1aopcache.enable_cli=1 #php\u652f\u6301opcode\u7f13\u5b58<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aopcache.enable_cli=0<\/p>\n\n\n\n<p>\u5728\u6700\u540e\u4e00\u884c\u6dfb\u52a0\uff1azend_extension=opcache.so #\u5f00\u542fopcode\u7f13\u5b58\u529f\u80fd<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>1.56\u3001\u5b89\u88c5php5.6.x<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar -zvxf php-5.6.40.tar.gz<\/p>\n\n\n\n<p>cd php-5.6.40<\/p>\n\n\n\n<p>export LD_LIBRARY_PATH=\/usr\/local\/libgd\/lib<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php56 &#8211;with-config-file-path=\/usr\/local\/php56\/etc &#8211;with-mysqli=mysqlnd &#8211;with-pdo-mysql=mysqlnd &#8211;enable-mysqlnd-compression-support &#8211;with-gd=\/usr\/local\/libgd &#8211;with-png-dir=\/usr\/local\/libpng &#8211;with-jpeg-dir=\/usr\/local\/jpeg &#8211;with-freetype-dir=\/usr\/local\/freetype &#8211;with-xpm-dir=\/usr\/lib64 &#8211;with-vpx-dir=\/usr\/local\/libvpx\/ &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;with-t1lib=\/usr\/local\/t1lib &#8211;with-iconv &#8211;enable-libxml &#8211;enable-xml &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;enable-opcache &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;enable-gd-native-ttf &#8211;with-openssl=\/usr\/local\/ssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;enable-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-mcrypt &#8211;with-curl=\/usr\/local\/curl &#8211;enable-ctype &#8211;enable-mysqlnd<\/p>\n\n\n\n<p>make<\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p>\u5982\u679c\u7f16\u8bd1\u9519\u8bef\uff0c\u53ef\u4ee5\u6e05\u7406\u540e\u5728\u7f16\u8bd1\u4e00\u6b21<\/p>\n\n\n\n<p>make clean #\u6e05\u7406<\/p>\n\n\n\n<p>make #\u7f16\u8bd1<\/p>\n\n\n\n<p>cp php.ini-production \/usr\/local\/php56\/etc\/php.ini #\u590d\u5236php\u914d\u7f6e\u6587\u4ef6\u5230\u5b89\u88c5\u76ee\u5f55<\/p>\n\n\n\n<p>#rm -rf \/etc\/php.ini #\u5220\u9664\u7cfb\u7edf\u81ea\u5e26\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>#ln -s \/usr\/local\/php56\/etc\/php.ini \/etc\/php.ini #\u6dfb\u52a0\u8f6f\u94fe\u63a5\u5230 \/etc\u76ee\u5f55<\/p>\n\n\n\n<p>cp \/usr\/local\/php56\/etc\/php-fpm.conf.default \/usr\/local\/php56\/etc\/php-fpm.conf #\u62f7\u8d1d\u6a21\u677f\u6587\u4ef6\u4e3aphp-fpm\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>#ln -s \/usr\/local\/php56\/etc\/php-fpm.conf \/etc\/php-fpm.conf #\u6dfb\u52a0\u8f6f\u8fde\u63a5\u5230 \/etc\u76ee\u5f55<\/p>\n\n\n\n<p>vi \/usr\/local\/php56\/etc\/php-fpm.conf #\u7f16\u8f91<\/p>\n\n\n\n<p>user = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u8d26\u53f7\u4e3awww<\/p>\n\n\n\n<p>group = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u7ec4\u4e3awww<\/p>\n\n\n\n<p>pid = run\/php-fpm.pid #\u53d6\u6d88\u524d\u9762\u7684\u5206\u53f7<\/p>\n\n\n\n<p>listen = 127.0.0.1:9056<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>\u8bbe\u7f6e php-fpm\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>cp \/usr\/local\/src\/php-5.6.40\/sapi\/fpm\/init.d.php-fpm \/etc\/rc.d\/init.d\/php56-fpm #\u62f7\u8d1dphp-fpm\u5230\u542f\u52a8\u76ee\u5f55<\/p>\n\n\n\n<p>chmod +x \/etc\/rc.d\/init.d\/php56-fpm #\u6dfb\u52a0\u6267\u884c\u6743\u9650<\/p>\n\n\n\n<p>chkconfig php56-fpm on #\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>vi \/etc\/rc.d\/init.d\/php56-fpm<\/p>\n\n\n\n<p>prefix=\/usr\/local\/php56<\/p>\n\n\n\n<p>php_fpm_BIN=${exec_prefix}\/sbin\/php56-fpm<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>mv \/usr\/local\/php56\/sbin\/php-fpm \/usr\/local\/php56\/sbin\/php56-fpm<\/p>\n\n\n\n<p>vi \/usr\/local\/php56\/etc\/php.ini #\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>\u627e\u5230\uff1adisable_functions =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adisable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname<\/p>\n\n\n\n<p>#\u5217\u51faPHP\u53ef\u4ee5\u7981\u7528\u7684\u51fd\u6570\uff0c\u5982\u679c\u67d0\u4e9b\u7a0b\u5e8f\u9700\u8981\u7528\u5230\u8fd9\u4e2a\u51fd\u6570\uff0c\u53ef\u4ee5\u5220\u9664\uff0c\u53d6\u6d88\u7981\u7528\u3002<\/p>\n\n\n\n<p>\u627e\u5230\uff1a;date.timezone =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adate.timezone = PRC #\u8bbe\u7f6e\u65f6\u533a<\/p>\n\n\n\n<p>\u627e\u5230\uff1aexpose_php = On<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aexpose_php = Off #\u7981\u6b62\u663e\u793aphp\u7248\u672c\u7684\u4fe1\u606f<\/p>\n\n\n\n<p>\u627e\u5230\uff1ashort_open_tag = Off<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1ashort_open_tag = ON #\u652f\u6301php\u77ed\u6807\u7b7e<\/p>\n\n\n\n<p>\u627e\u5230opcache.enable=0<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3aopcache.enable=1 #php\u652f\u6301opcode\u7f13\u5b58<\/p>\n\n\n\n<p>\u627e\u5230\uff1a;opcache.enable_cli=1 #php\u652f\u6301opcode\u7f13\u5b58<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aopcache.enable_cli=0<\/p>\n\n\n\n<p>\u5728\u6700\u540e\u4e00\u884c\u6dfb\u52a0\uff1azend_extension=opcache.so #\u5f00\u542fopcode\u7f13\u5b58\u529f\u80fd<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>1.70\u3001\u5b89\u88c5php7.0.x<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar -zvxf php-7.0.33.tar.gz<\/p>\n\n\n\n<p>cd php-7.0.33<\/p>\n\n\n\n<p>export LD_LIBRARY_PATH=\/usr\/local\/libgd\/lib<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php70 &#8211;with-config-file-path=\/usr\/local\/php70\/etc &#8211;with-mysqli=mysqlnd &#8211;with-pdo-mysql=mysqlnd &#8211;enable-mysqlnd-compression-support &#8211;with-gd=\/usr\/local\/libgd &#8211;with-png-dir=\/usr\/local\/libpng &#8211;with-jpeg-dir=\/usr\/local\/jpeg &#8211;with-freetype-dir=\/usr\/local\/freetype &#8211;with-xpm-dir=\/usr\/lib64 &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;with-iconv &#8211;enable-libxml &#8211;enable-xml &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;enable-opcache &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;enable-gd-native-ttf &#8211;with-openssl=\/usr\/local\/ssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;enable-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-mcrypt &#8211;with-curl=\/usr\/local\/curl &#8211;enable-ctype &#8211;enable-mysqlnd<\/p>\n\n\n\n<p>make #\u7f16\u8bd1<\/p>\n\n\n\n<p>make install #\u5b89\u88c5<\/p>\n\n\n\n<p>cp php.ini-production \/usr\/local\/php70\/etc\/php.ini #\u590d\u5236php\u914d\u7f6e\u6587\u4ef6\u5230\u5b89\u88c5\u76ee\u5f55<\/p>\n\n\n\n<p>#rm -rf \/etc\/php.ini #\u5220\u9664\u7cfb\u7edf\u81ea\u5e26\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>#ln -s \/usr\/local\/php70\/etc\/php.ini \/etc\/php.ini #\u6dfb\u52a0\u8f6f\u94fe\u63a5\u5230 \/etc\u76ee\u5f55<\/p>\n\n\n\n<p>cp \/usr\/local\/php70\/etc\/php-fpm.conf.default \/usr\/local\/php70\/etc\/php-fpm.conf #\u62f7\u8d1d\u6a21\u677f\u6587\u4ef6\u4e3aphp-fpm\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>#ln -s \/usr\/local\/php70\/etc\/php-fpm.conf \/etc\/php-fpm.conf #\u6dfb\u52a0\u8f6f\u8fde\u63a5\u5230 \/etc\u76ee\u5f55<\/p>\n\n\n\n<p>vi \/usr\/local\/php70\/etc\/php-fpm.conf #\u7f16\u8f91<\/p>\n\n\n\n<p>pid = run\/php-fpm.pid #\u53d6\u6d88\u524d\u9762\u7684\u5206\u53f7<\/p>\n\n\n\n<p>include=\/usr\/local\/php70\/etc\/php-fpm.d\/*.conf<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>cp \/usr\/local\/php70\/etc\/php-fpm.d\/www.conf.default \/usr\/local\/php70\/etc\/php-fpm.d\/www.conf<\/p>\n\n\n\n<p>vi \/usr\/local\/php70\/etc\/php-fpm.d\/www.conf #\u7f16\u8f91<\/p>\n\n\n\n<p>user = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u8d26\u53f7\u4e3awww<\/p>\n\n\n\n<p>group = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u7ec4\u4e3awww<\/p>\n\n\n\n<p>listen = 127.0.0.1:9070<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>\u8bbe\u7f6e php-fpm\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>cp \/usr\/local\/src\/php-7.0.33\/sapi\/fpm\/init.d.php-fpm \/etc\/rc.d\/init.d\/php70-fpm #\u62f7\u8d1dphp-fpm\u5230\u542f\u52a8\u76ee\u5f55<\/p>\n\n\n\n<p>chmod +x \/etc\/rc.d\/init.d\/php70-fpm #\u6dfb\u52a0\u6267\u884c\u6743\u9650<\/p>\n\n\n\n<p>chkconfig php70-fpm on #\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>vi \/etc\/rc.d\/init.d\/php70-fpm<\/p>\n\n\n\n<p>prefix=\/usr\/local\/php70<\/p>\n\n\n\n<p>php_fpm_BIN=${exec_prefix}\/sbin\/php70-fpm<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>mv \/usr\/local\/php70\/sbin\/php-fpm \/usr\/local\/php70\/sbin\/php70-fpm<\/p>\n\n\n\n<p>vi \/usr\/local\/php70\/etc\/php.ini #\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>\u627e\u5230\uff1adisable_functions =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adisable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname<\/p>\n\n\n\n<p>#\u5217\u51faPHP\u53ef\u4ee5\u7981\u7528\u7684\u51fd\u6570\uff0c\u5982\u679c\u67d0\u4e9b\u7a0b\u5e8f\u9700\u8981\u7528\u5230\u8fd9\u4e2a\u51fd\u6570\uff0c\u53ef\u4ee5\u5220\u9664\uff0c\u53d6\u6d88\u7981\u7528\u3002<\/p>\n\n\n\n<p>\u627e\u5230\uff1a;date.timezone =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adate.timezone = PRC #\u8bbe\u7f6e\u65f6\u533a<\/p>\n\n\n\n<p>\u627e\u5230\uff1aexpose_php = On<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aexpose_php = Off #\u7981\u6b62\u663e\u793aphp\u7248\u672c\u7684\u4fe1\u606f<\/p>\n\n\n\n<p>\u627e\u5230\uff1ashort_open_tag = Off<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1ashort_open_tag = ON #\u652f\u6301php\u77ed\u6807\u7b7e<\/p>\n\n\n\n<p>\u627e\u5230opcache.enable=0<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3aopcache.enable=1 #php\u652f\u6301opcode\u7f13\u5b58<\/p>\n\n\n\n<p>\u627e\u5230\uff1a;opcache.enable_cli=1 #php\u652f\u6301opcode\u7f13\u5b58<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aopcache.enable_cli=0<\/p>\n\n\n\n<p>\u5728\u6700\u540e\u4e00\u884c\u6dfb\u52a0\uff1azend_extension=opcache.so #\u5f00\u542fopcode\u7f13\u5b58\u529f\u80fd<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>1.71\u3001\u5b89\u88c5php7.1.x<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar -zvxf php-7.1.33.tar.gz<\/p>\n\n\n\n<p>cd php-7.1.33<\/p>\n\n\n\n<p>export LD_LIBRARY_PATH=\/usr\/local\/libgd\/lib<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php71 &#8211;with-config-file-path=\/usr\/local\/php71\/etc &#8211;with-mysqli=mysqlnd &#8211;with-pdo-mysql=mysqlnd &#8211;enable-mysqlnd-compression-support &#8211;with-gd=\/usr\/local\/libgd &#8211;with-png-dir=\/usr\/local\/libpng &#8211;with-jpeg-dir=\/usr\/local\/jpeg &#8211;with-freetype-dir=\/usr\/local\/freetype &#8211;with-xpm-dir=\/usr\/lib64 &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;with-iconv &#8211;enable-libxml &#8211;enable-xml &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;enable-opcache &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;enable-gd-native-ttf &#8211;with-openssl=\/usr\/local\/ssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;enable-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-mcrypt &#8211;with-curl=\/usr\/local\/curl &#8211;enable-ctype &#8211;enable-mysqlnd<\/p>\n\n\n\n<p>make #\u7f16\u8bd1<\/p>\n\n\n\n<p>make install #\u5b89\u88c5<\/p>\n\n\n\n<p>cp php.ini-production \/usr\/local\/php71\/etc\/php.ini #\u590d\u5236php\u914d\u7f6e\u6587\u4ef6\u5230\u5b89\u88c5\u76ee\u5f55<\/p>\n\n\n\n<p>rm -rf \/etc\/php.ini #\u5220\u9664\u7cfb\u7edf\u81ea\u5e26\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>ln -s \/usr\/local\/php71\/etc\/php.ini \/etc\/php.ini #\u6dfb\u52a0\u8f6f\u94fe\u63a5\u5230 \/etc\u76ee\u5f55<\/p>\n\n\n\n<p>cp \/usr\/local\/php71\/etc\/php-fpm.conf.default \/usr\/local\/php71\/etc\/php-fpm.conf #\u62f7\u8d1d\u6a21\u677f\u6587\u4ef6\u4e3aphp-fpm\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>ln -s \/usr\/local\/php71\/etc\/php-fpm.conf \/etc\/php-fpm.conf #\u6dfb\u52a0\u8f6f\u8fde\u63a5\u5230 \/etc\u76ee\u5f55<\/p>\n\n\n\n<p>vi \/usr\/local\/php71\/etc\/php-fpm.conf #\u7f16\u8f91<\/p>\n\n\n\n<p>pid = run\/php-fpm.pid #\u53d6\u6d88\u524d\u9762\u7684\u5206\u53f7<\/p>\n\n\n\n<p>include=\/usr\/local\/php71\/etc\/php-fpm.d\/*.conf<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>cp \/usr\/local\/php71\/etc\/php-fpm.d\/www.conf.default \/usr\/local\/php71\/etc\/php-fpm.d\/www.conf<\/p>\n\n\n\n<p>vi \/usr\/local\/php71\/etc\/php-fpm.d\/www.conf #\u7f16\u8f91<\/p>\n\n\n\n<p>user = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u8d26\u53f7\u4e3awww<\/p>\n\n\n\n<p>group = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u7ec4\u4e3awww<\/p>\n\n\n\n<p>listen = 127.0.0.1:9071<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>\u8bbe\u7f6e php-fpm\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>cp \/usr\/local\/src\/php-7.1.33\/sapi\/fpm\/init.d.php-fpm \/etc\/rc.d\/init.d\/php71-fpm #\u62f7\u8d1dphp-fpm\u5230\u542f\u52a8\u76ee\u5f55<\/p>\n\n\n\n<p>chmod +x \/etc\/rc.d\/init.d\/php71-fpm #\u6dfb\u52a0\u6267\u884c\u6743\u9650<\/p>\n\n\n\n<p>chkconfig php71-fpm on #\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>vi \/etc\/rc.d\/init.d\/php71-fpm<\/p>\n\n\n\n<p>prefix=\/usr\/local\/php71<\/p>\n\n\n\n<p>php_fpm_BIN=${exec_prefix}\/sbin\/php71-fpm<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>mv \/usr\/local\/php71\/sbin\/php-fpm \/usr\/local\/php71\/sbin\/php71-fpm<\/p>\n\n\n\n<p>vi \/usr\/local\/php71\/etc\/php.ini #\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>\u627e\u5230\uff1adisable_functions =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adisable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname<\/p>\n\n\n\n<p>#\u5217\u51faPHP\u53ef\u4ee5\u7981\u7528\u7684\u51fd\u6570\uff0c\u5982\u679c\u67d0\u4e9b\u7a0b\u5e8f\u9700\u8981\u7528\u5230\u8fd9\u4e2a\u51fd\u6570\uff0c\u53ef\u4ee5\u5220\u9664\uff0c\u53d6\u6d88\u7981\u7528\u3002<\/p>\n\n\n\n<p>\u627e\u5230\uff1a;date.timezone =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adate.timezone = PRC #\u8bbe\u7f6e\u65f6\u533a<\/p>\n\n\n\n<p>\u627e\u5230\uff1aexpose_php = On<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aexpose_php = Off #\u7981\u6b62\u663e\u793aphp\u7248\u672c\u7684\u4fe1\u606f<\/p>\n\n\n\n<p>\u627e\u5230\uff1ashort_open_tag = Off<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1ashort_open_tag = ON #\u652f\u6301php\u77ed\u6807\u7b7e<\/p>\n\n\n\n<p>\u627e\u5230opcache.enable=0<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3aopcache.enable=1 #php\u652f\u6301opcode\u7f13\u5b58<\/p>\n\n\n\n<p>\u627e\u5230\uff1a;opcache.enable_cli=1 #php\u652f\u6301opcode\u7f13\u5b58<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aopcache.enable_cli=0<\/p>\n\n\n\n<p>\u5728\u6700\u540e\u4e00\u884c\u6dfb\u52a0\uff1azend_extension=opcache.so #\u5f00\u542fopcode\u7f13\u5b58\u529f\u80fd<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>1.72\u3001\u5b89\u88c5php7.2.x<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar -zvxf php-7.2.29.tar.gz<\/p>\n\n\n\n<p>cd php-7.2.29<\/p>\n\n\n\n<p>export LD_LIBRARY_PATH=\/usr\/local\/libgd\/lib<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php72 &#8211;with-config-file-path=\/usr\/local\/php72\/etc &#8211;with-mysqli=mysqlnd &#8211;with-pdo-mysql=mysqlnd &#8211;enable-mysqlnd-compression-support &#8211;with-gd=\/usr\/local\/libgd &#8211;with-png-dir=\/usr\/local\/libpng &#8211;with-jpeg-dir=\/usr\/local\/jpeg &#8211;with-freetype-dir=\/usr\/local\/freetype &#8211;with-xpm-dir=\/usr\/lib64 &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;with-iconv &#8211;enable-libxml &#8211;enable-xml &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;enable-opcache &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;with-openssl=\/usr\/local\/ssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;enable-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-curl=\/usr\/local\/curl &#8211;enable-ctype &#8211;enable-mysqlnd<\/p>\n\n\n\n<p>make #\u7f16\u8bd1<\/p>\n\n\n\n<p>make install #\u5b89\u88c5<\/p>\n\n\n\n<p>cp php.ini-production \/usr\/local\/php72\/etc\/php.ini #\u590d\u5236php\u914d\u7f6e\u6587\u4ef6\u5230\u5b89\u88c5\u76ee\u5f55<\/p>\n\n\n\n<p>rm -rf \/etc\/php.ini #\u5220\u9664\u7cfb\u7edf\u81ea\u5e26\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>ln -s \/usr\/local\/php72\/etc\/php.ini \/etc\/php.ini #\u6dfb\u52a0\u8f6f\u94fe\u63a5\u5230 \/etc\u76ee\u5f55<\/p>\n\n\n\n<p>cp \/usr\/local\/php72\/etc\/php-fpm.conf.default \/usr\/local\/php72\/etc\/php-fpm.conf #\u62f7\u8d1d\u6a21\u677f\u6587\u4ef6\u4e3aphp-fpm\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>ln -s \/usr\/local\/php72\/etc\/php-fpm.conf \/etc\/php-fpm.conf #\u6dfb\u52a0\u8f6f\u8fde\u63a5\u5230 \/etc\u76ee\u5f55<\/p>\n\n\n\n<p>vi \/usr\/local\/php72\/etc\/php-fpm.conf #\u7f16\u8f91<\/p>\n\n\n\n<p>pid = run\/php-fpm.pid #\u53d6\u6d88\u524d\u9762\u7684\u5206\u53f7<\/p>\n\n\n\n<p>include=\/usr\/local\/php72\/etc\/php-fpm.d\/*.conf<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>cp \/usr\/local\/php72\/etc\/php-fpm.d\/www.conf.default \/usr\/local\/php72\/etc\/php-fpm.d\/www.conf<\/p>\n\n\n\n<p>vi \/usr\/local\/php72\/etc\/php-fpm.d\/www.conf #\u7f16\u8f91<\/p>\n\n\n\n<p>user = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u8d26\u53f7\u4e3awww<\/p>\n\n\n\n<p>group = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u7ec4\u4e3awww<\/p>\n\n\n\n<p>listen = 127.0.0.1:9072<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>\u8bbe\u7f6e php-fpm\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>cp \/usr\/local\/src\/php-7.2.29\/sapi\/fpm\/init.d.php-fpm \/etc\/rc.d\/init.d\/php72-fpm #\u62f7\u8d1dphp-fpm\u5230\u542f\u52a8\u76ee\u5f55<\/p>\n\n\n\n<p>chmod +x \/etc\/rc.d\/init.d\/php72-fpm #\u6dfb\u52a0\u6267\u884c\u6743\u9650<\/p>\n\n\n\n<p>chkconfig php72-fpm on #\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>vi \/etc\/rc.d\/init.d\/php72-fpm<\/p>\n\n\n\n<p>prefix=\/usr\/local\/php72<\/p>\n\n\n\n<p>php_fpm_BIN=${exec_prefix}\/sbin\/php72-fpm<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>mv \/usr\/local\/php72\/sbin\/php-fpm \/usr\/local\/php72\/sbin\/php72-fpm<\/p>\n\n\n\n<p>vi \/usr\/local\/php72\/etc\/php.ini #\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>\u627e\u5230\uff1adisable_functions =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adisable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname<\/p>\n\n\n\n<p>#\u5217\u51faPHP\u53ef\u4ee5\u7981\u7528\u7684\u51fd\u6570\uff0c\u5982\u679c\u67d0\u4e9b\u7a0b\u5e8f\u9700\u8981\u7528\u5230\u8fd9\u4e2a\u51fd\u6570\uff0c\u53ef\u4ee5\u5220\u9664\uff0c\u53d6\u6d88\u7981\u7528\u3002<\/p>\n\n\n\n<p>\u627e\u5230\uff1a;date.timezone =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adate.timezone = PRC #\u8bbe\u7f6e\u65f6\u533a<\/p>\n\n\n\n<p>\u627e\u5230\uff1aexpose_php = On<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aexpose_php = Off #\u7981\u6b62\u663e\u793aphp\u7248\u672c\u7684\u4fe1\u606f<\/p>\n\n\n\n<p>\u627e\u5230\uff1ashort_open_tag = Off<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1ashort_open_tag = ON #\u652f\u6301php\u77ed\u6807\u7b7e<\/p>\n\n\n\n<p>\u627e\u5230opcache.enable=0<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3aopcache.enable=1 #php\u652f\u6301opcode\u7f13\u5b58<\/p>\n\n\n\n<p>\u627e\u5230\uff1a;opcache.enable_cli=1 #php\u652f\u6301opcode\u7f13\u5b58<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aopcache.enable_cli=0<\/p>\n\n\n\n<p>\u5728\u6700\u540e\u4e00\u884c\u6dfb\u52a0\uff1azend_extension=opcache.so #\u5f00\u542fopcode\u7f13\u5b58\u529f\u80fd<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>1.73\u3001\u5b89\u88c5php7.3.x<\/p>\n\n\n\n<p>1.73.1<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar -zvxf php-7.3.16.tar.gz<\/p>\n\n\n\n<p>cd php-7.3.16<\/p>\n\n\n\n<p>export LD_LIBRARY_PATH=\/usr\/local\/libgd\/lib<\/p>\n\n\n\n<p>export PKG_CONFIG_PATH=&#8221;\/usr\/local\/lib\/pkgconfig\/&#8221; #libzip\u5e93\u5b89\u88c5\u4f4d\u7f6e\uff0c\u5426\u5219\u5b89\u88c5php\u53ef\u80fd\u4f1a\u62a5\u9519<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php73 &#8211;with-config-file-path=\/usr\/local\/php73\/etc &#8211;with-mysqli=mysqlnd &#8211;with-pdo-mysql=mysqlnd &#8211;enable-mysqlnd-compression-support &#8211;with-gd=\/usr\/local\/libgd &#8211;with-png-dir=\/usr\/local\/libpng &#8211;with-jpeg-dir=\/usr\/local\/jpeg &#8211;with-freetype-dir=\/usr\/local\/freetype &#8211;with-xpm-dir=\/usr\/lib64 &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;with-iconv &#8211;enable-libxml &#8211;enable-xml &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;enable-opcache &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;with-openssl=\/usr\/local\/ssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;enable-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-curl=\/usr\/local\/curl &#8211;enable-ctype &#8211;enable-mysqlnd &#8211;enable-pdo<\/p>\n\n\n\n<p>make #\u7f16\u8bd1<\/p>\n\n\n\n<p>make install #\u5b89\u88c5<\/p>\n\n\n\n<p>cp php.ini-production \/usr\/local\/php73\/etc\/php.ini #\u590d\u5236php\u914d\u7f6e\u6587\u4ef6\u5230\u5b89\u88c5\u76ee\u5f55<\/p>\n\n\n\n<p>rm -rf \/etc\/php.ini #\u5220\u9664\u7cfb\u7edf\u81ea\u5e26\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>ln -s \/usr\/local\/php73\/etc\/php.ini \/etc\/php.ini #\u6dfb\u52a0\u8f6f\u94fe\u63a5\u5230 \/etc\u76ee\u5f55<\/p>\n\n\n\n<p>cp \/usr\/local\/php73\/etc\/php-fpm.conf.default \/usr\/local\/php73\/etc\/php-fpm.conf #\u62f7\u8d1d\u6a21\u677f\u6587\u4ef6\u4e3aphp-fpm\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>ln -s \/usr\/local\/php73\/etc\/php-fpm.conf \/etc\/php-fpm.conf #\u6dfb\u52a0\u8f6f\u8fde\u63a5\u5230 \/etc\u76ee\u5f55<\/p>\n\n\n\n<p>vi \/usr\/local\/php73\/etc\/php-fpm.conf #\u7f16\u8f91<\/p>\n\n\n\n<p>pid = run\/php-fpm.pid #\u53d6\u6d88\u524d\u9762\u7684\u5206\u53f7<\/p>\n\n\n\n<p>include=\/usr\/local\/php73\/etc\/php-fpm.d\/*.conf<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>cp \/usr\/local\/php73\/etc\/php-fpm.d\/www.conf.default \/usr\/local\/php73\/etc\/php-fpm.d\/www.conf<\/p>\n\n\n\n<p>vi \/usr\/local\/php73\/etc\/php-fpm.d\/www.conf #\u7f16\u8f91<\/p>\n\n\n\n<p>user = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u8d26\u53f7\u4e3awww<\/p>\n\n\n\n<p>group = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u7ec4\u4e3awww<\/p>\n\n\n\n<p>listen = 127.0.0.1:9073<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>1.73.2\u3001\u8bbe\u7f6e php-fpm\u5f00\u673a\u542f\u52a8\uff08\u6709\u4e24\u79cd\u8bbe\u7f6e\u65b9\u6cd5\uff0c\u9009\u62e9\u4e00\u79cd\u5373\u53ef\uff09<\/p>\n\n\n\n<p>1.73.2.1 #chkconfig\u65b9\u5f0f<\/p>\n\n\n\n<p>cp \/usr\/local\/src\/php-7.3.16\/sapi\/fpm\/init.d.php-fpm \/etc\/rc.d\/init.d\/php73-fpm #\u62f7\u8d1dphp-fpm\u5230\u542f\u52a8\u76ee\u5f55<\/p>\n\n\n\n<p>chmod +x \/etc\/rc.d\/init.d\/php73-fpm #\u6dfb\u52a0\u6267\u884c\u6743\u9650<\/p>\n\n\n\n<p>chkconfig php73-fpm on #\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>vi \/etc\/rc.d\/init.d\/php73-fpm<\/p>\n\n\n\n<p>prefix=\/usr\/local\/php73<\/p>\n\n\n\n<p>php_fpm_BIN=${exec_prefix}\/sbin\/php73-fpm<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>mv \/usr\/local\/php73\/sbin\/php-fpm \/usr\/local\/php73\/sbin\/php73-fpm<\/p>\n\n\n\n<p>service php73-fpm start #\u542f\u52a8php71-fpm<\/p>\n\n\n\n<p>service php73-fpm stop #\u505c\u6b62php71-fpm<\/p>\n\n\n\n<p>1.73.2.2 #systemctl\u65b9\u5f0f<\/p>\n\n\n\n<p>vi \/usr\/lib\/systemd\/system\/php73-fpm.service #\u7f16\u8f91\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801<\/p>\n\n\n\n<p>[Unit]<\/p>\n\n\n\n<p>Description=The PHP FastCGI Process Manager<\/p>\n\n\n\n<p>After=syslog.target network.target<\/p>\n\n\n\n<p>[Service]<\/p>\n\n\n\n<p>Type=simple<\/p>\n\n\n\n<p>PIDFile=\/run\/php-fpm.pid<\/p>\n\n\n\n<p>ExecStart=\/usr\/local\/php73\/sbin\/php73-fpm &#8211;nodaemonize &#8211;fpm-config \/usr\/local\/php73\/etc\/php-fpm.conf<\/p>\n\n\n\n<p>ExecReload=\/bin\/kill -USR2 $MAINPID<\/p>\n\n\n\n<p>ExecStop=\/bin\/kill -SIGINT $MAINPID<\/p>\n\n\n\n<p>[Install]<\/p>\n\n\n\n<p>WantedBy=multi-user.target<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>mv \/usr\/local\/php73\/sbin\/php-fpm \/usr\/local\/php73\/sbin\/php73-fpm<\/p>\n\n\n\n<p>systemctl enable php73-fpm.service #\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\u52a8<\/p>\n\n\n\n<p>systemctl daemon-reload #\u91cd\u65b0\u52a0\u8f7dsystemctll<\/p>\n\n\n\n<p>systemctl start php73-fpm.service #\u542f\u52a8<\/p>\n\n\n\n<p>systemctl stop php73-fpm.service #\u505c\u6b62<\/p>\n\n\n\n<p>systemctl restart php73-fpm.service #\u91cd\u542f<\/p>\n\n\n\n<p>1.73.3 \u914d\u7f6ephp\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>vi \/usr\/local\/php73\/etc\/php.ini #\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>\u627e\u5230\uff1adisable_functions =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adisable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname<\/p>\n\n\n\n<p>#\u5217\u51faPHP\u53ef\u4ee5\u7981\u7528\u7684\u51fd\u6570\uff0c\u5982\u679c\u67d0\u4e9b\u7a0b\u5e8f\u9700\u8981\u7528\u5230\u8fd9\u4e2a\u51fd\u6570\uff0c\u53ef\u4ee5\u5220\u9664\uff0c\u53d6\u6d88\u7981\u7528\u3002<\/p>\n\n\n\n<p>\u627e\u5230\uff1a;date.timezone =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adate.timezone = PRC #\u8bbe\u7f6e\u65f6\u533a<\/p>\n\n\n\n<p>\u627e\u5230\uff1aexpose_php = On<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aexpose_php = Off #\u7981\u6b62\u663e\u793aphp\u7248\u672c\u7684\u4fe1\u606f<\/p>\n\n\n\n<p>\u627e\u5230\uff1ashort_open_tag = Off<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1ashort_open_tag = ON #\u652f\u6301php\u77ed\u6807\u7b7e<\/p>\n\n\n\n<p>\u627e\u5230opcache.enable=0<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3aopcache.enable=1 #php\u652f\u6301opcode\u7f13\u5b58<\/p>\n\n\n\n<p>\u627e\u5230\uff1a;opcache.enable_cli=1<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aopcache.enable_cli=0 #php\u652f\u6301opcode\u7f13\u5b58<\/p>\n\n\n\n<p>\u5728\u6700\u540e\u4e00\u884c\u6dfb\u52a0\uff1azend_extension=opcache.so #\u5f00\u542fopcode\u7f13\u5b58\u529f\u80fd<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>1.74\u3001\u5b89\u88c5php7.4.x<\/p>\n\n\n\n<p>#\u6062\u590dCentOS 8.x\u81ea\u5e26\u7684openssl\u548ccurl\u9ed8\u8ba4\u9ad8\u7248\u672c<\/p>\n\n\n\n<p>#php7.4.x\u4e2d\u8fd92\u4e2a\u5e93\u9700\u8981\u4f7f\u7528CentOS 8.x\u81ea\u5e26\u7684\u9ad8\u7248\u672c\u8fdb\u884c\u7f16\u8bd1&#8211;with-openssl&nbsp;&nbsp;&#8211;with-curl<\/p>\n\n\n\n<p>rm -rf \/usr\/lib64\/libssl.so<\/p>\n\n\n\n<p>mv \/usr\/lib64\/libssl.so.old \/usr\/lib64\/libssl.so<\/p>\n\n\n\n<p>rm -rf \/usr\/include\/openssl<\/p>\n\n\n\n<p>mv \/usr\/include\/openssl.old \/usr\/include\/openssl<\/p>\n\n\n\n<p>rm -rf \/usr\/bin\/openssl<\/p>\n\n\n\n<p>mv \/usr\/bin\/openssl.old \/usr\/bin\/openssl<\/p>\n\n\n\n<p>cd \/usr\/local\/src<\/p>\n\n\n\n<p>tar -zvxf php-7.4.4.tar.gz<\/p>\n\n\n\n<p>cd php-7.4.4<\/p>\n\n\n\n<p>export LD_LIBRARY_PATH=\/usr\/local\/libgd\/lib #\u8bbe\u7f6elibgd\u5e93\u73af\u5883\u53d8\u91cf<\/p>\n\n\n\n<p>export PKG_CONFIG_PATH=&#8221;\/usr\/local\/lib\/pkgconfig\/&#8221; #\u8bbe\u7f6elibzip\u73af\u5883\u53d8\u91cf<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php74 &#8211;with-config-file-path=\/usr\/local\/php74\/etc &#8211;with-mysqli=mysqlnd &#8211;with-pdo-mysql=mysqlnd &#8211;enable-gd &#8211;with-jpeg=\/usr\/local\/jpeg &#8211;with-freetype=\/usr\/local\/freetype &#8211;with-xpm=\/usr\/lib64 &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;with-iconv &#8211;with-libxml &#8211;enable-xml &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;enable-opcache &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;with-openssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;with-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-curl &#8211;enable-ctype &#8211;enable-mysqlnd &#8211;enable-pdo<\/p>\n\n\n\n<p>make #\u7f16\u8bd1<\/p>\n\n\n\n<p>make install #\u5b89\u88c5<\/p>\n\n\n\n<p>.\/configure &#8211;help #\u53ef\u4ee5\u67e5\u770b\u7f16\u8bd1\u53c2\u6570\u7684\u5199\u6cd5<\/p>\n\n\n\n<p>cp php.ini-production \/usr\/local\/php74\/etc\/php.ini #\u590d\u5236php\u914d\u7f6e\u6587\u4ef6\u5230\u5b89\u88c5\u76ee\u5f55<\/p>\n\n\n\n<p>rm -rf \/etc\/php.ini #\u5220\u9664\u7cfb\u7edf\u81ea\u5e26\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>ln -s \/usr\/local\/php74\/etc\/php.ini \/etc\/php.ini #\u6dfb\u52a0\u8f6f\u94fe\u63a5\u5230 \/etc\u76ee\u5f55<\/p>\n\n\n\n<p>cp \/usr\/local\/php74\/etc\/php-fpm.conf.default \/usr\/local\/php74\/etc\/php-fpm.conf #\u62f7\u8d1d\u6a21\u677f\u6587\u4ef6\u4e3aphp-fpm\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>ln -s \/usr\/local\/php74\/etc\/php-fpm.conf \/etc\/php-fpm.conf #\u6dfb\u52a0\u8f6f\u8fde\u63a5\u5230 \/etc\u76ee\u5f55<\/p>\n\n\n\n<p>vi \/usr\/local\/php74\/etc\/php-fpm.conf #\u7f16\u8f91<\/p>\n\n\n\n<p>pid = run\/php-fpm.pid #\u53d6\u6d88\u524d\u9762\u7684\u5206\u53f7<\/p>\n\n\n\n<p>include=\/usr\/local\/php74\/etc\/php-fpm.d\/*.conf<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>cp \/usr\/local\/php74\/etc\/php-fpm.d\/www.conf.default \/usr\/local\/php74\/etc\/php-fpm.d\/www.conf<\/p>\n\n\n\n<p>vi \/usr\/local\/php74\/etc\/php-fpm.d\/www.conf #\u7f16\u8f91<\/p>\n\n\n\n<p>user = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u8d26\u53f7\u4e3awww<\/p>\n\n\n\n<p>group = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u7ec4\u4e3awww<\/p>\n\n\n\n<p>listen = 127.0.0.1:9074<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>\u8bbe\u7f6e php-fpm\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>cp \/usr\/local\/src\/php-7.4.4\/sapi\/fpm\/init.d.php-fpm \/etc\/rc.d\/init.d\/php74-fpm #\u62f7\u8d1dphp-fpm\u5230\u542f\u52a8\u76ee\u5f55<\/p>\n\n\n\n<p>chmod +x \/etc\/rc.d\/init.d\/php74-fpm #\u6dfb\u52a0\u6267\u884c\u6743\u9650<\/p>\n\n\n\n<p>chkconfig php74-fpm on #\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/p>\n\n\n\n<p>vi \/etc\/rc.d\/init.d\/php74-fpm<\/p>\n\n\n\n<p>prefix=\/usr\/local\/php74<\/p>\n\n\n\n<p>php_fpm_BIN=${exec_prefix}\/sbin\/php74-fpm<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>mv \/usr\/local\/php74\/sbin\/php-fpm \/usr\/local\/php74\/sbin\/php74-fpm<\/p>\n\n\n\n<p>vi \/usr\/local\/php74\/etc\/php.ini #\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>\u627e\u5230\uff1adisable_functions =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adisable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname<\/p>\n\n\n\n<p>#\u5217\u51faPHP\u53ef\u4ee5\u7981\u7528\u7684\u51fd\u6570\uff0c\u5982\u679c\u67d0\u4e9b\u7a0b\u5e8f\u9700\u8981\u7528\u5230\u8fd9\u4e2a\u51fd\u6570\uff0c\u53ef\u4ee5\u5220\u9664\uff0c\u53d6\u6d88\u7981\u7528\u3002<\/p>\n\n\n\n<p>\u627e\u5230\uff1a;date.timezone =<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1adate.timezone = PRC #\u8bbe\u7f6e\u65f6\u533a<\/p>\n\n\n\n<p>\u627e\u5230\uff1aexpose_php = On<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aexpose_php = Off #\u7981\u6b62\u663e\u793aphp\u7248\u672c\u7684\u4fe1\u606f<\/p>\n\n\n\n<p>\u627e\u5230\uff1ashort_open_tag = Off<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1ashort_open_tag = ON #\u652f\u6301php\u77ed\u6807\u7b7e<\/p>\n\n\n\n<p>\u627e\u5230opcache.enable=0<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3aopcache.enable=1 #php\u652f\u6301opcode\u7f13\u5b58<\/p>\n\n\n\n<p>\u627e\u5230\uff1a;opcache.enable_cli=1<\/p>\n\n\n\n<p>\u4fee\u6539\u4e3a\uff1aopcache.enable_cli=0 #php\u652f\u6301opcode\u7f13\u5b58<\/p>\n\n\n\n<p>\u5728\u6700\u540e\u4e00\u884c\u6dfb\u52a0\uff1azend_extension=opcache.so #\u5f00\u542fopcode\u7f13\u5b58\u529f\u80fd<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>#\u6062\u590dopenssl\u5b89\u88c5\u7248\u672c<\/p>\n\n\n\n<p>mv \/usr\/bin\/openssl \/usr\/bin\/openssl.old<\/p>\n\n\n\n<p>mv \/usr\/include\/openssl \/usr\/include\/openssl.old<\/p>\n\n\n\n<p>mv \/usr\/lib64\/libssl.so \/usr\/lib64\/libssl.so.old<\/p>\n\n\n\n<p>ln -s \/usr\/local\/ssl\/bin\/openssl \/usr\/bin\/openssl<\/p>\n\n\n\n<p>ln -s \/usr\/local\/ssl\/include\/openssl \/usr\/include\/openssl<\/p>\n\n\n\n<p>ln -s \/usr\/local\/ssl\/lib\/libssl.so \/usr\/lib64\/libssl.so<\/p>\n\n\n\n<p>ldconfig -v #\u5efa\u7acb\u52a8\u6001\u94fe\u63a5<\/p>\n\n\n\n<p>openssl version<\/p>\n\n\n\n<p>\u56db\u3001\u914d\u7f6enginx\u652f\u6301php<\/p>\n\n\n\n<p>vi \/usr\/local\/nginx\/conf\/nginx.conf<\/p>\n\n\n\n<p>#\u4fee\u6539\/usr\/local\/nginx\/conf\/nginx.conf \u914d\u7f6e\u6587\u4ef6,\u9700\u505a\u5982\u4e0b\u4fee\u6539<\/p>\n\n\n\n<p>user www www;&nbsp; #\u9996\u884cuser\u53bb\u6389\u6ce8\u91ca,\u4fee\u6539Nginx\u8fd0\u884c\u7ec4\u4e3awww www\uff1b\u5fc5\u987b\u4e0e\/usr\/local\/php\/etc\/php-fpm.conf\u4e2d\u7684user,group\u914d\u7f6e\u76f8\u540c\uff0c\u5426\u5219php\u8fd0\u884c\u51fa\u9519<\/p>\n\n\n\n<p>index index.html index.htm index.php; #\u6dfb\u52a0index.php<\/p>\n\n\n\n<p># pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000<\/p>\n\n\n\n<p>#<\/p>\n\n\n\n<p>location ~ \\.php$ {<\/p>\n\n\n\n<p>root html;<\/p>\n\n\n\n<p>fastcgi_pass 127.0.0.1:9053;<\/p>\n\n\n\n<p>fastcgi_index index.php;<\/p>\n\n\n\n<p>fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<\/p>\n\n\n\n<p>include fastcgi_params;<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>#\u53d6\u6d88FastCGI server\u90e8\u5206location\u7684\u6ce8\u91ca,\u6ce8\u610ffastcgi_param\u884c\u7684\u53c2\u6570,\u6539\u4e3a$document_root$fastcgi_script_name,\u6216\u8005\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84<\/p>\n\n\n\n<p>\/etc\/init.d\/nginx restart #\u91cd\u542fnginx<\/p>\n\n\n\n<p>service php71-fpm start #\u542f\u52a8php71-fpm<\/p>\n\n\n\n<p>\u8bf4\u660e\uff1a<\/p>\n\n\n\n<p>fastcgi_pass 127.0.0.1:9000;\u4e2d\u4f7f\u7528\u7aef\u53e3\u53f7\u6765\u533a\u5206php\u7248\u672c,\u9700\u8981\u4f7f\u7528\u54ea\u4e2aphp\u7248\u672c\u5c31\u4fee\u6539\u4e3a\u76f8\u5e94\u7684\u7aef\u53e3\u3002<\/p>\n\n\n\n<p>9074\u5bf9\u5e94\u7684php\u7248\u672c\u662fphp7.4.x<\/p>\n\n\n\n<p>9073\u5bf9\u5e94\u7684php\u7248\u672c\u662fphp7.3.x<\/p>\n\n\n\n<p>9072\u5bf9\u5e94\u7684php\u7248\u672c\u662fphp7.2.x<\/p>\n\n\n\n<p>9071\u5bf9\u5e94\u7684php\u7248\u672c\u662fphp7.1.x<\/p>\n\n\n\n<p>9070\u5bf9\u5e94\u7684php\u7248\u672c\u662fphp7.0.x<\/p>\n\n\n\n<p>9056\u5bf9\u5e94\u7684php\u7248\u672c\u662fphp5.6.x<\/p>\n\n\n\n<p>9055\u5bf9\u5e94\u7684php\u7248\u672c\u662fphp5.5.x<\/p>\n\n\n\n<p>9053\u5bf9\u5e94\u7684php\u7248\u672c\u662fphp5.3.x<\/p>\n\n\n\n<p><strong>\u4e94\u3001\u591a\u7248\u672cphp\u5171\u5b58\u603b\u7ed3<\/strong><\/p>\n\n\n\n<p>1\u3001\u89c4\u5212php\u5b89\u88c5\u8def\u5f84<\/p>\n\n\n\n<p>\/usr\/local\/php53<\/p>\n\n\n\n<p>\/usr\/local\/php55<\/p>\n\n\n\n<p>\/usr\/local\/php56<\/p>\n\n\n\n<p>\/usr\/local\/php70<\/p>\n\n\n\n<p>\/usr\/local\/php71<\/p>\n\n\n\n<p>\/usr\/local\/php72<\/p>\n\n\n\n<p>\/usr\/local\/php73<\/p>\n\n\n\n<p>\/usr\/local\/php74<\/p>\n\n\n\n<p>2\u3001\u7f16\u8bd1php\u53c2\u6570<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php53 &#8211;with-config-file-path=\/usr\/local\/php53\/etc &#8211;with-pdo-mysql=mysqlnd &#8211;enable-mysqlnd-compression-support &#8211;with-gd=\/usr\/local\/gd &#8211;with-png-dir=\/usr\/lib &#8211;with-jpeg-dir=\/usr\/lib &#8211;with-freetype-dir=\/usr\/lib &#8211;with-iconv &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;enable-xml &#8211;enable-magic-quotes &#8211;enable-safe-mode &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;with-curlwrappers &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;enable-gd-native-ttf &#8211;with-openssl=\/usr\/local\/ssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;enable-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-mcrypt &#8211;with-curl=\/usr\/local\/curl &#8211;enable-ctype &#8211;enable-mysqlnd<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php55 &#8211;with-config-file-path=\/usr\/local\/php55\/etc &#8211;with-mysqli=mysqlnd &#8211;with-pdo-mysql=mysqlnd &#8211;enable-mysqlnd-compression-support &#8211;with-gd=\/usr\/local\/libgd &#8211;with-png-dir=\/usr\/local\/libpng &#8211;with-jpeg-dir=\/usr\/local\/jpeg &#8211;with-freetype-dir=\/usr\/local\/freetype &#8211;with-xpm-dir=\/usr\/lib64 &#8211;with-vpx-dir=\/usr\/local\/libvpx\/ &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;with-t1lib=\/usr\/local\/t1lib &#8211;with-iconv &#8211;enable-libxml &#8211;enable-xml &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;enable-opcache &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;enable-gd-native-ttf &#8211;with-openssl=\/usr\/local\/ssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;enable-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-mcrypt &#8211;with-curl=\/usr\/local\/curl &#8211;enable-ctype &#8211;enable-mysqlnd<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php56 &#8211;with-config-file-path=\/usr\/local\/php56\/etc &#8211;with-mysqli=mysqlnd &#8211;with-pdo-mysql=mysqlnd &#8211;enable-mysqlnd-compression-support &#8211;with-gd=\/usr\/local\/libgd &#8211;with-png-dir=\/usr\/local\/libpng &#8211;with-jpeg-dir=\/usr\/local\/jpeg &#8211;with-freetype-dir=\/usr\/local\/freetype &#8211;with-xpm-dir=\/usr\/lib64 &#8211;with-vpx-dir=\/usr\/local\/libvpx\/ &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;with-t1lib=\/usr\/local\/t1lib &#8211;with-iconv &#8211;enable-libxml &#8211;enable-xml &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;enable-opcache &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;enable-gd-native-ttf &#8211;with-openssl=\/usr\/local\/ssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;enable-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-mcrypt &#8211;with-curl=\/usr\/local\/curl &#8211;enable-ctype &#8211;enable-mysqlnd<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php70 &#8211;with-config-file-path=\/usr\/local\/php70\/etc &#8211;with-mysqli=mysqlnd &#8211;with-pdo-mysql=mysqlnd &#8211;enable-mysqlnd-compression-support &#8211;with-gd=\/usr\/local\/libgd &#8211;with-png-dir=\/usr\/local\/libpng &#8211;with-jpeg-dir=\/usr\/local\/jpeg &#8211;with-freetype-dir=\/usr\/local\/freetype &#8211;with-xpm-dir=\/usr\/lib64 &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;with-iconv &#8211;enable-libxml &#8211;enable-xml &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;enable-opcache &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;enable-gd-native-ttf &#8211;with-openssl=\/usr\/local\/ssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;enable-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-mcrypt &#8211;with-curl=\/usr\/local\/curl &#8211;enable-ctype &#8211;enable-mysqlnd<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php71 &#8211;with-config-file-path=\/usr\/local\/php71\/etc &#8211;with-mysqli=mysqlnd &#8211;with-pdo-mysql=mysqlnd &#8211;enable-mysqlnd-compression-support &#8211;with-gd=\/usr\/local\/libgd &#8211;with-png-dir=\/usr\/local\/libpng &#8211;with-jpeg-dir=\/usr\/local\/jpeg &#8211;with-freetype-dir=\/usr\/local\/freetype &#8211;with-xpm-dir=\/usr\/lib64 &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;with-iconv &#8211;enable-libxml &#8211;enable-xml &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;enable-opcache &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;enable-gd-native-ttf &#8211;with-openssl=\/usr\/local\/ssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;enable-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-mcrypt &#8211;with-curl=\/usr\/local\/curl &#8211;enable-ctype &#8211;enable-mysqlnd<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php72 &#8211;with-config-file-path=\/usr\/local\/php72\/etc &#8211;with-mysqli=mysqlnd &#8211;with-pdo-mysql=mysqlnd &#8211;enable-mysqlnd-compression-support &#8211;with-gd=\/usr\/local\/libgd &#8211;with-png-dir=\/usr\/local\/libpng &#8211;with-jpeg-dir=\/usr\/local\/jpeg &#8211;with-freetype-dir=\/usr\/local\/freetype &#8211;with-xpm-dir=\/usr\/lib64 &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;with-iconv &#8211;enable-libxml &#8211;enable-xml &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;enable-opcache &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;with-openssl=\/usr\/local\/ssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;enable-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-curl=\/usr\/local\/curl &#8211;enable-ctype &#8211;enable-mysqlnd<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php73 &#8211;with-config-file-path=\/usr\/local\/php73\/etc &#8211;with-mysqli=mysqlnd &#8211;with-pdo-mysql=mysqlnd &#8211;enable-mysqlnd-compression-support &#8211;with-gd=\/usr\/local\/libgd &#8211;with-png-dir=\/usr\/local\/libpng &#8211;with-jpeg-dir=\/usr\/local\/jpeg &#8211;with-freetype-dir=\/usr\/local\/freetype &#8211;with-xpm-dir=\/usr\/lib64 &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;with-iconv &#8211;enable-libxml &#8211;enable-xml &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;enable-opcache &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;with-openssl=\/usr\/local\/ssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;enable-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-curl=\/usr\/local\/curl &#8211;enable-ctype &#8211;enable-mysqlnd &#8211;enable-pdo<\/p>\n\n\n\n<p>.\/configure &#8211;prefix=\/usr\/local\/php74 &#8211;with-config-file-path=\/usr\/local\/php74\/etc &#8211;with-mysqli=mysqlnd &#8211;with-pdo-mysql=mysqlnd &#8211;enable-gd &#8211;with-jpeg=\/usr\/local\/jpeg &#8211;with-freetype=\/usr\/local\/freetype &#8211;with-xpm=\/usr\/lib64 &#8211;with-zlib-dir=\/usr\/local\/zlib &#8211;with-iconv &#8211;with-libxml &#8211;enable-xml &#8211;enable-bcmath &#8211;enable-shmop &#8211;enable-sysvsem &#8211;enable-inline-optimization &#8211;enable-opcache &#8211;enable-mbregex &#8211;enable-fpm &#8211;enable-mbstring &#8211;enable-ftp &#8211;with-openssl &#8211;enable-pcntl &#8211;enable-sockets &#8211;with-xmlrpc &#8211;with-zip &#8211;enable-soap &#8211;without-pear &#8211;with-gettext &#8211;enable-session &#8211;with-curl &#8211;enable-ctype &#8211;enable-mysqlnd &#8211;enable-pdo<\/p>\n\n\n\n<p>3\u3001php\u5f00\u673a\u542f\u52a8\u8bbe\u7f6e<\/p>\n\n\n\n<p>cp \/usr\/local\/src\/php-5.3.29\/sapi\/fpm\/init.d.php-fpm \/etc\/rc.d\/init.d\/php53-fpm<\/p>\n\n\n\n<p>vi \/etc\/rc.d\/init.d\/php53-fpm<\/p>\n\n\n\n<p>prefix=\/usr\/local\/php53<\/p>\n\n\n\n<p>php_fpm_BIN=${exec_prefix}\/sbin\/php53-fpm<\/p>\n\n\n\n<p>mv \/usr\/local\/php53\/sbin\/php-fpm&nbsp; &nbsp; \/usr\/local\/php53\/sbin\/php53-fpm<\/p>\n\n\n\n<p>4\u3001php\u76d1\u542c\u7aef\u53e3\u8bbe\u7f6e<\/p>\n\n\n\n<p>vi \/usr\/local\/php53\/etc\/php-fpm.conf #\u7f16\u8f91<\/p>\n\n\n\n<p>user = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u8d26\u53f7\u4e3awww<\/p>\n\n\n\n<p>group = www #\u8bbe\u7f6ephp-fpm\u8fd0\u884c\u7ec4\u4e3awww<\/p>\n\n\n\n<p>pid = run\/php-fpm.pid #\u53d6\u6d88\u524d\u9762\u7684\u5206\u53f7<\/p>\n\n\n\n<p>listen = 127.0.0.1:9053<\/p>\n\n\n\n<p>5\u3001nginx\u7ed3\u5408php<\/p>\n\n\n\n<p>\u4fee\u6539nginx\u7ad9\u70b9\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>\/usr\/local\/nginx\/conf\/nginx.conf<\/p>\n\n\n\n<p>fastcgi_pass 127.0.0.1:9053;<\/p>\n\n\n\n<p>\u6839\u636e\u4e4b\u524dphp\u7684\u8bbe\u7f6e\uff0c\u9009\u62e9\u76f8\u5e94\u7684\u7aef\u53e3\uff0c\u4f8b\u59829053\u5bf9\u5e94\u7684php\u7248\u672c\u662fphp5.3.x<\/p>\n\n\n\n<p>\u90a3\u4e48\u6b64\u7ad9\u70b9\u7684php\u7248\u672c\u5c31\u4e3aphp5.3.x<\/p>\n\n\n\n<p>fastcgi_pass 127.0.0.1:9055;<\/p>\n\n\n\n<p>\u6839\u636e\u4e4b\u524dphp\u7684\u8bbe\u7f6e\uff0c\u9009\u62e9\u76f8\u5e94\u7684\u7aef\u53e3\uff0c\u4f8b\u59829055\u5bf9\u5e94\u7684php\u7248\u672c\u662fphp5.5.x<\/p>\n\n\n\n<p>\u90a3\u4e48\u6b64\u7ad9\u70b9\u7684php\u7248\u672c\u5c31\u4e3aphp5.5.x<\/p>\n\n\n\n<p><strong>\u6d4b\u8bd5\u7bc7<\/strong><\/p>\n\n\n\n<p>cd \/usr\/local\/nginx\/html\/ #\u8fdb\u5165nginx\u9ed8\u8ba4\u7f51\u7ad9\u6839\u76ee\u5f55<\/p>\n\n\n\n<p>rm -rf \/usr\/local\/nginx\/html\/* #\u5220\u9664\u9ed8\u8ba4\u6d4b\u8bd5\u9875<\/p>\n\n\n\n<p>vi index.php #\u65b0\u5efaindex.php\u6587\u4ef6<\/p>\n\n\n\n<p>&lt;?php<\/p>\n\n\n\n<p>phpinfo();<\/p>\n\n\n\n<p>?&gt;<\/p>\n\n\n\n<p>:wq! #\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>chown www.www \/usr\/local\/nginx\/html\/ -R #\u8bbe\u7f6e\u76ee\u5f55\u6240\u6709\u8005<\/p>\n\n\n\n<p>chmod 700 \/usr\/local\/nginx\/html\/ -R #\u8bbe\u7f6e\u76ee\u5f55\u6743\u9650<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u540e\u8bb0\uff1a<\/strong><\/p>\n\n\n\n<p>CentOS 8.x + MySQL8.0.x + php 7.4\u7ec4\u5408\u5efa\u8bae\u4f7f\u7528\u7cfb\u7edf\u81ea\u5e26\u7684GD\u5e93\u8fdb\u884c\u7f16\u8bd1\uff0cphp\u9a71\u52a8\u53ea\u6709mysqli\u548cmysqlnd\u9a71\u52a8\u3002<\/p>\n\n\n\n<p>CentOS 8.x + MySQL8.0.x + php 7.3\/7.2\/7.1\/7.0\/5.6\/5.5\u7ec4\u5408\u5efa\u8bae\u4f7f\u7528libgd-2.3.0\u8fdb\u884c\u7f16\u8bd1\uff0cphp\u9a71\u52a8\u5305\u62ecmysqli\u548cmysqlnd<\/p>\n\n\n\n<p>CentOS 8.x + MySQL8.0.x + php 5.3\u7ec4\u5408\u5efa\u8bae\u4f7f\u7528gd-2.0.35\u8fdb\u884c\u7f16\u8bd1\uff0cphp\u9a71\u52a8\u53ea\u6709mysqlnd<\/p>\n\n\n\n<p>CentOS 8.x + MySQL8.0.x + php 5.4\/5.2\uff0c\u6b64\u7ec4\u5408\u76ee\u524d\u7f16\u8bd1\u5b89\u88c5php\u5b58\u5728\u95ee\u9898\uff0c\u4e0d\u63a8\u8350\u3002<\/p>\n\n\n\n<p>\u63a8\u8350\uff1aCentOS 8.x + MySQL8.0.x\u4f7f\u7528php 7.3\/7.2\/7.1\/7.0\/5.6\/5.5\u7ec4\u5408\u6700\u4f73\u3002<\/p>\n\n\n\n<p>php\u5404\u4e2a\u5c0f\u7248\u672c\u7684\u5b89\u88c5\u8fc7\u7a0b\u76f8\u540c\uff0c\u5982php 7.3.10\u548cphp 7.3.16\u5b89\u88c5\u8fc7\u7a0b\u4e00\u6837\u3002<\/p>\n\n\n\n<p><strong>\u81f3\u6b64\uff0cCentOS 8.x\u7f16\u8bd1\u5b89\u88c5Nginx1.16.x+MySQL8.0.x+PHP7.4.x 7.3.x 7.2.x 7.1.x 7.0.x 5.6.x 5.5.x 5.3.x \u591a\u7248\u672c\u5168\u80fd\u73af\u5883\u6559\u7a0b\u5b8c\u6210\u3002<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS 8.x\u7f16\u8bd1\u5b89\u88c5Nginx1.16.x+MySQL8.0.x+PHP7.4.x 7.3.x 7.2 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/b.yesiyu.top\/?p=331\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cCentOS 8.x\u7f16\u8bd1\u5b89\u88c5Nginx1.16.x+MySQL8.0.x+PHP7.4.x 7.3.x 7.2.x 7.1.x 7.0.x 5.6.x 5.5.x 5.3.x \u591a\u7248\u672c\u5168\u80fd\u73af\u5883\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-331","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/posts\/331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=331"}],"version-history":[{"count":1,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/posts\/331\/revisions"}],"predecessor-version":[{"id":332,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=\/wp\/v2\/posts\/331\/revisions\/332"}],"wp:attachment":[{"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/b.yesiyu.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}