{"rsdb":{"rid":"239249","subhead":"","postdate":"0","aid":"164907","fid":"85","uid":"1","topic":"1","content":"
\n

\u672c\u4eba\u4e4b\u524d\u6240\u4f7f\u7528 LNMP \u73af\u5883\u4e00\u76f4\u662f\u539f\u751f\u7684Nginx\u670d\u52a1\u5668\uff0c\u6700\u8fd1\u51e0\u5929\u770b\u4e86\u597d\u591a\u5927\u7f51\u7ad9\u4f7f\u7528 \u6dd8\u5b9d\u56e2\u961f\u57fa\u4e8eNginx\u5f00\u53d1\u7684 Tengine \u51b3\u5b9a\u7ed9\u81ea\u5df1\u7684\u865a\u62df\u673a\u4e5f\u88c5\u4e2a\u73a9\u73a9\u3002<\/p> \n

\u5173\u4e8eTengine\u7684\u4ecb\u7ecd\u5c31\u4e0d\u591a\u8bf4\u4e86\uff0c\u53cd\u6b63\u636e\u8bf4\u662f\u6027\u80fd\u6bd4\u539f\u751f\u7684 Nginx \u63d0\u5347\u4e86\u597d\u591a(\u53c2\u8003\uff1ahttp:\/\/tengine.taobao.org\/<\/a>)<\/p> \n

\u4ee5\u4e0b\u662f\u5173\u4e8e\u5b89\u88c5\u65b9\u9762\u8fc7\u7a0b\uff1a<\/p> \n

\u5728\u6b64\u4e4b\u524d\u8981\u63a8\u8350\u4e0b Linux\u7cfb\u7edf\u7b80\u5355\u6613\u7528\u7684\u4e0a\u4f20\u4e0b\u8f7d\u547d\u4ee4rz\u548csz<\/p> \n

\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7    yum install lrzsz   \u8fdb\u884c\u5b89\u88c5<\/p> \n

\u4e0a\u4f20\u4e0b\u8f7d\u547d\u4ee4\u6d4b\u8bd5<\/p> \n

  1)\u4e0a\u4f20\uff08rz\uff09<\/p> \n

  \u5728\u5ba2\u6237\u7aefSSH\u547d\u4ee4\u884c\u8fd0\u884crz\u547d\u4ee4\uff0c\u547d\u4ee4\u5982\u4e0b\uff1a<\/p> \n

[root@oldboy ~]# rz<\/p> \n

\u6267\u884c\u540e\u4f1a\u5f39\u51fa\u4e0a\u4f20\u6587\u4ef6\u7684\u9009\u62e9\u7a97\u53e3\uff0c\u53ef\u4ee5\u9009\u62e9\u76f8\u5173\u6587\u4ef6\u4e0a\u4f20\uff08\u4e0d\u652f\u6301\u76f4\u63a5\u4e0a\u4f20\u76ee\u5f55\uff09\u3002<\/p> \n

\u63d0\u793a:\u53ef\u4ee5\u4f7f\u7528rz -y\u5b9e\u73b0\u8986\u76d6\u4e0a\u4f20\uff0c\u4e0a\u4f20\u7a97\u53e3\u7684\u9ed8\u8ba4\u76ee\u5f55\u53ef\u4ee5\u5728SSH\u5ba2\u6237\u7aef\u91cc\u8fdb\u884c\u8bbe\u7f6e\u3002<\/p> \n

  2)\u4e0b\u8f7d\uff08sz\uff09<\/p> \n

   \u5b9e\u73b0\u4e0b\u8f7d\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528szfilename\uff0c\u5176\u4e2dfilename\u5c31\u662f\u4f60\u60f3\u8981\u4e0b\u8f7d\u7684\u6587\u4ef6\u7684\u540d\u5b57\uff0c\u5982\u679c\u662f\u76ee\u5f55\u9700\u8981\u6253\u5305\u6210\u5355\u4e2a\u6587\u4ef6\u5728\u5b9e\u73b0\u4e0b\u8f7d\u3002<\/p> \n

[root@oldboy ~]# sz oldboy.txt  #<==oldboy.txt\u8981\u5b58\u5728\uff0c\u53ef\u4ee5\u662f\u76f8\u5bf9\u8def\u5f84\u6216\u7edd\u5bf9\u8def\u5f84\u3002<\/p> \n

 <\/p> \n

