{"id":372,"date":"2023-09-16T10:57:13","date_gmt":"2023-09-16T02:57:13","guid":{"rendered":""},"modified":"2023-09-16T10:57:13","modified_gmt":"2023-09-16T02:57:13","slug":"\u591a\u53f0\u670d\u52a1\u5668\u96c6\u7fa4\u90e8\u7f72\u65b9\u6848","status":"publish","type":"post","link":"https:\/\/mushiming.com\/372.html","title":{"rendered":"\u591a\u53f0\u670d\u52a1\u5668\u96c6\u7fa4\u90e8\u7f72\u65b9\u6848"},"content":{"rendered":"

\u6587\u7ae0\u76ee\u5f55<\/strong><\/h3>\n

\u5e8f\u8a00<\/p>\n

\u6846\u67b6\u9009\u578b<\/p>\n

\u7248\u672c\u63a7\u5236<\/p>\n

API \u7f16\u5199<\/p>\n

\u76ee\u6807\u4e0e\u73b0\u72b6<\/p>\n

\u6b63\u6587<\/p>\n

\u7b2c\u4e00\u9636\u6bb5\uff1a\u521a\u63a5\u624b\u9879\u76ee<\/p>\n

\u9700\u8981\u89e3\u51b3\u7684\u95ee\u9898\uff1a<\/p>\n

\u89e3\u51b3\u65b9\u6848<\/p>\n

\u4e0d\u8db3\u4e4b\u5904<\/p>\n

\u7b2c\u4e8c\u9636\u6bb5<\/p>\n

\u9700\u8981\u89e3\u51b3\u7684\u95ee\u9898\uff1a<\/p>\n

\u89e3\u51b3\u65b9\u6848<\/p>\n

\u4e0d\u8db3\u4e4b\u5904<\/p>\n

\u7b2c\u4e09\u9636\u6bb5<\/p>\n

\u670d\u52a1\u5668<\/p>\n

\u73af\u5883\u642d\u5efa<\/p>\n

\u7248\u672c\u63a7\u5236<\/p>\n

\u4ee3\u7801\u540c\u6b65<\/p>\n

\u6570\u636e\u5e93<\/p>\n

\u540e\u53f0\u5f00\u53d1<\/p>\n

\u7f13\u5b58\u670d\u52a1<\/p>\n

\u56fe\u7247\u7b49\u5927\u6587\u4ef6\u5b58\u50a8<\/p>\n

\u4f7f\u7528 cdn \u4e3a\u7f51\u7ad9\u52a0\u901f<\/p>\n

\u4f7f\u7528 supervisor \u6258\u7ba1\u961f\u5217<\/p>\n

API \u5f00\u53d1<\/p>\n

\u5efa\u8bae<\/p>\n

\u540e\u671f\u5b66\u4e60\u8ba1\u5212<\/p>\n


\n

\u5e8f\u8a00<\/h1>\n

\u5927\u5bb6\u770b\u7740\u56fe\u4e2a\u4e50\u5c31\u884c\uff0c\u8fd9\u6bb5\u7eaf\u7cb9\u4e2a\u4eba\u5410\u69fd\uff0c\u53ef\u76f4\u63a5\u8df3\u8fc7
\u672c\u4eba\u6240\u5728\u7684\u516c\u53f8\uff0c\u540e\u7aef\u5c31\u6211\u4e00\u4e2a\u4eba\uff0c\u524d\u7aef\u4e00\u540d\uff08\u539f\u672c 2 \u540d\uff0c\u540e\u6765\u79bb\u804c 1 \u540d\uff09\uff0c\u8bbe\u8ba1\u4e24\u540d\uff0c\u7b56\u5212 1 \u540d\u300217 \u5e74\u8fdb\u5165\u8fd9\u5bb6\u516c\u53f8\uff0c\u7ef4\u62a4\u516c\u53f8\u5b98\u7f51\uff0c\u6700\u521d\u5c31\u6211\u4e00\u4eba\uff0c18 \u5e74\u4e0b\u534a\u5e74\u9010\u6e10\u589e\u52a0\u5230 6 \u4eba\uff0c\u961f\u4f0d\u4e5f\u4e0d\u7b97\u5c0f\u4e86\uff0c\u672c\u4eba\u8d1f\u8d23\u6574\u4e2a\u540e\u7aef\u67b6\u6784\u548c\u670d\u52a1\u5668\u90e8\u7f72\u7ef4\u62a4\u3002
\u4ece 15 \u5e74\u51fa\u6765\u5de5\u4f5c\u5230\u73b0\u5728\uff0c\u9646\u9646\u7eed\u7eed\u4e5f\u8fdb\u8fc7\u5f88\u591a\u516c\u53f8\uff0c\u6700\u521d\u7684\u6bdb\u5934\u5c0f\u5b50\uff0c\u6280\u672f\u5c0f\u767d\uff0c\u4e00\u6b65\u4e00\u6b65\u6210\u957f\u5230\u73b0\u5728\uff0c\u6280\u672f\u3001\u7ecf\u9a8c\u90fd\u6709\u4e86\u5f88\u5927\u7684\u63d0\u5347\uff08\u81ea\u6211\u611f\u89c9\uff0c\u8bf7\u52ff\u55b7\uff09\uff0c\u4ece\u4e00\u5f00\u59cb\u7684 echo \"hello world\";<\/code>, \u5230\u73b0\u5728\u7684\u591a\u8bed\u8a00\u7248\u672c hello world<\/code>\uff0c\u53ea\u60f3\u8bf4\u4e00\u53e5\u8bdd\uff0c\u751f\u547d\u4e0d\u606f\uff0c\u4ee3\u7801\u4e0d\u6b62\uff01<\/p>\n

\u6700\u521d\u7684\u65f6\u5019\u7528\u7684\u662f tp3.23<\/code>\uff0c\u5e72\u5916\u5305\uff0c\u5927\u5bb6\u90fd\u61c2\uff0c\u8ffd\u6c42\u6548\u7387\u3002\u5e72\u4e86 2 \u5e74\u5916\u5305\u540e\uff0c\u8fdb\u5165\u4e86\u4e00\u5bb6\u672c\u571f\u7a0d\u5fae\u5927\u4e00\u70b9\u8bba\u575b\uff0c\u4e3b\u8981\u505a\u4e00\u4e9b\u5c0f\u4e13\u9898\uff0c\u5c0f\u9879\u76ee\u548c\u7ef4\u62a4\u8bba\u575b\uff0c\u6bd4\u4e4b\u524d\u5916\u5305\u96be\u5ea6\u7a0d\u9ad8\uff0c\u8fd8\u597d\u6709\u4e2a\u8001\u6280\u672f\u53ef\u4ee5\u5e26\uff08\u5e72\u5916\u5305\u7684\u65f6\u5019\u524d\u671f\u540e\u7aef\u6280\u672f\u90fd\u8dd1\u4e86\uff0c\u5c31\u6211\u4e00\u4eba\uff0c\u5929\u5929\u52a0\u73ed\u71ac\u591c\u5e72\u6d3b\u5b66\u4e60\uff0c\u81ea\u5df1\u4e00\u4e2a\u4eba\u95ed\u95e8\u9020\u8f66\uff09\uff0c\u4e86\u89e3\u4e86\u5f88\u591a\u9879\u76ee\u6d41\u7a0b\uff0c\u5305\u62ec\u5199\u4ee3\u7801\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879\uff0c\u4ee3\u7801\u5b89\u5168\u3001\u8fd0\u884c\u6548\u7387\uff0credis \u961f\u5217\u3001\u5e94\u4ed8\u5e76\u53d1\u7b49\u7b49\u3002<\/p>\n

\u4e4b\u540e\u8df3\u69fd\u5c31\u8fdb\u5165\u73b0\u5728\u8fd9\u5bb6\u516c\u53f8\uff0c\u4e3b\u505a\u7ef4\u62a4\uff0c\u56e0\u4e3a\u53ef\u4ee5\u5b66\u5230\u5f88\u591a\u6572\u4ee3\u7801\u9664\u5916\u7684\u4e1c\u897f\uff0c\u6700\u521d\u7684\u65f6\u5019\u53ef\u4ee5\u8ddf\u7740\u9886\u5bfc\u5168\u56fd\u51fa\u5dee\uff0c\u611f\u8c22\u9886\u5bfc\uff0c\u5b66\u5230\u4e86\u5f88\u591a\u5f88\u591a\uff0c\u4e3a\u4eba\u5904\u4e16\u7b49\u7b49\u3002<\/p>\n

 <\/p>\n

\u6846\u67b6\u9009\u578b<\/h2>\n

\u521a\u8fdb\u6765\u7684\u65f6\u5019\u662f\u63a5\u624b\u5916\u5305\u505a\u7684\u7f51\u7ad9\uff0c\u56e0\u4e3a\u90e8\u95e8\u6218\u7565\u65b9\u5411\u4fee\u6539\uff0c\u6240\u4ee5\u6574\u4e2a\u9879\u76ee\u76f8\u5f53\u4e8e\u8981\u63a8\u5012\u91cd\u6765\uff0c\u56e0\u4e3a\u5916\u5305\u7528 yii2<\/code> \u505a\u7684\uff0c\u6211\u4e0d\u662f\u5f88\u559c\u6b22\u8fd9\u4e2a\u6846\u67b6\uff0cci<\/code> \u548c tp<\/code> \u53c8\u4e0d\u5408\u9002\uff0c\u9042\u76f4\u63a5\u7528 laravel<\/code> \u5f00\u64b8\uff0c\u524d\u671f\u771f\u7684\u662f\u78b0\u4e86\u5f88\u591a\u5f88\u591a\u58c1\uff0c\u4e00\u5ea6\u60f3\u653e\u5f03\uff0c\u4f46\u662f\u8fd8\u662f\u575a\u6301\u4e86\u4e0b\u6765\u3002<\/p>\n

 <\/p>\n

\u7248\u672c\u63a7\u5236<\/h2>\n

\u6700\u521d\u4ee3\u7801\u4f7f\u7528 ftp<\/code> \u7ba1\u7406\uff0c\u540e\u6765\u8ddf\u6362\u5230 svn<\/code>\uff0c\u518d\u5230\u73b0\u5728\u7684 git<\/code>\uff0c\u81ea\u5df1 docker<\/code> \u73af\u5883\u4e0b\u642d\u5efa\u7684 gogs<\/code>\u3002\u670d\u52a1\u5668\u4e5f\u4ece\u6700\u521d\u7684 1 \u53f0\uff0c\u5230\u73b0\u5728\u591a\u53f0\uff0c\u4e5f\u90e8\u7f72\u4e86\u4e00\u53f0\u8d1f\u8f7d\u5747\u8861\u5668\uff0c\u540c\u6b65\u4ee3\u7801\u4f7f\u7528 git<\/code> \u63d0\u4ea4\u89e6\u53d1\u94a9\u5b50\uff0c\u7136\u540e rsync+sersync<\/code> \u76d1\u542c\u6587\u4ef6\u53d8\u5316\uff0c\u81ea\u52a8\u540c\u6b65\u5dee\u5f02\u5316\u6587\u4ef6\uff0cCDN<\/code> \u9690\u85cf\u670d\u52a1\u5668\u771f\u5b9e\u57df\u540d\u3002<\/p>\n

 <\/p>\n

API \u7f16\u5199<\/h2>\n

\u63a5\u53e3\u6700\u521d\u4f7f\u7528 laravel + dingo API<\/code>\uff0c\u5230\u73b0\u5728\u7684 golang<\/code> \u7684 gin<\/code> \u91cd\u5199\uff0c\u722c\u866b\u9879\u76ee\u4e5f\u4ece\u6700\u521d\u7684 php<\/code> \u7684 guzzle<\/code> \u5305\u5230\u76ee\u524d\u7684 python<\/code> \u91cd\u5199\u3002\u6700\u7ec8\uff0c\u5f97\u5230\u4e00\u4e2a\u7ed3\u8bba\uff01\u5c31\u662f \u60f3\u8981\u5feb\u901f\u8fdb\u6b65\uff0c\u5c31\u8981\u9760\u5927\u91cf\u9879\u76ee\u5582\u517b<\/code>\uff01<\/p>\n

 <\/p>\n

\u76ee\u6807\u4e0e\u73b0\u72b6<\/h1>\n
    \n
  • \u76ee\u524d\u5728\u7684\u516c\u53f8\u8f83\u4e3a\u5b89\u9038\uff0c\u4e3b\u505a\u7ef4\u62a4\uff0c\u6240\u4ee5\u6709\u5f88\u591a\u7a7a\u4f59\u65f6\u95f4\u3002\u8352\u5e9f\u65f6\u95f4\u5bf9\u4e8e\u6280\u672f\u4eba\u5458\u662f\u6700\u53ef\u6015\u7684\uff0c\u6211\u4eec\u516c\u53f8\u662f\u5b58\u5728\u7f16\u5236\u7684\uff0c\u4e0d\u72af\u4ec0\u4e48\u5927\u9519\u8bef\u57fa\u672c\u53ef\u4ee5\u5e72\u4e00\u8f88\u5b50\u4e86\uff0c\u62c5\u5fe7\u6280\u672f\u505c\u6ede\u4e0d\u524d\u751a\u81f3\u5012\u9000\u3002<\/li>\n
  • \u516c\u53f8\u5728\u4e09\u7ebf\u57ce\u5e02\uff08\u623f\u4ef7\u6da8\u5e45\u4e16\u754c\u7b2c\u4e00\uff0c\u4e0d\u60f3\u5410\u69fd\uff09\uff0c\u57ce\u5e02\u7684 IT \u6280\u672f\u76f8\u8f83\u4e8e\u5317\u4e0a\u5e7f\u6df1\u5dee\u8ddd\u592a\u5927\uff0c\u81ea\u5df1\u53c8\u4e70\u4e0d\u8d77\u623f\uff0c\u5b66\u5386\u53ea\u662f\u5927\u4e13\uff0c\u81ea\u8003\u7684\u8fdc\u7a0b\u6559\u80b2\u672c\u79d1\u53c8\u6ca1\u6709\u542b\u91d1\u91cf\uff0c\u53ea\u80fd\u4e0d\u65ad\u5b66\u4e60\u903c\u8feb\u81ea\u8eab\uff0c\u9760\u6280\u672f\u53bb\u4e00\u7ebf\u57ce\u5e02\u535a\u5f97\u4e00\u5e2d\u4e4b\u5730\u3002<\/li>\n
  • \u5b66\u65e0\u6b62\u5883\uff0c\u767e\u5ea6\u4e91\u5b58\u50a8\u7684\u5185\u5bb9\u4f30\u8ba1\u8fd9\u8f88\u5b50\u90fd\u5b66\u4e0d\u5b8c\u4e86\uff0c\u4ece\u524d\u7aef\u5230\u540e\u7aef\u5230\u670d\u52a1\u5668\u5230\u4eba\u5de5\u667a\u80fd\uff0c\u5185\u5bb9\u592a\u591a\u4e86\u3002\u7ecf\u8fc7\u957f\u65f6\u95f4\u7684\u601d\u8003\uff0c\u6682\u5b9a\u4ee5\u540e\u7aef\u6280\u672f\u4e3a\u4e3b\uff0c\u524d\u7aef\u4e0d\u6c42\u7cbe\u901a\uff0c\u80fd\u505a\u4e00\u4e9b\u517c\u804c\u5373\u53ef\uff0c\u670d\u52a1\u5668\u65b9\u9762\u76ee\u524d\u5728\u7814\u7a76 docker+k8s<\/code>, \u516c\u53f8\u670d\u52a1\u5668 gogs<\/code> \u5c31\u662f\u642d\u5efa\u5728 docker<\/code> \u73af\u5883\u4e0b\u7684\u3002\u63a5\u4e0b\u6765\u6df1\u5165\u7814\u7a76 golang<\/code>\uff0c\u5fae\u670d\u52a1\u65b9\u9762\u3002<\/li>\n<\/ul>\n

    \u8fd9\u5468\u770b\u770b\u80fd\u4e0d\u80fd\u5199\u670d\u52a1\u5668\u90e8\u7f72\u7684\u4e00\u4e2a\u5206\u4eab\u51fa\u6765\uff0c\u5230\u65f6\u5019\u8bf7\u5404\u4f4d\u6279\u8bc4\u6307\u6b63\uff01<\/p>\n

    \u672c\u6587\u5c06\u4ece\u4e09\u4e2a\u9636\u6bb5\u53d9\u8ff0\uff0c\u5305\u542b\u9879\u76ee\u7684\u67b6\u6784\u3001\u7248\u672c\u5de5\u5177\u7684\u9009\u62e9\u3001\u4ee3\u7801\u90e8\u7f72\u3001\u5230\u5b89\u5168<\/p>\n

     <\/p>\n

    \u6b63\u6587<\/h1>\n

     <\/p>\n

    \u7b2c\u4e00\u9636\u6bb5\uff1a\u521a\u63a5\u624b\u9879\u76ee<\/h2>\n

    \u5916\u5305\u4ea4\u4ed8\u4e4b\u524d\uff0c\u662f\u901a\u8fc7 ftp<\/code> \u7684\u5f62\u5f0f\u4e0a\u4f20\u6587\u4ef6\u3002
    \u4ea4\u4ed8\u540e\u5230\u516c\u53f8\u6218\u7565\u65b9\u5411\u8c03\u6574\u540e\uff0c\u56e0\u4e3a\u516c\u53f8\u4e1a\u52a1\u8f83\u591a\uff0c\u5168\u56fd\u6709 20 \u591a\u4e2a\u8425\u4e1a\u70b9\uff0c\u6bcf\u4e2a\u8425\u4e1a\u70b9\u90fd\u6709\u4e00\u540d\u524d\u7aef\u8bbe\u8ba1\uff0c\u516c\u53f8\u540e\u7aef\u53ea\u6709\u6211\u4e00\u4eba\u3002\u524d\u7aef\u9700\u8981\u5236\u4f5c\u9875\u9762\uff0c\u4f9b\u5916\u7f51\u8bbf\u95ee\u3002<\/p>\n

     <\/p>\n

    \u9700\u8981\u89e3\u51b3\u7684\u95ee\u9898\uff1a<\/h3>\n
      \n
    1. \u9879\u76ee\u9700\u8981\u91cd\u65b0\u8bbe\u8ba1\uff0c\u9009\u62e9\u6846\u67b6\uff1f\u670d\u52a1\u5668\u73af\u5883\u5982\u4f55\u642d\u5efa\uff1f<\/li>\n
    2. \u4ee3\u7801\u5b89\u5168\u95ee\u9898\uff0c\u4e0d\u5e0c\u671b\u5168\u56fd\u7684\u8425\u4e1a\u70b9\u76f4\u63a5\u8bbf\u95ee\u5230\u9879\u76ee\u6e90\u7801\uff0c\u5982\u4f55\u9009\u578b\uff1f<\/li>\n
    3. \u5168\u56fd\u8425\u4e1a\u70b9\u4e2d\u6709\u6280\u672f\u8f83\u597d\u7684\u524d\u7aef\uff0c\u5982\u4f55\u7ed9\u4e0e\u90e8\u5206\u7f51\u7ad9\u4fee\u6539\u6743\u9650\uff1f<\/li>\n
    4. \u7f51\u7ad9\u662f\u7ad9\u7fa4\u7cfb\u7edf\uff0c\u57df\u540d\u9700\u8981\u6cdb\u89e3\u6790\uff0claravel \u81ea\u5e26\u7684\u8def\u7531\u6587\u6863\u65e0\u6cd5\u63d0\u4f9b\u89e3\u51b3\u65b9\u6848<\/li>\n
    5. \u540e\u53f0\u7684\u9009\u578b\uff0c\u8fd8\u6709\u6743\u9650\u7b49\u529f\u80fd\u7684\u5f00\u53d1<\/li>\n<\/ol>\n

       <\/p>\n

      \u89e3\u51b3\u65b9\u6848<\/h3>\n
        \n
      1. \u56e0\u4e3a\u53d1\u73b0\u4e86 learnku \u793e\u533a\uff08\u524d\u8eab laravel-china.org\uff09, \u5b66\u4e60\u4e86\u53d1\u5e03\u7684\u6559\u7a0b\uff0c\u9042\u9009\u62e9\u4e86 laravel\u3002\u670d\u52a1\u5668\u73af\u5883\u4f7f\u7528\u5b9d\u5854\u9762\u677f\uff0c\u5b9a\u65f6\u5907\u4efd\u7f51\u7ad9\u548c\u6570\u636e\u5e93\u3001\u8bbe\u7f6e\u963f\u91cc\u4e91\u81ea\u52a8\u5feb\u7167\u3002<\/li>\n
      2. \u9700\u8981\u4e25\u683c\u63a7\u5236\u4ee3\u7801\u6743\u9650\uff0c\u6240\u4ee5\u9009\u62e9\u4e86 svn\uff0c\u521b\u5efa\u4e0d\u540c\u89d2\u8272\uff0c\u7ed9\u76ee\u5f55\u589e\u52a0\u5bf9\u5e94\u6743\u9650\u3002<\/li>\n
      3. \u501f\u9274 blade \u6a21\u677f\u548c\u7ec7\u68a6\u7684\u6a21\u677f\u6807\u7b7e\uff0c\u5f00\u53d1\u5c5e\u4e8e laravel \u7684\u81ea\u5b9a\u4e49\u6a21\u677f\u6807\u7b7e\u3002<\/li>\n
      4. \u6539\u5199 route \u8def\u7531\uff0c\u81ea\u5df1\u6478\u7d22\u6cdb\u89e3\u6790\u5339\u914d\u89c4\u5219\uff0c\u8f85\u4ee5\u5927\u91cf\u6b63\u5219\u5224\u65ad\uff0c\u4e0d\u65ad\u8bd5\u9519\u3002<\/li>\n
      5. \u540e\u53f0\u6a21\u677f\u4f7f\u7528 ACE<\/code>\uff0c\u624b\u64b8 RBAC<\/code> \u6743\u9650\u7ba1\u7406\uff0c\u8fd9\u4e2a\u5b9e\u73b0\u8f83\u4e3a\u7b80\u5355\uff0c\u4e1a\u52a1\u903b\u8f91\u3002<\/li>\n<\/ol>\n

         <\/p>\n

        \u4e0d\u8db3\u4e4b\u5904<\/h3>\n
          \n
        1. git \u6bd4 svn \u66f4\u597d\uff0c\u4f46\u53d7\u9650\u4e8e\u6280\u672f\uff0c\u65e0\u6cd5\u642d\u5efa\u3002\u7b49\u81ea\u8eab\u5b9e\u529b\u8fbe\u5230\u540e\u80af\u5b9a\u8981\u6362\u6389\u3002<\/li>\n
        2. \u5bf9 svn \u529f\u80fd\u4e5f\u4e0d\u662f\u5f88\u4e86\u89e3\uff0c\u533a\u57df\u7ecf\u5e38\u4e0a\u4f20\u5927\u6587\u4ef6\uff0c\u5bfc\u81f4\u9879\u76ee\u6108\u53d1\u81c3\u80bf\u3002<\/li>\n
        3. \u81ea\u5199\u7684\u6cdb\u89e3\u6790\u7ad9\u7fa4\u8def\u7531\u6b63\u5219\u592a\u591a\uff0c\u6587\u4ef6\u4e5f\u8f83\u957f\uff0c\u4e0d\u5229\u4e8e\u540e\u671f\u7ef4\u62a4\u548c\u6269\u5c55\u3002<\/li>\n
        4. \u540e\u53f0\u529f\u80fd\u8f83\u5c11\uff0c\u7b5b\u9009\u3001\u7edf\u8ba1\u7b49\u65b0\u529f\u80fd\u5f00\u53d1\u6548\u7387\u8f83\u4f4e\u3002<\/li>\n
        5. \u6ca1\u6709\u5e94\u4ed8\u9ad8\u5e76\u53d1\u7684\u65b9\u6848\u3001\u4e5f\u6ca1\u6709\u5e94\u5bf9\u7f51\u7edc\u6076\u610f\u653b\u51fb\u7684\u89e3\u51b3\u624b\u6bb5\u3002<\/li>\n<\/ol>\n

          \u670d\u52a1\u5668\u4f7f\u7528 CentOS<\/code>\uff0c\u91c7\u7528 LNMP<\/code>\uff0c\u76f4\u63a5\u7528\u5b9d\u5854\u90e8\u7f72\uff0c\u624b\u52a8\u5b89\u88c5 svn<\/code> \u7248\u672c\u63a7\u5236\u5de5\u5177\uff0c\u901a\u8fc7\u94a9\u5b50\u81ea\u52a8\u540c\u6b65\u4ee3\u7801\uff0csvn \u63d0\u4ea4\u540e\uff0c\u7ebf\u4e0a\u53ef\u4ee5\u76f4\u63a5\u770b\u5230\u6548\u679c\uff0cphp+svn<\/code> \u5c31\u662f\u8fd9\u4e48\u66b4\u529b\uff0c\u56e0\u4e3a\u6761\u4ef6\u53d7\u9650\u548c\u6280\u672f\u53d7\u9650\uff0c\u5c31\u6ca1\u6709\u90e8\u7f72\u6d4b\u8bd5\u73af\u5883\uff0c\u6240\u89c1\u5373\u6240\u5f97\u3002<\/p>\n

          \u5b89\u5168\u65b9\u9762\uff0claravel \u81ea\u8eab\u610f\u89c1\u63d0\u4f9b\u4e86\u4e00\u90e8\u5206\uff0c\u5305\u62ec csrf<\/code>\uff0c\u9632SQL\u6ce8\u5165<\/code>\uff0c\u7aef\u53e3IP\u9650\u5236<\/code>\uff0c\u4f7f\u7528\u963f\u91cc\u4e91 CDN \u9690\u85cf\u670d\u52a1\u5668\u771f\u5b9e IP \u7b49\u7b49\uff0c\u90fd\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u3002<\/p>\n

           <\/p>\n

          \u7b2c\u4e8c\u9636\u6bb5<\/h2>\n

          \u65b0\u9879\u76ee\u7684\u4f7f\u7528\u548c\u5185\u90e8\u9879\u76ee\u8fed\u4ee3\uff0c\u8fd8\u6709\u4e2a\u4eba\u7ecf\u9a8c\u3001\u6280\u672f\u7684\u63d0\u5347\uff0c\u6b64\u65f6\u4ea7\u751f\u4e86\u4ee5\u4e0b\u95ee\u9898\uff1a<\/p>\n

           <\/p>\n

          \u9700\u8981\u89e3\u51b3\u7684\u95ee\u9898\uff1a<\/h3>\n
            \n
          1. \u4e0d\u6ee1\u8db3\u4e8e svn \u7684\u5c40\u9650\uff0c\u9700\u8981\u9009\u578b\u65b0\u7684\u5de5\u5177\u3002<\/li>\n
          2. \u65b0\u9879\u76ee\u9009\u578b\uff0c\u9700\u8981\u7528\u5230\u961f\u5217\u548c\u5b9a\u65f6\u4efb\u52a1\u3002<\/li>\n
          3. \u670d\u52a1\u5668\u8bbf\u95ee\u8f83\u5927\uff0c\u9700\u8981\u8d2d\u4e70\u591a\u53f0\u670d\u52a1\u5668\u90e8\u7f72\u96c6\u7fa4\u3002<\/li>\n
          4. \u540e\u53f0\u5f00\u53d1\u8017\u65f6\u8f83\u591a\uff08\u56e0\u4e3a\u6211\u4eec\u540e\u53f0\u529f\u80fd\u5f88\u591a\uff09\uff0c\u5982\u4f55\u89e3\u51b3\uff1f<\/li>\n<\/ol>\n

             <\/p>\n

            \u89e3\u51b3\u65b9\u6848<\/h3>\n
              \n
            1. \u5728\u670d\u52a1\u5668\u90e8\u7f72 git<\/code> \u79c1\u6709\u7ba1\u7406\u5668\uff0c\u5b9e\u73b0\u7248\u672c\u63a7\u5236\uff0csvn<\/code> \u548c git<\/code> \u540c\u65f6\u5b58\u5728\u3002<\/li>\n
            2. \u5b66\u4e60 laravel \u8bfe\u7a0b\u4e8c\uff0c\u501f\u9274\u5927\u4f6c\u4ee3\u7801\u548c\u9605\u8bfb\u6587\u6863\uff0c\u5b9e\u73b0\u961f\u5217\u548c\u5b9a\u65f6\u4efb\u52a1\u3002<\/li>\n
            3. \u8d2d\u4e70\u963f\u91cc\u4e91\u670d\u52a1\u5668\uff0c\u548c\u8d1f\u8f7d\u5747\u8861\uff0c\u4f7f\u7528 rsync+sersync<\/code> \u76d1\u542c\u6587\u4ef6\u53d8\u5316\uff0c\u81ea\u52a8\u540c\u6b65\u5dee\u5f02\u5316\u6587\u4ef6\u3002<\/li>\n
            4. \u4f7f\u7528 laravel-admin<\/code> \u6269\u5c55\u5305\uff0c\u5feb\u901f\u751f\u6210\u540e\u53f0\uff0c\u52a0\u4e0a\u81ea\u5b9a\u4e49\u7684\u63a5\u53e3\uff0c\u53ef\u4ee5\u5f88\u8f7b\u677e\u5b9e\u73b0\u7edd\u5927\u90e8\u5206\u4e1a\u52a1\u529f\u80fd\u3002<\/li>\n<\/ol>\n

               <\/p>\n

              \u4e0d\u8db3\u4e4b\u5904<\/h3>\n
                \n
              1. \u56e0\u4e3a\u9879\u76ee\u4eba\u5458\u9aa4\u51cf\uff0c\u53ea\u9650\u4e8e\u529e\u516c\u5ba4\u7684 6 \u4e2a\u4eba\uff0c\u6240\u4ee5\u4e0d\u9700\u8981\u5bf9\u4ee3\u7801\u8fdb\u884c\u6743\u9650\u63a7\u5236\uff0c\u4f46\u603b\u8981\u9650\u5236\uff0cgitlab<\/code> \u53ef\u4ee5\u5b9e\u73b0\uff0c\u53ef\u60dc\u6280\u672f\u4e0d\u8db3\uff0c\u65e0\u6cd5\u6ee1\u8db3\u9700\u6c42\u3002<\/li>\n
              2. \u670d\u52a1\u5668\u90e8\u7f72\u4f7f\u7528\u7684\u5b9d\u5854\u9762\u677f\uff0c\u65b9\u4fbf\u5feb\u6377\uff08\u5168\u90e8\u547d\u4ee4\u884c\u592a\u9ebb\u70e6\uff0c\u6548\u7387\u4e5f\u4f4e\uff09\uff0c\u60f3\u5168\u90e8\u5bb9\u5668\u5316\u90e8\u7f72\uff0c\u4f7f\u7528 k8s<\/code>\uff0c\u8fd9\u4e5f\u662f\u76ee\u524d\u80fd\u60f3\u5230\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u53d7\u9650\u4e8e\u6280\u672f\u539f\u56e0\u65e0\u6cd5\u5b9e\u73b0\u3002\u4e0b\u4e00\u6b65\u5b66\u4e60\u65b9\u5411\u5c31\u5728\u6b64\u3002<\/li>\n
              3. \u7f51\u7ad9\u540e\u53f0\u7684 UI\uff0c\u540c\u4e8b\u4e0d\u6ee1\u610f\uff0c\u4f46\u81ea\u5efa\u540e\u53f0\uff0c\u6d88\u8017\u7684\u6210\u672c\u548c\u65f6\u95f4\u4f1a\u5f88\u5927\uff0c\u76ee\u524d\u53ea\u80fd\u8fd9\u6837\u3002<\/li>\n<\/ol>\n

                \u6b64\u95f4\u78b0\u5230\u8fc7\u591a\u8d77\u5b89\u5168\u95ee\u9898\uff0c\u7f51\u7ad9\u8fd0\u884c\u53d7\u5230\u5927\u91cf\u7684 CC \u653b\u51fb\uff0c\u671f\u95f4\u6700\u4e25\u91cd\u7684\u4e00\u6b21\uff0c\u653b\u51fb\u6301\u7eed\u4e86 4 \u5929\uff0c\u8d85\u8fc7 CDN \u8d1f\u8f7d\uff0c3 \u5929\u8bbf\u95ee\u6b21\u6570\u8fbe 10 \u4ebf\u6b21\u4ee5\u4e0a\uff0cQPS \u5cf0\u503c 5W \u591a\uff0c\u88ab\u963f\u91cc\u4e91 CDN \u62c9\u5165\u6c99\u7bb1\uff0c\u6574\u4e2a\u4e1a\u52a1\u5b8c\u5168\u7ec8\u6b62\u5916\u7f51\u8bbf\u95ee\u3002<\/p>\n

                \u5f53\u65f6\u53ef\u4ee5\u8bf4\u4eba\u5728\u516c\u53f8\u5446\u4e86 4 \u5929\uff0c\u57fa\u672c\u5929\u5929\u71ac\u591c\u5230\u4e0b\u534a\u591c\uff0c\u53d7\u9650\u4e8e\u6280\u672f\uff0c\u901a\u8fc7 iftop<\/code> \u5de5\u5177\u5206\u6790\u6d41\u91cf\uff0c\u53ea\u80fd\u91c7\u53d6\u6700\u50bb\u74dc\u7684\u64cd\u4f5c\uff0c\u5c31\u662f\u670d\u52a1\u5668\u9632\u706b\u5899\u5c01\u9501 IP\uff0c\u540e\u56e0 IP \u592a\u591a\uff0c\u76f4\u63a5\u5c01\u9501 IP \u6bb5\uff0c\u4f46\u56e0\u4e3a\u5bf9\u65b9 IP \u6c60\u592a\u6df1\uff0c\u4ee5\u5931\u8d25\u544a\u7ec8\u3002<\/p>\n

                \u670d\u52a1\u5668\u65b9\u9762\uff0copcache<\/code> \u7f13\u5b58\u5f00\u542f\uff0cphp<\/code> \u8c03\u6574\u8fdb\u7a0b\u6570\uff0cnginx<\/code> \u9650\u6d41\u5f00\u542f\uff0c\u6570\u636e\u5e93\u589e\u52a0\u8fde\u63a5\u6570\uff0c\u6570\u636e\u5e93\u8bfb\u53d6\u589e\u52a0\u7f13\u5b58\uff0c\u5b58\u5165 redis<\/code>\uff0c\u4f46\u4e5f\u53ea\u662f\u676f\u6c34\u8f66\u85aa\u3002<\/p>\n

                \u901a\u8fc7\u4e0d\u65ad\u7684\u67e5\u9605\u8d44\u6599\uff0c\u7ed9\u670d\u52a1\u5668\u5b89\u88c5\u4e86 fail2ban<\/code>\uff0c\u4ecd\u7136\u6ca1\u6709\u89e3\u51b3\u95ee\u9898\uff0c\u4e3a\u6b64\u963f\u91cc\u4e91\u8fd8\u4e13\u95e8\u548c\u6211\u5efa\u7acb\u4e86\u4e00\u4e2a\u9489\u9489\u8ba8\u8bba\u7ec4\uff0c\u4ed6\u4eec\u7ed9\u7684\u5efa\u8bae\u5c31\u662f\uff0c\u82b1\u94b1\u4e0a\u9ad8\u9632\u670d\u52a1\u5668\uff0c\u53ef\u60dc\u7684\u662f\u56e0\u4e3a\u4ef7\u683c\u592a\u9ad8\uff0c\u516c\u53f8\u9886\u5bfc\u4e0d\u5141\u8bb8\u3002\u4e0d\u8fc7\u5728\u4e0d\u65ad\u7684\u5206\u6790 IP \u6765\u6e90\u4e2d\uff0c\u53d1\u73b0\u4e86\u4e00\u4e2a\u89c4\u5f8b\uff0c\u5c31\u662f\u6d41\u91cf\u6765\u6e90 90% \u4ee5\u4e0a\u90fd\u662f\u56fd\u5916\u7684\uff0c\u56e0\u6b64\u548c\u963f\u91cc\u4e91\u6280\u672f\u6c9f\u901a\uff0c\u770b\u80fd\u5426\u5e2e\u5fd9\u7981\u56fd\u5916\u7528\u6237\u8bbf\u95ee\uff0c\u7b54\u6848\u662f\u4e0d\u80fd\u3002<\/p>\n

                \u540e\u6765\u5728\u5176\u4ed6\u90e8\u95e8\u540c\u4e8b\u7684\u5e2e\u52a9\u4e0b\uff0c\u6211\u4eec\u66f4\u6362\u4e86 CDN \u670d\u52a1\u63d0\u4f9b\u5546\uff0c\u4f7f\u7528\u767e\u5ea6\u4e91 CDN\uff0c\u8f6f\u78e8\u786c\u6ce1\uff0c\u62dc\u6258\u767e\u5ea6\u4e91\u6280\u672f\u5e2e\u5fd9\u5c01\u9501\u56fd\u5916 IP\uff0c\u914d\u5408 CDN \u9650\u6d41\u548c\u7ee7\u7eed\u5c01\u9501 IP \u6bb5\uff0c\u6b63\u597d\u5728\u7f8e\u56fd\u7684\u9886\u5bfc\u901a\u77e5\u6211\u56fd\u5916\u65e0\u6cd5\u8bbf\u95ee\u7f51\u7ad9\uff0c\u6d41\u91cf\u5cf0\u503c\u4e0d\u65ad\u964d\u4f4e\u81f3\u6b63\u5e38\u72b6\u6001\uff0c\u6b64\u6b21\u5371\u673a\u624d\u5f97\u4ee5\u7f13\u89e3\uff0c\u5728\u6b21\u611f\u8c22\u767e\u5ea6\u4e91 CDN \u5de5\u4f5c\u4eba\u5458\u7684\u5e2e\u52a9\u3002<\/p>\n

                \u611f\u8c22 @MIsakas \u63d0\u4f9b\u7684\u601d\u8def\uff0c\u53ef\u4ee5\u5728\u89e3\u6790\u57df\u540d\u7684\u65f6\u5019\u628a\u5883\u5916\u7ebf\u8def\u89e3\u6790\u5230\u865a\u5047 IP \u4e0a\uff0c\u5177\u4f53\u6211\u8fd8\u6ca1\u6709\u8bd5\u3002<\/p>\n

                 <\/p>\n

                \u7b2c\u4e09\u9636\u6bb5<\/h2>\n

                \u56e0\u4e3a\u90e8\u95e8\u65b9\u5411\u518d\u6b21\u53d8\u66f4\uff0c\u6574\u4e2a\u670d\u52a1\u4e5f\u9700\u8981\u5927\u6982\uff0c\u56e0\u4e3a\u4e0d\u65ad\u9605\u8bfb\u793e\u533a\u4f18\u79c0\u6587\u7ae0\u548c\u6559\u7a0b\uff0c\u8fd8\u6709\u4e0d\u65ad\u7684\u5237 github\uff0c\u6108\u53d1\u53d1\u73b0\u4e4b\u524d\u4ee3\u7801\u5199\u7684\u592a\u5783\u573e\uff0c\u6bc5\u7136\u51b3\u5b9a\u91cd\u5199\u9879\u76ee\u3002<\/p>\n

                \u6b63\u597d\u670d\u52a1\u5668\u5230\u671f\uff0c\u516c\u53f8\u4e5f\u8981\u66f4\u6362\u963f\u91cc\u4e91\u8d26\u53f7\uff0c\u6240\u4ee5\u4ece\u8d2d\u4e70\u670d\u52a1\u5668\u5f00\u59cb\uff0c\u5230\u7f51\u7ad9\u90e8\u7f72\uff0c\u7248\u672c\u5de5\u5177\u7684\u9009\u62e9\u7b49\u7b49\uff0c\u7b97\u5f97\u4e0a\u622a\u6b62 19 \u5e74\u4e0a\u534a\u5e74\u5b66\u5230\u7684\u77e5\u8bc6\u90fd\u7528\u4e0a\u4e86\u3002<\/p>\n

                \u9996\u5148\uff0c\u670d\u52a1\u5668\u5b89\u5168\u5c42\u9762\uff0c\u5f03\u7528\u5bc6\u7801\u767b\u5f55\uff0c\u91c7\u7528 ssh<\/code> \u79d8\u94a5\uff0c\u8fd8\u6709\u5bf9\u5e94\u4e00\u7cfb\u5217\u7684 ssh<\/code> \u914d\u7f6e\uff0c\u6bd4\u5982\u8d85\u65f6\u81ea\u52a8\u8e22\u51fa\u767b\u5f55\uff0c\u5bc6\u7801\u9694\u65ad\u81ea\u52a8\u4fee\u6539\u7b49\u7b49\uff0c\u8fd9\u4e9b\u963f\u91cc\u4e91\u90fd\u4f1a\u63d0\u793a\uff0c\u5bf9\u7167\u7740\u4fee\u6539\u5c31\u597d\u3002<\/p>\n

                \u56e0\u4e3a\u516c\u53f8\u540e\u7aef\u5c31\u6211\u4e00\u4e2a\u4eba\uff0c\u6240\u4ee5\u6211\u662f\u5141\u8bb8 root \u767b\u5f55\u7684\uff0c\u7ed9\u7aef\u53e3\u8bbe\u7f6e ip \u9650\u5236\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n

                 <\/p>\n

                \u670d\u52a1\u5668<\/h3>\n

                \u670d\u52a1\u5668\u4f7f\u7528\u963f\u91cc\u4e91\u8d1f\u8f7d\u5747\u8861 + \u4e91 ecs<\/p>\n

                 <\/p>\n

                \u73af\u5883\u642d\u5efa<\/h3>\n

                \u73af\u5883\u642d\u5efa\u65b9\u9762\uff0c\u4e3a\u4e86\u7701\u4e8b\uff0c\u6211\u4ecd\u7136\u91c7\u7528\u7684\u5b9d\u5854\u9762\u677f\uff0c\u9650\u5236\u9762\u677f\u767b\u5f55\u7aef\u53e3 IP \u6743\u9650\u3002\u63a8\u8350\u5927\u5bb6 linux \u5b89\u88c5 htop<\/code>\uff0c\u53cb\u597d\u6027\u4e92\u52a8\u7684\u8fdb\u7a0b\u67e5\u770b\u5668\uff0c\u6bd4 top<\/code> \u547d\u4ee4\u597d\u7528\u591a\u4e86\u3002<\/p>\n

                 <\/p>\n

                \u7248\u672c\u63a7\u5236<\/h3>\n

                \u4ee3\u7801\u7248\u672c\u63a7\u5236\uff0c\u5b89\u88c5 docker<\/code>\uff0c\u4f7f\u7528 gogs<\/code> \u8fdb\u884c\u7248\u672c\u63a7\u5236\u3002\u56e0\u516c\u53f8\u4e1a\u52a1\u662f\u6240\u89c1\u5373\u6240\u5f97\u7684\uff0c\u6240\u4ee5\u4e0d\u9700\u8981\u6d4b\u8bd5\u73af\u5883\uff0c\u7ebf\u4e0b\u4fee\u6539\u76f4\u63a5 push \u63a8\u9001\uff0c\u89e6\u53d1 post-receive<\/code> \u94a9\u5b50\uff0c\u81ea\u52a8\u540c\u6b65\u7ebf\u4e0a\u4ee3\u7801\u3002\u5982\u679c\u6761\u4ef6\u5141\u8bb8\u7684\u8bdd\u80af\u5b9a\u8981\u914d\u7f6e\u6d4b\u8bd5\u73af\u5883\u7684\uff0c\u800c\u4e14 git<\/code> \u5206\u652f\u4e5f\u8981\u4e25\u683c\u63a7\u5236\u6743\u9650\uff0cmaster<\/code> \u5206\u652f\u53ea\u5141\u8bb8\u6838\u5fc3\u4eba\u5458\u63a8\u9001\uff0c\u5408\u5e76\u5206\u652f\u4e5f\u662f\u3002\u4fee\u6539 bug \u53ef\u4ee5\u4f7f\u7528 dev<\/code> \u5206\u652f\uff0cgogs<\/code> \u7684 web \u754c\u9762\u4e5f\u9700\u8981\u8bbe\u7f6e IP \u8bbf\u95ee\u6743\u9650\u3002<\/p>\n

                 <\/p>\n

                \u4ee3\u7801\u540c\u6b65<\/h3>\n

                \u4ee3\u7801\u540c\u6b65\u65b9\u9762\uff0c\u4ecd\u7136\u4f7f\u7528 rsync+sersync<\/code>\uff0c\u76ee\u524d\u53d7\u4e8e\u6280\u672f\u9650\u5236\uff0c\u6ca1\u6709\u53d1\u73b0\u5176\u4ed6\u66f4\u65b9\u4fbf\u7684\u540c\u6b65\u65b9\u5f0f<\/p>\n

                 <\/p>\n

                \u6570\u636e\u5e93<\/h3>\n

                \u6570\u636e\u5e93\u7528\u7684 mysql8+<\/code>\uff0c\u591a\u53f0\u670d\u52a1\u5668\u4e4b\u95f4\u4ee5\u5185\u7f51\u901a\u4fe1\uff0c\u8bbe\u7f6e\u72ec\u7acb\u7684\u8d26\u53f7\uff0c\u5206\u914d\u6743\u9650\u6307\u5b9a\u6570\u636e\u5e93\u540d\u3002\u4e3a\u4e86\u65b9\u4fbf\uff0c\u7ba1\u7406\u5458\u8d26\u6237\u5bf9\u5916\u4e5f\u6307\u5b9a\u4e86 IP\uff0c\u6570\u636e\u5e93\u5bf9\u5916\u7aef\u53e3\u4e5f\u9650\u5236\u4e86 IP\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f mysql8.0 \u4ee5\u4e0a\u4fee\u6539\u4e86\u5bc6\u7801\u52a0\u5bc6\u65b9\u5f0f\uff0c\u8fde\u63a5\u4e0d\u4e0a\u7684\u9700\u8981\u65b0\u5efa\u7528\u6237\u6216\u66f4\u6362\u7248\u672c\u3002<\/p>\n

                 <\/p>\n

                \u540e\u53f0\u5f00\u53d1<\/h3>\n

                \u4f7f\u7528 laravel-admin \u5305\uff0c\u529f\u80fd\u5f88\u5f3a\u5927\uff0c\u4e3a\u4f5c\u8005\u70b9\u8d5e\u3002\u7edd\u5927\u90e8\u5206\u9700\u6c42\u7684\u529f\u80fd\u90fd\u6709\uff0c\u52a0\u4e0a\u81ea\u5b9a\u4e49\u7684\u63a5\u53e3\uff0c\u53ef\u4ee5\u6ee1\u8db3\u65e5\u5e38\u540e\u53f0\u5f00\u53d1\u7684\u7edd\u5927\u90e8\u5206\u9700\u6c42\u3002<\/p>\n

                 <\/p>\n

                \u7f13\u5b58\u670d\u52a1<\/h3>\n

                \u6570\u636e\u7f13\u5b58\u4f7f\u7528 redis\uff0c\u4e00\u6837\u7684\u9700\u8981\u9650\u5236 IP \u8bbf\u95ee\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0credis \u5185\u7f51\u4e4b\u95f4\u8bbf\u95ee\uff0cIP \u8bbe\u7f6e\u4e0d\u662f 127.0.0.1\uff0c\u800c\u662f\u5bf9\u5e94\u7684\u5185\u7f51 IP\u3002\u81f3\u4e8e mysql<\/code> \u7684\u4f18\u5316\uff0c\u793e\u533a\u4e00\u5806\u6587\u7ae0\uff0c\u6211\u8fd9\u91cc\u4e0d\u505a\u8d58\u8ff0\u3002<\/p>\n

                 <\/p>\n

                \u56fe\u7247\u7b49\u5927\u6587\u4ef6\u5b58\u50a8<\/h3>\n

                \u56fe\u7247\u7b49\u5927\u6587\u4ef6\u5b58\u50a8\u5230\u4e03\u725b\u4e91\u6216\u8005\u963f\u91cc\u4e91 OSS\uff0c\u6280\u672f\u8fbe\u5230\u7684\u8bdd\u53ef\u4ee5\u81ea\u884c\u642d\u5efa\u56fe\u7247\u670d\u52a1\u5668\uff0c\u8bb0\u5f97\u4f7f\u7528 https<\/code> \u534f\u8bae<\/p>\n

                 <\/p>\n

                \u4f7f\u7528 cdn \u4e3a\u7f51\u7ad9\u52a0\u901f<\/h3>\n

                \u7f51\u7ad9\u4f7f\u7528 cdn<\/code> \u52a0\u901f\uff0c\u9690\u85cf\u771f\u5b9e IP\uff0c\u5426\u5219\u4e00\u65e6\u66b4\u9732\uff0cddos<\/code> \u653b\u51fb\u5c0f\u516c\u53f8\u6839\u672c\u625b\u4e0d\u4f4f\u3002<\/p>\n

                \u4ee5\u4e0a\u9650\u5236\u7aef\u53e3\u90fd\u53ef\u4ee5\u901a\u8fc7 linux<\/code> \u9632\u706b\u5899\u8fdb\u884c\u8bbe\u7f6e\u3002<\/p>\n

                \u5982\u679c\u5e76\u53d1\u538b\u529b\u8fc7\u9ad8\uff0c\u8bb0\u5f97\u5f00\u542f php \u7684 opcache<\/code>\uff0c\u4e1a\u52a1\u9700\u8981\u7684\u8bdd\u53ef\u4ee5\u4f7f\u7528 swoole<\/code>\u3002PHP-FPM<\/code> \u8fd0\u884c\u6a21\u5f0f\u53ef\u4ee5\u5207\u6362\u4e3a\u52a8\u6001\uff0c\u8ba1\u7b97\u597d php<\/code> \u7684\u8fde\u63a5\u6570\u3002<\/p>\n

                \u4e0a\u7ebf\u9879\u76ee\u524d\u53ef\u4ee5\u7528 apache<\/code> \u7684 ab<\/code> \u547d\u4ee4\u8fdb\u884c\u538b\u6d4b\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u6d4b\u8bd5\u5de5\u5177\uff0c\u6bd4\u5982 JMeter<\/code> \u7b49\u8fdb\u884c\u538b\u6d4b\uff0c\u8be6\u60c5\u89c1 L06 Laravel \u6559\u7a0b - \u7535\u5546\u8fdb\u9636 (Laravel 5.8)\u3002<\/p>\n

                 <\/p>\n

                \u4f7f\u7528 supervisor \u6258\u7ba1\u961f\u5217<\/h3>\n

                \u961f\u5217\u4f7f\u7528 python<\/code> \u7f16\u5199\u7684 supervisor<\/code> \u8fdb\u884c\u7ba1\u7406\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 Horizon<\/code> \u961f\u5217\u7ba1\u7406\u5de5\u5177\uff0c\u8bb0\u5f97\u63a7\u5236\u597d\u6743\u9650<\/p>\n

                docker<\/code> \u73af\u5883\u642d\u5efa gogs<\/code> \u548c rsync+sersync<\/code>\uff0c\u6211\u4f1a\u5206\u4e24\u7bc7\u6587\u7ae0\uff0c\u672c\u5468\u516d\u5199\u597d\u53d1\u5e03\u3002<\/p>\n

                 <\/p>\n

                API \u5f00\u53d1<\/h3>\n

                API \u63a5\u53e3\u524d\u671f\u4f7f\u7528\u7684\u662f dingoAPI<\/code>\uff0c\u540e\u6765\u4f7f\u7528 golang<\/code> \u7684 gin<\/code> \u6846\u67b6\u91cd\u5199\u4e86\uff0c\u6700\u8fd1\u770b laravel6.x<\/code> \u81ea\u5e26\u7684 Resource<\/code>\uff0c\u89c9\u5f97\u53ef\u4ee5\u4e0d\u7528 dingoAPI<\/code> \u4e86\u3002<\/p>\n

                \u81f3\u4e8e\u4e3a\u4ec0\u4e48\u4f7f\u7528 golang<\/code>\uff0c\u56e0\u4e3a\u4e2a\u4eba\u5f88\u559c\u6b22 go<\/code>\u3002\u6211\u5199\u8fc7 python<\/code>\uff0cphp<\/code>\uff0c\u90fd\u662f\u89e3\u91ca\u6027\u8bed\u8a00\uff0c\u60f3\u6362\u4e00\u95e8\u7f16\u8bd1\u578b\u7684\uff0cc++<\/code> \u6015\u77ed\u65f6\u95f4\u5165\u4e0d\u4e86\u95e8\uff0cjava<\/code> \u53c8\u592a\u91cd\uff0c\u6240\u4ee5\u9009\u62e9\u4e86 go<\/code>\u3002\u8fd9\u91cc\u5410\u69fd\u4e00\u4e0b\uff0cphp<\/code> \u7684\u6570\u7ec4\u6bd4 go<\/code> \u7684 map \u65b9\u4fbf\u4e86 N \u500d\u3002
                \u611f\u8c22 @\u4e0b\u6c34\u9053\u91cc\u6709\u53ea\u732b\uff0cgolang \u5e26\u6211\u5165\u95e8\uff0c\u6211\u662f\u770b\u4e86\u4ed6\u7684\u535a\u5ba2\u6e90\u7801\u624d\u80fd\u4e0b\u624b\u91cd\u5199\u9879\u76ee\u7684\u3002<\/p>\n

                 <\/p>\n

                \u5efa\u8bae<\/h2>\n

                \u6700\u8fd1\u5b66\u4e60\u4e86 laradock<\/code>\uff0c\u53d1\u73b0\u662f\u771f\u7684\u597d\u7528\uff0cdocker-compose \u90fd\u914d\u7f6e\u597d\u4e86\uff0c\u542f\u52a8\u7684\u65f6\u5019\u9009\u62e9\u5bf9\u5e94\u955c\u50cf\uff0c\u65b9\u4fbf\u5feb\u6377\uff0c\u4e00\u4ef6\u8bd5\u90e8\u7f72\u3002<\/p>\n<\/p>\n

                 <\/p>\n

                 <\/p>\n

                \u4e0d\u8fc7\u6709\u4e2a\u5751\uff0c\u5c31\u662f\u6211\u4e60\u60ef\u76f4\u63a5\u6279\u91cf\u91cd\u542f\u5bb9\u5668\uff0c\u5bfc\u81f4 nginx<\/code> \u5bb9\u5668\u8fde\u4e0d\u4e0a php<\/code> \u5bb9\u5668<\/p>\n

                #\u6211\u8981\u8fd0\u884c2\u6b21\uff0c\u56e0\u4e3a\u5bb9\u5668\u542f\u52a8\u987a\u5e8f\u51b2\u7a81\uff0c\u8fd8\u7ecf\u5e38php\u5bb9\u5668\u8fde\u4e0d\u4e0anginx\ndocker start $(docker ps -a | awk '{print $1}' | tail -n +2)<\/code><\/pre>\n

                \u6700\u597d\u5728 laradock<\/code> \u76ee\u5f55\u4e0b\u6267\u884c<\/p>\n

                # \u4f8b\uff1adocker-compose up -d nginx mysql redis workspace php-worker\ndocker-compose -d up \u5bb9\u56681 \u5bb9\u56682 \u5bb9\u56683 ...<\/code><\/pre>\n

                 <\/p>\n

                \u540e\u671f\u5b66\u4e60\u8ba1\u5212<\/h1>\n

                \u81f3\u4e8e\u540e\u671f\u7684\u5b66\u4e60\u8ba1\u5212\uff0c\u91cd\u5fc3\u5728\u5bb9\u5668\u5316\uff0cdocker+k8s<\/code>\uff0c\u8fd8\u6709 go<\/code> \u7684\u5fae\u670d\u52a1\u65b9\u5411\u3002\u6700\u8fd1\u5bf9\u6570\u5b66\u8d77\u4e86\u5174\u8da3\uff0c\u51c6\u5907\u660e\u5e74\u4e70\u51e0\u672c\u9ad8\u6570\u4e66\u5b66\u4e60\u4e00\u4e0b\ud83e\udd23\u3002\u8fd8\u6709\u660e\u5e74\u51c6\u5907\u590d\u4e60\u82f1\u8bed\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u53c2\u4e0e\u793e\u533a\u7684\u7ffb\u8bd1\u5de5\u4f5c\u4e86\u3002\u53ef\u60dc\u81ea\u5df1\u57fa\u4e8e ss \u534f\u8bae\u642d\u5efa\u7684\u68af\u5b50\u88ab\u5c01\u4e86\uff0c\u53ea\u80fd\u7528\u7535\u8111\u67e5\u9605\u6587\u6863\u4e86\u3002<\/p>\n

                \u8f6c\u8f7d\uff1amouseleo - \u591a\u53f0\u670d\u52a1\u5668\u96c6\u7fa4\u90e8\u7f72\u65b9\u6848<\/p>\n","protected":false},"excerpt":{"rendered":"\u591a\u53f0\u670d\u52a1\u5668\u96c6\u7fa4\u90e8\u7f72\u65b9\u6848\u76ee\u5f55\u5e8f\u8a00\u6846\u67b6\u9009\u578b\u7248\u672c\u63a7\u5236API\u7f16\u5199\u76ee\u6807\u4e0e\u73b0\u72b6\u6b63\u6587\u7b2c\u4e00\u9636\u6bb5\uff1a\u521a\u63a5\u624b\u9879\u76ee\u9700\u8981\u89e3\u51b3\u7684\u95ee\u9898\uff1a\u89e3\u51b3\u65b9\u6848\u4e0d\u8db3\u4e4b...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[83],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/372"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=372"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/372\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}