{"id":136,"date":"2024-07-01T08:21:12","date_gmt":"2024-07-01T00:21:12","guid":{"rendered":"https:\/\/blog.xmb505.top\/?p=136"},"modified":"2024-07-01T08:22:53","modified_gmt":"2024-07-01T00:22:53","slug":"%e5%9c%a8-freebsd-14-%e4%b8%8a%e9%83%a8%e7%bd%b2-mcsm10-minecraft-server-manager","status":"publish","type":"post","link":"https:\/\/blog.xmb505.top\/index.php\/2024\/07\/01\/%e5%9c%a8-freebsd-14-%e4%b8%8a%e9%83%a8%e7%bd%b2-mcsm10-minecraft-server-manager\/","title":{"rendered":"\u5728 FreeBSD 14 \u4e0a\u90e8\u7f72 MCSM10 (Minecraft Server Manager)"},"content":{"rendered":"\n<p class=\"is-style-iw-2em\">\u7531\u4e8e\u5728\u9ad8\u4e2d\u65f6\u5019\u542c\u540c\u5b66\u5927\u5439\u7279\u5439 FreeBSD \u7684\u597d\u5904\u540e\uff0c\u9ad8\u8003\u540e\u5c31\u5728\u8d2d\u5165\u65b0\u670d\u52a1\u5668\u7684 PVE \u4e0a\u90e8\u7f72\u4e86 FreeBSD \u4f5c\u4e3a\u7f51\u7edc\u670d\u52a1\u5668\uff08\u4e00\u4e9b\u57fa\u7840\u529f\u80fd\uff0c\u6bd4\u5982 DNS\u8fc7\u6ee4 \uff0cMCSM \u7684 Web \u9762\u677f \uff09\u548cNAS\u670d\u52a1\u5668\uff08ZFS\u7279\u6027\uff09\uff0c\u8fd9\u7bc7\u6587\u7ae0\u7528\u6765\u8bb0\u5f55\u4f7f\u7528\u964c\u751f\u7684 FreeBSD \u9047\u5230\u7684\u96be\u9898\u3002<\/p>\n\n\n\n<p class=\"is-style-iw-2em has-vivid-red-color has-text-color has-link-color wp-elements-1ef7ae8e4c17930b37b1c147b6469c4c\"><em>\u6ce8\uff1a\u770b\u61c2\u8fd9\u7bc7\u6587\u6863\u9700\u8981\u5177\u6709\u8f83\u5f3a\u7684\u641c\u7d22\u80fd\u529b\u548c\u8010\u5fc3\uff0c\u9ed8\u8ba4\u9605\u8bfb\u8fd9\u7bc7\u6587\u6863\u7684\u4eba\u4e3a\u5f00\u53d1\u4eba\u5458\u548c FreeBSD \u5df2\u7ecf\u5f00\u59cb\u5165\u95e8\u7684\u4f7f\u7528\u8005\u3002<\/em><\/p>\n\n\n\n<p class=\"is-style-iw-2em\">\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5728 Linux \u4e0a\u90e8\u7f72 MCSM10 \u7684\u7ecf\u9a8c\u6765\u8fc1\u79fb\u5230 FreeBSD \u3002MCSM10 \u4f7f\u7528 NodeJS \u8fdb\u884c\u5f00\u53d1\uff0c\u7531\u4e8e NodeJS \u548c Java \u4e00\u6837\u5177\u6709\u8de8\u5e73\u53f0\u7279\u6027\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u5728 FreeBSD \u4e0a\u5b89\u88c5 Node \u73af\u5883\u6765\u8fd0\u884c MCSM \u3002<\/p>\n\n\n\n<p>\u9996\u5148\u6211\u4eec\u9700\u8981\u90e8\u7f72 Node \u73af\u5883\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># pkg install node<\/code><\/pre>\n\n\n\n<p class=\"is-style-iw-2em\">\u6211\u4eec\u901a\u8fc7\u81ea\u5e26\u7684\u5305\u7ba1\u7406\u5668\u5b89\u88c5 Node20 \u540e\uff0c\u6211\u4eec\u9700\u8981\u5c06 MCSM \u7684\u6587\u4ef6\u653e\u5165\u7cfb\u7edf\u4e2d\uff08\u6b64\u5904\u4e0d\u8bb2\u89e3\u5982\u4f55\u5f80 FreeBSD \u4e0a\u4f20\u6587\u4ef6\uff09\u3002\u627e\u4e2a\u81ea\u5df1\u559c\u6b22\u7684\u5730\u65b9\u89e3\u538b\u597d\u6587\u4ef6\uff0c\u63a5\u4e0b\u6765\u5c31\u51c6\u5907\u8fd0\u884c\u6587\u4ef6\u4e86\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ cd \/your-path\/MCSM\/daemon\n# node app.js<\/code><\/pre>\n\n\n\n<p class=\"is-style-iw-2em\">\u8fd9\u4e2a\u65f6\u5019  daemon \u8fdb\u7a0b\u4f1a\u62a5\u9519\uff0c\u56e0\u4e3a MCSM Daemon \u9700\u8981\u901a\u8fc7 <strong>file_zip<\/strong> \u548c <strong>pty<\/strong> \u6765\u548c\u7cfb\u7edf\u6253\u4ea4\u9053\u3002\u4f46\u662f\u53cc\u7fbd\u6bd4\u8f83\u61d2\u6ca1\u7ed9 FreeBSD \u7f16\u8bd1\uff0c\u9700\u8981\u6211\u4eec\u81ea\u5df1\u53bb\u7f16\u8bd1\u8fd9\u4e24\u4e2a\u6587\u4ef6\u3002<em>\u8bf7\u7406\u89e3\u4e0b\u9762\u6bcf\u4e00\u884c\u547d\u4ee4\u7684\u610f\u4e49\uff0c\u4e0d\u8981\u6267\u884c\u4efb\u4f55\u4f60\u4e0d\u660e\u767d\u5176\u610f\u4e49\u7684\u547d\u4ee4\uff01<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ cd ~\n\uff08\u56de\u5bb6\uff09\n$ mkdir gittemp\n\uff08\u521b\u5efa\u4e00\u4e2a\u540d\u53eb gittemp \u7684\u6587\u4ef6\u5939\uff0c\u522b\u628a\u5bb6\u91cc\u641e\u5f97\u592a\u4e71\uff09\n$ cd gittemp\n\uff08\u5207\u6362\u5de5\u4f5c\u76ee\u5f55\u5230 gittemp \uff09\n# pkg install go git\n\uff08\u5b89\u88c5 go \u548c git \u5305\uff09\n$ git clone https:\/\/github.com\/MCSManager\/PTY.git\n\uff08\u514b\u9686 PTY \u9879\u76ee\u5230\u672c\u5730\uff09\n$ git clone https:\/\/github.com\/MCSManager\/Zip-Tools.git\n\uff08\u514b\u9686 Zip-Tools \u9879\u76ee\u5230\u672c\u5730\uff09\n$ cd PTY\n\uff08\u5207\u6362\u5de5\u4f5c\u76ee\u5f55\u5230 PTY \uff09\n$ go mod download\n\uff08\u4e0b\u8f7d\u6240\u6709\u9879\u76ee\u4f9d\u8d56\uff09\n$ go build\n\uff08\u7f16\u8bd1\uff09\n$ mv .\/pty \/your-path\/daemon\/lib\/pty_freebsd_x64\n\uff08\u91cd\u547d\u540d\u6587\u4ef6\u7136\u540e\u4e22\u5230 MCSM Daemon \u76ee\u5f55\u4e0b\uff09\n$ cd ..\/Zip-Tools\n\uff08\u5207\u6362\u5de5\u4f5c\u76ee\u5f55\u5230 Zip-Tools \uff09\n$ go mod download\n\uff08\u4e0b\u8f7d\u6240\u6709\u9879\u76ee\u4f9d\u8d56\uff09\n$ go build\n\uff08\u7f16\u8bd1\uff09\n$ mv .\/file-zip \/your-path\/daemon\/lib\/file_zip_freebsd_x64\n\uff08\u91cd\u547d\u540d\u6587\u4ef6\u7136\u540e\u4e22\u5230 MCSM Daemon \u76ee\u5f55\u4e0b\uff09<\/code><\/pre>\n\n\n\n<p class=\"is-style-iw-2em\">\u8fd9\u4e2a\u65f6\u5019 daemon \u8fdb\u7a0b\u5c31\u80fd\u8fd0\u884c\u8d77\u6765\u4e86\uff0cweb \u8fdb\u7a0b\u4e00\u6837\u7684\u65b9\u6cd5\uff0c\u4f46\u662f\u4e0d\u7528\u548c\u7cfb\u7edf\u6253\u4ea4\u9053\u6240\u4ee5\u4e0d\u9700\u8981\u91cd\u65b0\u7f16\u8bd1\u5c31\u53ef\u4ee5\u8fd0\u884c\u3002<\/p>\n\n\n\n<p class=\"is-style-iw-2em\">\u4f46\u662f\u8fd9\u4e9b\u7a0b\u5e8f\u53ea\u80fd\u8fd0\u884c\u5728\u524d\u53f0\u554a\uff0c\u6211\u4eec\u8be5\u5982\u4f55\u8ba9 MCSM \u5728\u540e\u53f0\u8fd0\u884c\uff1f\u8fd9\u4e2a\u65f6\u5019\u6211\u4eec\u9700\u8981 PM2\u7ba1\u7406\u5668 \u6765\u8fdb\u7a0b\u4fdd\u6d3b\u548c\u5f00\u673a\u81ea\u542f\u52a8\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># pkg install npm\n# npm install pm2<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u81ea\u5df1\u53bb\u770b <a href=\"https:\/\/pm2.fenxianglu.cn\/docs\/start\/\">PM2\u6587\u6863<\/a> \uff0c\u6211\u7d2f\u4e86 bruh \u3002\u6309\u7167 Linux \u65b9\u6cd5\u5c31\u53ef\u4ee5\u4e86\uff0c\u4e24\u4e2a\u5927\u5dee\u4e0d\u5dee\u5176\u5b9e\u3002\u4f60\u8bf4\u4ec0\u4e48\uff1fPM2\u5b89\u88c5\u592a\u6162\uff1f\u6362\u6e90\u53bb\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7531\u4e8e\u5728\u9ad8\u4e2d\u65f6\u5019\u542c\u540c\u5b66\u5927\u5439\u7279\u5439 FreeBSD \u7684\u597d\u5904\u540e\uff0c\u9ad8\u8003\u540e\u5c31\u5728\u8d2d\u5165\u65b0\u670d\u52a1\u5668\u7684 PVE \u4e0a\u90e8\u7f72\u4e86 FreeB [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-136","post","type-post","status-publish","format-standard","hentry","category-10"],"_links":{"self":[{"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/posts\/136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":4,"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":142,"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/posts\/136\/revisions\/142"}],"wp:attachment":[{"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/media?parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/categories?post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.xmb505.top\/index.php\/wp-json\/wp\/v2\/tags?post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}