\u4ee5\u4e0b\u662f Tengine \u7684\u5b89\u88c5<\/p> \n

 \u5b89\u88c5 Tengine \u6211\u4eec\u9700\u8981\u51c6\u5907\u4e24\u4e2a \u5b89\u88c5\u5305<\/p> \n

 google-perftools-1.8.2.tar.gz    \uff08\u4e0b\u8f7d\u5730\u5740\uff1ahttp:\/\/download.chinaunix.net\/download.php?id=32342&ResourceID=12865<\/a>\uff09<\/p> \n

 tengine-2.1.2.tar.gz       (\u4e0b\u8f7d\u5730\u5740\uff1ahttp:\/\/tengine.taobao.org\/download_cn.html<\/a>)<\/p> \n

 \u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u5148\u5bf9\u539f\u5148\u7684 Nginx \u670d\u52a1\u8fdb\u884c\u5907\u4efd<\/p> \n

  # cd \/usr\/local\/<\/p> \n

  # mv nginx nginxbak<\/p> \n

  \u5907\u4efd\u5b8c\u6210\uff0c\u5f00\u59cb\u5b89\u88c5 Tengine <\/p> \n

  \u4e00\u3001<\/p> \n

   1\u3001\u89e3\u538b  google-perftools-1.8.2.tar.gz  \u8fd9\u4e2a\u5b89\u88c5\u5305<\/p> \n

        # tar xf  google-perftools-1.8.2.tar.gz <\/p> \n

    2\u3001\u8fdb\u884c\u6e90\u7801\u5b89\u88c5<\/p> \n

      # cd google-perftools-1.8.2<\/p> \n

      #.\/configure --enable-frame-pointers<\/p> \n

      # make && make install<\/p> \n

   3.\u5b8c\u6210  google-perftools-1.8.2 \u5b89\u88c5<\/p> \n

 \u4e8c\u3001Tengine \u5b89\u88c5<\/p> \n

     1.\u540c\u6837\u5148\u89e3\u538b  tengine-2.1.2.tar.gz \u5b89\u88c5\u5305<\/p> \n

        # tar xf  tengine-2.1.2.tar.gz<\/p> \n

      2. \u8fdb\u884c\u6e90\u7801\u5b89\u88c5<\/p> \n

        # .\/configure --prefix=\/usr\/local\/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_spdy_module --with-http_gzip_static_module --with-ipv6 --with-http_sub_module --with-google_perftools_module --with-http_image_filter_module --with-http_realip_module --with-http_concat_module<\/p> \n

        # make && make install<\/p> \n

       3.\u5b8c\u6210\u5b89\u88c5<\/p> \n

  \u4e09\u3001\u67e5\u770b nginx \u7248\u672c<\/p> \n

       # nginx -V<\/p> \n

       \u5982\u679c\u9047\u5230\u6b64\u9519\u8bef\uff1anginx: error while loading shared libraries: libprofiler.so.0: cannot open shared object file: No such file or directory<\/p> \n

      \u90a3\u5c31\u8868\u793a\u7cfb\u7edf\u4e0d\u77e5\u9053xxx.so \u653e\u5728\u90a3\u4e2a\u76ee\u5f55\u4e0b\u3002

      \u8fd9\u4e2a\u65f6\u5019\u5c31\u8981\u5728\/etc\/ld.so.conf\u4e2d\u52a0\u5165xxx.so\u6240\u5728\u7684\u76ee\u5f55\u3002

      \u4e00\u822c\u800c\u8a00\uff0c\u6709\u5f88\u591aso\u90fd\u4f1a\u5728\/usr\/local\/lib\u8fd9\u4e2a\u76ee\u5f55\u4e0b\uff0c\u6240\u4ee5\u5728\/etc\/ld.so.conf\u4e2d\u52a0\u5165\/usr\/local\/lib\u8fd9\u4e00\u884c\uff0c\u53ef\u4ee5\u89e3\u51b3\u6b64\u95ee\u9898\u3002<\/p> \n

      \u5c06 \/etc\/ld.so.conf \u4fdd\u5b58\u540e\uff0c\u8fd8\u8981\u6267\u884c \/sbin\/ldconfig \u2013v \u6765\u66f4\u65b0\u4e0b <\/p> \n

     \u7136\u540e\u518d\u8bd5\u4e0b  #nginx -V<\/p> \n

     \"\"<\/p> \n

     \u81f3\u6b64\u8868\u793a\u5df2\u5b89\u88c5\u6210\u529f<\/p> \n

  \u56db\u3001\u91cd\u542f Nginx<\/p> \n

  # service nginx restart<\/p> \n

  \u82e5\u9047\u5230\u4ee5\u4e0b\u60c5\u51b5\uff1a<\/p> \n

\"\"<\/p> \n

\u53ef\u4ee5\u4f7f\u7528\uff1a # pkill -9 nginx  \u5c06\u8fdb\u7a0b\u5e72\u6389 <\/p> \n

\u4e4b\u540e\u518d\u4f7f\u7528\uff1a # service nginx restart   \u5373\u53ef<\/p> \n

\u91cd\u542f\u5b8c\u6210\u540e\u8bbf\u95ee\uff1a<\/p> \n

\"\"<\/p> \n

\u4e94\u3001\u914d\u7f6e nginx.conf<\/p> \n

       # vim \/usr\/local\/nginx\/conf\/nginx.conf<\/p> \n

        \u5728\u5e95\u90e8\u52a0\u4e0a \uff1ainclude vhost\/*.conf;  \u7136\u540e\u91cd\u542f\uff0c \u5373\u53ef\u914d\u7f6e\u591a\u7ad9\u70b9\u8bbf\u95ee\u4e86<\/p> \n

     \u9690\u85cfTengine \u7248\u672c\u4fe1\u606f  \u5728\u524d\u53f0\u7684\u663e\u793a<\/p> \n

     http {     <\/p> \n

           #\u5173\u95ed \u7248\u672c\u53f7\u4fe1\u606f\u8bbe\u7f6e
           server_tag off;
    &n","orderid":"0","title":"LNMP \u73af\u5883\u66f4\u6362Nginx \u670d\u52a1\u5668\u4e3aTengine(\u4e00)","smalltitle":"","mid":"0","fname":"PHP","special_id":"0","bak_id":"0","info":"0","hits":"6011","pages":"2","comments":"0","posttime":"2017-10-16 18:19:12","list":"1508149152","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"http:\/\/images2017.cnblogs.com\/blog\/1003545\/201710\/1003545-20171011225855699-36633310.png","ispic":"1","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"
LNMP<\/A> \u73af\u5883<\/A> \u66f4\u6362<\/A> Nginx<\/A> \u670d\u52a1\u5668<\/A> Tengine<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"head\";s:0:\"\";s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";}","target":"0","ip":"113.108.110.181","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":"LNMP \u73af\u5883\u66f4\u6362Nginx \u670d\u52a1\u5668\u4e3aTengine","lastview":"1714053708","digg_num":"6367","digg_time":"0","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}