1、安装支持扩展(根据自己需求决定安装哪些扩展)
1.1、安装Autoconf
<span class="com">#下载地址:http://mirrors.kernel.org/gnu/autoconf/</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span><span class="pln">
tar zxvf autoconf</span><span class="pun">-</span><span class="lit">2.69</span><span class="pun">.</span><span class="pln">tar</span><span class="pun">.</span><span class="pln">gz
cd autoconf</span><span class="pun">-</span><span class="lit">2.69</span><span class="pun">/</span>
<span class="pun">./</span><span class="pln">configure </span><span class="pun">--</span><span class="pln">prefix</span><span class="pun">=</span><span class="str">/usr/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">autoconf</span><span class="pun">-</span><span class="lit">2.69</span><span class="pln">
make </span><span class="pun">&&</span><span class="pln"> make install
ln </span><span class="pun">-</span><span class="pln">s </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">autoconf</span><span class="pun">-</span><span class="lit">2.69</span><span class="str">/ /</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">autoconf
rm </span><span class="pun">-</span><span class="pln">rf autoconf</span><span class="pun">-</span><span class="lit">2.69</span><span class="pun">/</span>
1.2、安装libiconv(PHP必须)
<span class="com">#下载地址:http://www.gnu.org/software/libiconv/#downloading</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span><span class="pln">
tar zxvf libiconv</span><span class="pun">-</span><span class="lit">1.15</span><span class="pun">.</span><span class="pln">tar</span><span class="pun">.</span><span class="pln">gz
cd libiconv</span><span class="pun">-</span><span class="lit">1.15</span>
<span class="pun">./</span><span class="pln">configure </span><span class="pun">--</span><span class="pln">prefix</span><span class="pun">=</span><span class="str">/usr/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">libiconv</span><span class="pun">-</span><span class="lit">1.15</span> <span class="pun">--</span><span class="pln">enable</span><span class="pun">-</span><span class="kwd">static</span><span class="pln">
make </span><span class="pun">&&</span><span class="pln"> make install
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">libiconv</span><span class="pun">-</span><span class="lit">1.15</span><span class="str">/ /</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">libiconv
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">libiconv</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libiconv</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">2</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libiconv</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">2</span><span class="pln">
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">libiconv</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libiconv</span><span class="pun">.</span><span class="pln">so </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libiconv</span><span class="pun">.</span><span class="pln">so
ldconfig
rm </span><span class="pun">-</span><span class="pln">rf libiconv</span><span class="pun">-</span><span class="lit">1.15</span>
1.3、安装libmcrypt
<span class="com">#下载地址:https://sourceforge.net/projects/mcrypt/files/Libmcrypt/</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span><span class="pln">
tar zxvf libmcrypt</span><span class="pun">-</span><span class="lit">2.5</span><span class="pun">.</span><span class="lit">8.tar</span><span class="pun">.</span><span class="pln">gz
cd libmcrypt</span><span class="pun">-</span><span class="lit">2.5</span><span class="pun">.</span><span class="lit">8</span><span class="pun">/</span>
<span class="pun">./</span><span class="pln">configure
make </span><span class="pun">&&</span><span class="pln"> make install
ldconfig
cd libltdl</span><span class="pun">/</span>
<span class="pun">./</span><span class="pln">configure </span><span class="pun">--</span><span class="pln">enable</span><span class="pun">-</span><span class="pln">ltdl</span><span class="pun">-</span><span class="pln">install
make </span><span class="pun">&&</span><span class="pln"> make install
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmcrypt</span><span class="pun">.</span><span class="pln">la </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmcrypt</span><span class="pun">.</span><span class="pln">la
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmcrypt</span><span class="pun">.</span><span class="pln">so </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmcrypt</span><span class="pun">.</span><span class="pln">so
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmcrypt</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">4</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmcrypt</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">4</span><span class="pln">
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmcrypt</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">4.4</span><span class="pun">.</span><span class="lit">8</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmcrypt</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">4.4</span><span class="pun">.</span><span class="lit">8</span><span class="pln">
ldconfig
rm </span><span class="pun">-</span><span class="pln">rf libmcrypt</span><span class="pun">-</span><span class="lit">2.5</span><span class="pun">.</span><span class="lit">8</span>
1.4、安装mhash
<span class="com">#下载地址:http://mhash.sf.net/</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span><span class="pln">
tar zxvf mhash</span><span class="pun">-</span><span class="lit">0.8</span><span class="pun">.</span><span class="lit">15.tar</span><span class="pun">.</span><span class="pln">gz
cd mhash</span><span class="pun">-</span><span class="lit">0.8</span><span class="pun">.</span><span class="lit">15</span><span class="pun">/</span>
<span class="pun">./</span><span class="pln">configure
make </span><span class="pun">&&</span><span class="pln"> make install
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmhash</span><span class="pun">.</span><span class="pln">a </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmhash</span><span class="pun">.</span><span class="pln">a
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmhash</span><span class="pun">.</span><span class="pln">la </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmhash</span><span class="pun">.</span><span class="pln">la
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmhash</span><span class="pun">.</span><span class="pln">so </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmhash</span><span class="pun">.</span><span class="pln">so
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmhash</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">2</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmhash</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">2</span><span class="pln">
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmhash</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">2.0</span><span class="pun">.</span><span class="lit">1</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libmhash</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">2.0</span><span class="pun">.</span><span class="lit">1</span><span class="pln">
ldconfig
rm </span><span class="pun">-</span><span class="pln">rf mhash</span><span class="pun">-</span><span class="lit">0.8</span><span class="pun">.</span><span class="lit">15</span>
1.5、安装mcrypt
<span class="com">#下载地址:https://sourceforge.net/projects/mcrypt/</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span><span class="pln">
tar zxvf mcrypt</span><span class="pun">-</span><span class="lit">2.6</span><span class="pun">.</span><span class="lit">8.tar</span><span class="pun">.</span><span class="pln">gz
cd mcrypt</span><span class="pun">-</span><span class="lit">2.6</span><span class="pun">.</span><span class="lit">8</span><span class="pun">/</span>
<span class="pun">./</span><span class="pln">configure </span><span class="pun">--</span><span class="pln">prefix</span><span class="pun">=</span><span class="str">/usr/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">mcrypt</span><span class="pun">-</span><span class="lit">2.6</span><span class="pun">.</span><span class="lit">8</span><span class="pln">
make </span><span class="pun">&&</span><span class="pln"> make install
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">mcrypt</span><span class="pun">-</span><span class="lit">2.6</span><span class="pun">.</span><span class="lit">8</span><span class="str">/ /</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">mcrypt
rm </span><span class="pun">-</span><span class="pln">rf mcrypt</span><span class="pun">-</span><span class="lit">2.6</span><span class="pun">.</span><span class="lit">8</span>
1.6、安装freetype
<span class="com">#下载地址:https://download.savannah.gnu.org/releases/freetype/</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span><span class="pln">
tar zxvf freetype</span><span class="pun">-</span><span class="lit">2.9</span><span class="pun">.</span><span class="lit">1.tar</span><span class="pun">.</span><span class="pln">gz
cd freetype</span><span class="pun">-</span><span class="lit">2.9</span><span class="pun">.</span><span class="lit">1</span><span class="pun">/</span>
<span class="pun">./</span><span class="pln">configure </span><span class="pun">--</span><span class="pln">prefix</span><span class="pun">=</span><span class="str">/usr/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">freetype</span><span class="pun">-</span><span class="lit">2.9</span><span class="pun">.</span><span class="lit">1</span><span class="pln">
make </span><span class="pun">&&</span><span class="pln"> make install
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">freetype</span><span class="pun">-</span><span class="lit">2.9</span><span class="pun">.</span><span class="lit">1</span><span class="str">/ /</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">freetype
</span><span class="com">#cp /usr/local/freetype/lib/pkgconfig/freetype2.pc /usr/lib/pkgconfig/ 这句未执行</span><span class="pln">
cat </span><span class="pun">></span> <span class="str">/etc/</span><span class="pln">ld</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="pln">conf</span><span class="pun">.</span><span class="pln">d</span><span class="pun">/</span><span class="pln">freetype</span><span class="pun">.</span><span class="pln">conf</span><span class="pun"><<</span><span class="pln">EOF
</span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">freetype</span><span class="pun">/</span><span class="pln">lib
EOF
ldconfig
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">freetype</span><span class="pun">/</span><span class="pln">include</span><span class="pun">/</span><span class="pln">freetype2</span><span class="com">/* /usr/include/</span>
1.7、安装pcre
<span class="com">#下载地址:https://www.pcre.org/</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span><span class="pln">
tar zxvf pcre</span><span class="pun">-</span><span class="lit">8.42</span><span class="pun">.</span><span class="pln">tar</span><span class="pun">.</span><span class="pln">gz
cd pcre</span><span class="pun">-</span><span class="lit">8.42</span><span class="pun">/</span>
<span class="pun">./</span><span class="pln">configure </span><span class="pun">--</span><span class="pln">prefix</span><span class="pun">=</span><span class="str">/usr/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">pcre</span><span class="pun">-</span><span class="lit">8.42</span><span class="pun">/</span><span class="pln">
make </span><span class="pun">&&</span><span class="pln"> make install
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">pcre</span><span class="pun">-</span><span class="lit">8.42</span><span class="str">/ /</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">pcre
rm </span><span class="pun">-</span><span class="pln">rf pcre</span><span class="pun">-</span><span class="lit">8.42</span>
1.8、内存管理优化工具(可以不装,也可以二选一)
1.8.1、安装Jemalloc
<span class="com">#下载地址:https://github.com/jemalloc/jemalloc/releases</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span><span class="pln">
tar jxvf jemalloc</span><span class="pun">-</span><span class="lit">5.1</span><span class="pun">.</span><span class="lit">0.tar</span><span class="pun">.</span><span class="pln">bz2
cd jemalloc</span><span class="pun">-</span><span class="lit">5.1</span><span class="pun">.</span><span class="lit">0</span><span class="pun">/</span>
<span class="pun">./</span><span class="pln">configure
make </span><span class="pun">&&</span><span class="pln"> make install
ldconfig
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libjemalloc</span><span class="pun">*</span> <span class="str">/usr/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">
rm </span><span class="pun">-</span><span class="pln">rf jemalloc</span><span class="pun">-</span><span class="lit">5.1</span><span class="pun">.</span><span class="lit">0</span>
1.8.2、安装TCMalloc(TCMalloc是gperftools的一个插件,所以直接安装gperftools即可)
因为gperftools需要libunwind,我们先来安装libunwind。
1.8.2.1、安装libunwind
<span class="com">#下载地址:http://download.savannah.gnu.org/releases/libunwind/</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span><span class="pln">
tar zxvf libunwind</span><span class="pun">-</span><span class="lit">1.2</span><span class="pun">.</span><span class="pln">tar</span><span class="pun">.</span><span class="pln">gz
cd libunwind</span><span class="pun">-</span><span class="lit">1.2</span><span class="pun">/</span><span class="pln">
CFLAGS</span><span class="pun">=-</span><span class="pln">fPIC </span><span class="pun">./</span><span class="pln">configure
make CFLAGS</span><span class="pun">=-</span><span class="pln">fPIC
make CFLAGS</span><span class="pun">=-</span><span class="pln">fPIC install
rm </span><span class="pun">-</span><span class="pln">rf libunwind</span><span class="pun">-</span><span class="lit">1.2</span>
1.8.2.2、安装gperftools
<span class="com">#下载地址:https://github.com/gperftools/gperftools.git</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span>
<span class="com">#使用Git库安装</span><span class="pln">
git clone https</span><span class="pun">:</span><span class="com">//github.com/gperftools/gperftools.git</span>
<span class="com">#或用工具包内文件安装</span><span class="pln">
tar zxvf gperftools</span><span class="pun">-</span><span class="lit">2.7</span><span class="pun">.</span><span class="pln">tar</span><span class="pun">.</span><span class="pln">gz
cd gperftools</span><span class="pun">-</span><span class="lit">2.7</span><span class="pun">/</span>
<span class="com">#判断系统是32还是64位</span><span class="pln">
getconf LONG_BIT
</span><span class="pun">./</span><span class="pln">autogen</span><span class="pun">.</span><span class="pln">sh
</span><span class="com">#如果64位执行</span>
<span class="pun">./</span><span class="pln">configure
</span><span class="com">#如果是32位执行</span>
<span class="pun">./</span><span class="pln">configure </span><span class="pun">--</span><span class="pln">enable</span><span class="pun">-</span><span class="pln">frame</span><span class="pun">-</span><span class="pln">pointers
make
make install
ldconfig
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libtcmalloc</span><span class="pun">*</span> <span class="str">/usr/</span><span class="pln">lib</span><span class="pun">/</span>
<span class="pun">=================</span><span class="typ">Nginx</span><span class="pun">配置====================</span><span class="pln">
mkdir </span><span class="pun">/</span><span class="pln">tmp</span><span class="pun">/</span><span class="pln">tcmalloc
chown </span><span class="pun">-</span><span class="pln">R www</span><span class="pun">:</span><span class="pln">www </span><span class="pun">/</span><span class="pln">tmp</span><span class="pun">/</span><span class="pln">tcmalloc
sed </span><span class="pun">-</span><span class="pln">i </span><span class="str">'/nginx.pid/a\
google_perftools_profiles /tmp/tcmalloc;'</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">nginx</span><span class="pun">/</span><span class="pln">conf</span><span class="pun">/</span><span class="pln">nginx</span><span class="pun">.</span><span class="pln">conf</span>
1.9、安装openssl
<span class="com">#下载地址:https://www.openssl.org/source/snapshot/</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span><span class="pln">
tar zxvf openssl</span><span class="pun">-</span><span class="lit">1.1</span><span class="pun">.</span><span class="lit">0</span><span class="pun">-</span><span class="pln">stable</span><span class="pun">-</span><span class="pln">SNAP</span><span class="pun">-</span><span class="lit">20180901.tar</span><span class="pun">.</span><span class="pln">gz
</span><span class="pun">./</span><span class="pln">config </span><span class="pun">-</span><span class="pln">fPIC </span><span class="pun">--</span><span class="pln">prefix</span><span class="pun">=</span><span class="str">/usr/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">openssl</span><span class="pun">-</span><span class="lit">1.1</span><span class="pun">.</span><span class="lit">0</span> <span class="pun">--</span><span class="pln">openssldir</span><span class="pun">=</span><span class="str">/usr/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">openssl</span><span class="pun">-</span><span class="lit">1.1</span><span class="pun">.</span><span class="lit">0</span><span class="pln">
perl configdata</span><span class="pun">.</span><span class="pln">pm </span><span class="pun">--</span><span class="kwd">dump</span><span class="pln">
make depend </span><span class="pun">&&</span><span class="pln"> make </span><span class="pun">&&</span><span class="pln"> make install
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">openssl</span><span class="pun">-</span><span class="lit">1.1</span><span class="pun">.</span><span class="lit">0</span><span class="str">/ /</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">openssl
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">openssl</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libssl</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">1.1</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libssl</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">1.1</span><span class="pln">
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">openssl</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libssl</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">1.1</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib64</span><span class="pun">/</span><span class="pln">libssl</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">1.1</span><span class="pln">
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">openssl</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libcrypto</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">1.1</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libcrypto</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">1.1</span><span class="pln">
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">openssl</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">libcrypto</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">1.1</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib64</span><span class="pun">/</span><span class="pln">libcrypto</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="lit">1.1</span><span class="pln">
rm </span><span class="pun">-</span><span class="pln">rf openssl</span><span class="pun">-</span><span class="lit">1.1</span><span class="pun">.</span><span class="lit">0</span><span class="pun">-</span><span class="pln">stable</span><span class="pun">-</span><span class="pln">SNAP</span><span class="pun">-</span><span class="lit">20180901</span>
1.10、安装Crul
<span class="com">#下载地址:https://curl.haxx.se/download.html</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span><span class="pln">
tar zxvf curl</span><span class="pun">-</span><span class="lit">7.61</span><span class="pun">.</span><span class="lit">0.tar</span><span class="pun">.</span><span class="pln">gz
cd curl</span><span class="pun">-</span><span class="lit">7.61</span><span class="pun">.</span><span class="lit">0</span><span class="pun">/</span>
<span class="pun">./</span><span class="pln">configure </span><span class="pun">--</span><span class="pln">prefix</span><span class="pun">=</span><span class="str">/usr/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">curl</span><span class="pun">-</span><span class="lit">7.61</span><span class="pun">.</span><span class="lit">0</span> <span class="pun">--</span><span class="pln">enable</span><span class="pun">-</span><span class="pln">ares </span><span class="pun">--</span><span class="pln">without</span><span class="pun">-</span><span class="pln">nss </span><span class="pun">--</span><span class="kwd">with</span><span class="pun">-</span><span class="pln">ssl</span><span class="pun">=</span><span class="str">/usr/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">openssl
make </span><span class="pun">&&</span><span class="pln"> make install
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">curl</span><span class="pun">-</span><span class="lit">7.65</span><span class="pun">.</span><span class="lit">1</span><span class="str">/ /</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">curl
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">curl</span><span class="pun">/</span><span class="pln">bin</span><span class="com">/* /usr/bin/
rm -rf curl-7.61.0</span>
备注:安装Crul的时候有可能提示:configure: error: c-ares library defective or too old
这里升级安装c-ares
<span class="com">#下载地址:https://c-ares.haxx.se/download/</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span><span class="pln">
tar zxvf c</span><span class="pun">-</span><span class="pln">ares</span><span class="pun">-</span><span class="lit">1.14</span><span class="pun">.</span><span class="lit">0.tar</span><span class="pun">.</span><span class="pln">gz
cd c</span><span class="pun">-</span><span class="pln">ares</span><span class="pun">-</span><span class="lit">1.14</span><span class="pun">.</span><span class="lit">0</span><span class="pun">/</span><span class="pln">
ll
</span><span class="pun">./</span><span class="pln">configure </span><span class="pun">--</span><span class="pln">prefix</span><span class="pun">=</span><span class="str">/usr/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">c</span><span class="pun">-</span><span class="pln">ares</span><span class="pun">-</span><span class="lit">1.14</span><span class="pun">.</span><span class="lit">0</span><span class="pln">
make
make install
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">c</span><span class="pun">-</span><span class="pln">ares</span><span class="pun">-</span><span class="lit">1.14</span><span class="pun">.</span><span class="lit">0</span><span class="str">/ /</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">c</span><span class="pun">-</span><span class="pln">ares
rm </span><span class="pun">-</span><span class="pln">rf c</span><span class="pun">-</span><span class="pln">ares</span><span class="pun">-</span><span class="lit">1.14</span><span class="pun">.</span><span class="lit">0</span>
<span class="com">#安装的时候需要 --enable-ares=/usr/local/c-ares/</span>
1.11、安装Nghttp2
<span class="com">#下载地址:https://github.com/nghttp2/nghttp2/releases</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span><span class="pln">
tar </span><span class="typ">Jxvf</span><span class="pln"> nghttp2</span><span class="pun">-</span><span class="lit">1.33</span><span class="pun">.</span><span class="lit">0.tar</span><span class="pun">.</span><span class="pln">xz
cd nghttp2</span><span class="pun">-</span><span class="lit">1.33</span><span class="pun">.</span><span class="lit">0</span><span class="pun">/</span>
<span class="pun">./</span><span class="pln">configure </span><span class="pun">--</span><span class="pln">prefix</span><span class="pun">=</span><span class="str">/usr/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">nghttp2</span><span class="pun">-</span><span class="lit">1.33</span><span class="pun">.</span><span class="lit">0</span><span class="pln">
make </span><span class="pun">&&</span><span class="pln"> make install
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">nghttp2</span><span class="pun">-</span><span class="lit">1.33</span><span class="pun">.</span><span class="lit">0</span><span class="str">/ /</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">nghttp2
rm </span><span class="pun">-</span><span class="pln">rf nghttp2</span><span class="pun">-</span><span class="lit">1.33</span><span class="pun">.</span><span class="lit">0</span>
1.12、安装boots(安装MySQL5.7和MySQL8.0需要)
<span class="com">#下载地址:https://www.boost.org/users/download/</span>
<span class="com">#工具包 https://gitee.com/bbhsky/Centos7-setup.git</span>
<span class="com">#解压即可</span><span class="pln">
tar zxvf boost_1_68_0</span><span class="pun">.</span><span class="pln">tar</span><span class="pun">.</span><span class="pln">gz
</span><span class="com">#MySQL5.7如果报错请测试低版本,比如1.59</span><span class="pln">
tar zxvf boost_1_59_0</span><span class="pun">.</span><span class="pln">tar</span><span class="pun">.</span><span class="pln">gz</span>
2、系统环境设置
2.1、设置虚拟内存
<span class="com">#其他建议设置成无限制(unlimited)的一些重要设置是: </span>
<span class="com">#数据段长度:ulimit -d unlimited </span>
<span class="com">#最大内存大小:ulimit -m unlimited </span>
<span class="com">#堆栈大小:ulimit -s unlimited </span>
<span class="com">#CPU 时间:ulimit -t unlimited </span>
<span class="pun">虚拟内存:</span><span class="pln">ulimit </span><span class="pun">-</span><span class="pln">v unlimited </span><span class="com">#建议设置</span>
2.2、设置libpng和libjpeg
<span class="com">#64位</span><span class="pln">
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib64</span><span class="pun">/</span><span class="pln">libpng</span><span class="pun">.*</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">
ln </span><span class="pun">-</span><span class="pln">sf </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib64</span><span class="pun">/</span><span class="pln">libjpeg</span><span class="pun">.*</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span>
2.3、加载新的lib库
<span class="pln">echo </span><span class="str">"/lib"</span> <span class="pun">>></span> <span class="str">/etc/</span><span class="pln">ld</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="pln">conf
echo </span><span class="str">"/usr/lib"</span> <span class="pun">>></span> <span class="str">/etc/</span><span class="pln">ld</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="pln">conf
echo </span><span class="str">"/usr/lib64"</span> <span class="pun">>></span> <span class="str">/etc/</span><span class="pln">ld</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="pln">conf
echo </span><span class="str">"/usr/local/lib"</span> <span class="pun">>></span> <span class="str">/etc/</span><span class="pln">ld</span><span class="pun">.</span><span class="pln">so</span><span class="pun">.</span><span class="pln">conf
ldconfig</span>
2.4、配置limits.conf
<span class="pln">cat </span><span class="pun">>></span><span class="str">/etc/</span><span class="pln">security</span><span class="pun">/</span><span class="pln">limits</span><span class="pun">.</span><span class="pln">conf</span><span class="pun"><<</span><span class="pln">eof
</span><span class="pun">*</span><span class="pln"> soft nproc </span><span class="lit">65535</span>
<span class="pun">*</span><span class="pln"> hard nproc </span><span class="lit">65535</span>
<span class="pun">*</span><span class="pln"> soft nofile </span><span class="lit">65535</span>
<span class="pun">*</span><span class="pln"> hard nofile </span><span class="lit">65535</span><span class="pln">
eof</span>
2.5、配置sysctl.conf
<span class="com">#参数表示进程可以同时打开的最大句柄数,这个参数直接限制最大并发连接数。</span><span class="pln">
echo </span><span class="str">"fs.file-max=65535"</span> <span class="pun">>></span> <span class="str">/etc/</span><span class="pln">sysctl</span><span class="pun">.</span><span class="pln">conf</span>
3、mysql安装
3.1、Docker安装(推荐)
http://res.798vps.com/304.html
3.2、编译安装5.7
4、编译安装php
4.1、安装编译7.2
4.2、安装编译7.3
5、编译安装Nginx
6、设置自启动
<span class="pln">systemctl enable mysql</span><span class="pun">.</span><span class="pln">service
systemctl enable php</span><span class="pun">-</span><span class="pln">fpm</span><span class="pun">.</span><span class="pln">service
systemctl enable nginx</span><span class="pun">.</span><span class="pln">service</span>
7、安装phpmyadmin
<span class="com">#下载地址:https://www.phpmyadmin.net</span>
<span class="com">#工具包 https://gitee.com/bbhsky/PHP-Setup.git</span><span class="pln">
unzip phpMyAdmin</span><span class="pun">-</span><span class="lit">4.8</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">all</span><span class="pun">-</span><span class="pln">languages</span><span class="pun">.</span><span class="pln">zip
mv phpMyAdmin</span><span class="pun">-</span><span class="lit">4.8</span><span class="pun">.</span><span class="lit">3</span><span class="pun">-</span><span class="pln">all</span><span class="pun">-</span><span class="pln">languages </span><span class="pun">/</span><span class="pln">home</span><span class="pun">/</span><span class="pln">wwwroot</span><span class="pun">/</span><span class="kwd">default</span><span class="pun">/</span><span class="pln">phpmyadmin
cp conf</span><span class="pun">/</span><span class="pln">config</span><span class="pun">.</span><span class="pln">inc</span><span class="pun">.</span><span class="pln">php </span><span class="pun">/</span><span class="pln">home</span><span class="pun">/</span><span class="pln">wwwroot</span><span class="pun">/</span><span class="kwd">default</span><span class="pun">/</span><span class="pln">phpmyadmin</span><span class="pun">/</span><span class="pln">config</span><span class="pun">.</span><span class="pln">inc</span><span class="pun">.</span><span class="pln">php
sed </span><span class="pun">-</span><span class="pln">i </span><span class="str">'s/LNMPORG/FoolTiger/g'</span> <span class="pun">/</span><span class="pln">home</span><span class="pun">/</span><span class="pln">wwwroot</span><span class="pun">/</span><span class="kwd">default</span><span class="pun">/</span><span class="pln">phpmyadmin</span><span class="pun">/</span><span class="pln">config</span><span class="pun">.</span><span class="pln">inc</span><span class="pun">.</span><span class="pln">php
mkdir </span><span class="pun">/</span><span class="pln">home</span><span class="pun">/</span><span class="pln">wwwroot</span><span class="pun">/</span><span class="kwd">default</span><span class="pun">/</span><span class="pln">phpmyadmin</span><span class="pun">/</span><span class="pln">upload
mkdir </span><span class="pun">/</span><span class="pln">home</span><span class="pun">/</span><span class="pln">wwwroot</span><span class="pun">/</span><span class="kwd">default</span><span class="pun">/</span><span class="pln">phpmyadmin</span><span class="pun">/</span><span class="pln">save
chmod </span><span class="lit">755</span> <span class="pun">-</span><span class="pln">R </span><span class="pun">/</span><span class="pln">home</span><span class="pun">/</span><span class="pln">wwwroot</span><span class="pun">/</span><span class="kwd">default</span><span class="pun">/</span><span class="pln">phpmyadmin</span><span class="pun">/</span><span class="pln">
chown www</span><span class="pun">:</span><span class="pln">www </span><span class="pun">-</span><span class="pln">R </span><span class="pun">/</span><span class="pln">home</span><span class="pun">/</span><span class="pln">wwwroot</span><span class="pun">/</span><span class="kwd">default</span><span class="pun">/</span><span class="pln">phpmyadmin</span><span class="pun">/</span>
8、安装Memcached
最新评论
十塊年費是直接從這張卡裡的外幣按匯率扣?
有人申请成功了吗?我的已经两天了,没有消息,没有收到成功邮件。信用卡扣了款!