{"id":4279,"date":"2020-01-15T10:57:55","date_gmt":"2020-01-15T02:57:55","guid":{"rendered":"https:\/\/blog.pfchina.org\/?p=4279"},"modified":"2022-01-12T10:42:06","modified_gmt":"2022-01-12T02:42:06","slug":"%e4%bb%8e%e6%ba%90%e4%bb%a3%e7%a0%81%e6%9e%84%e5%bb%bapfsense%e5%ae%89%e8%a3%85%e9%95%9c%e5%83%8f","status":"publish","type":"post","link":"https:\/\/blog.pfchina.org\/?p=4279","title":{"rendered":"\u4ece\u6e90\u4ee3\u7801\u6784\u5efapfSense\u5b89\u88c5ISO"},"content":{"rendered":"<p style=\"text-align: justify;\">\u4ee5\u4e0b\u662f\u6784\u5efapfSense ISO\u6587\u4ef6\u7684\u6b65\u9aa4\u3002\u5728\u770b\u8fd9\u7bc7\u6559\u7a0b\u4e4b\u524d\uff0c\u4f60\u53ef\u4ee5\u5148\u770b\u770b<a href=\"https:\/\/github.com\/PiBa-NL\/PiBa-NL-WIKI\/wiki\/How-to-building-a-pfSense-.iso-from-sources\">PiBa-NL<\/a>\u7684\u6784\u5efa\u6307\u5357\uff0c\u4f46\u8be5\u6307\u5357\u5bf92.50\u7248\u672c\u4e0d\u9002\u5408\u3002\u4ee5\u4e0b\u6559\u7a0b\u9488\u5bf92.5.0\u7f16\u5199\uff0c\u4e5f\u53ef\u4ee5\u9002\u7528\u4e8e\u5176\u4ed6\u7248\u672c\u3002<\/p>\n<h1><a id=\"user-content-first-things-first-choose-a-name-for-your-product-and-update-repositories-accordingly\" class=\"anchor\" href=\"https:\/\/github.com\/Augustin-FL\/building-pfsense-iso-from-source#first-things-first-choose-a-name-for-your-product-and-update-repositories-accordingly\" aria-hidden=\"true\"><\/a>\u4e00\u3001\u9009\u62e9\u6784\u5efa\u7684\u540d\u79f0\uff0c\u5e76\u66f4\u65b0\u5b58\u50a8\u5e93<\/h1>\n<p style=\"text-align: justify;\">Netgate\u4e0d\u5141\u8bb8\u5176\u4ed6\u4eba\u4f7f\u7528\u540d\u79f0\u201cpfSense\u201d(\u7531\u4e8e\u5546\u6807\u8bb8\u53ef\u7684\u95ee\u9898)\u6765\u6784\u5efa\u4ea7\u54c1\u3002\u5728\u751f\u6210.iso\u6587\u4ef6\u4e4b\u524d\uff0c\u5fc5\u987b\u4e3a\u9632\u706b\u5899\u9009\u62e9\u4e00\u4e2a\u81ea\u5b9a\u4e49\u540d\u79f0\u3002\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528libreSense\uff0c\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5176\u4ed6\u81ea\u5b9a\u4e49\u540d\u79f0\u3002<\/p>\n<p style=\"text-align: justify;\">\u7136\u540e\uff0c\u66f4\u65b0\u8981\u4f7f\u7528\u76843\u4e2a\u5b58\u50a8\u5e93:<\/p>\n<h3 style=\"text-align: justify;\">FreeBSD Source<\/h3>\n<ul style=\"text-align: justify;\">\n<li>fork <a href=\"https:\/\/github.com\/pfsense\/FreeBSD-src\">https:\/\/github.com\/pfsense\/FreeBSD-src<\/a>\u5e76\u7b7e\u51fa\u5230RELENG_2_5\u5206\u652f\u3002<\/li>\n<li style=\"text-align: left;\">\u5728\u6587\u4ef6\u5939\/release\/conf \/\u4e2d\uff0c\u5c06pfSense_src-env.conf\uff0cpfSense_src.conf\u548cpfSense_make.conf\u91cd\u547d\u540d\u4e3alibreSense_src-env.conf\uff0clibreSense_src.conf\u548clibreSense_make.conf\u3002<\/li>\n<li>\u5c06\u6587\u4ef6\/sys\/amd64\/conf\/ pfSense\u91cd\u547d\u540d\u4e3a\/sys\/amd64\/conf \/libreSense\u3002<\/li>\n<li>\u7f16\u8f91\u6587\u4ef6\/tools\/tools\/crypto\/Makefile\uff1a\u4ecePROGS\u547d\u4ee4\u4e2d\u5220\u9664cryptokeytest\u3002<\/li>\n<\/ul>\n<h3 style=\"text-align: justify;\"><a id=\"user-content-freebsd-ports\" class=\"anchor\" href=\"https:\/\/github.com\/Augustin-FL\/building-pfsense-iso-from-source#freebsd-ports\" aria-hidden=\"true\"><\/a>FreeBSD Ports<\/h3>\n<ul style=\"text-align: justify;\">\n<li style=\"text-align: left;\">fork<a href=\"https:\/\/github.com\/pfsense\/FreeBSD-ports\"> https:\/\/github.com\/pfsense\/FreeBSD-ports<\/a>\u5e76\u7b7e\u51fa\u5230devel\u5206\u652f(\u7528\u4e8e\u6784\u5efa\u5f00\u53d1\u7248)\u6216RELENG_2_5_0\u5206\u652f(\u7528\u4e8e\u7a33\u5b9a\u7248)\u3002<\/li>\n<li style=\"text-align: left;\">\u5728\u6587\u4ef6\u5939\/sysutils\/pfSense-upgrade\/files\/\u4e2d\uff0c\u5c06\u4e24\u4e2a\u6587\u4ef6pfSense-upgrade\u548cpfsense-upgrade.wrapper\u91cd\u547d\u540d\u4e3alibreSense-upgrade\u548clibreSense-upgrade.wrapper\u3002<\/li>\n<\/ul>\n<h3 style=\"text-align: justify;\"><a id=\"user-content-pfsense-gui\" class=\"anchor\" href=\"https:\/\/github.com\/Augustin-FL\/building-pfsense-iso-from-source#pfsense-gui\" aria-hidden=\"true\"><\/a>pfSense GUI<\/h3>\n<ul style=\"text-align: justify;\">\n<li>fork <a href=\"https:\/\/github.com\/pfsense\/pfsense\">https:\/\/github.com\/pfsense\/pfsense<\/a> \u3002<\/li>\n<li style=\"text-align: left;\">\u8f6c\u5230\u60a8\u8981\u6784\u5efa\u7684\u5206\u652f\u4e2d\u7684\u6587\u4ef6\u5939\/tools\/templates\/pkg_repos\/(master\u4e3a\u5f00\u53d1\u7248\uff0cRELENG_2_5_0\u4e3a\u7a33\u5b9a\u7248)\u3002<\/li>\n<li style=\"text-align: left;\">\u5728\u6587\u4ef6\u540d\u4e2d\u5c06pfSense\u66f4\u6539\u4e3alibreSense\uff08\u4f8b\u5982pfSense-repo.abi =&gt; libreSense-repo.abi\uff09\u3002<\/li>\n<li style=\"text-align: left;\"><code><span style=\"color: #333333; font-family: Helvetica Neue, Helvetica, Arial, Nimbus Sans L, sans-serif;\"><span style=\"font-size: 15px; background-color: #ffffff;\">\u7f16\u8f91\u6587\u4ef6<\/span><\/span>\/src\/etc\/inc\/globals.inc<\/code> : \u7528libreSense\u66ff\u6362product_name\u7684\u5185\u5bb9\u3002<\/li>\n<li style=\"text-align: left;\">\u5728\u6587\u4ef6\u5939<code>\/src\/usr\/local\/share\/<\/code>, \u5c06\u6587\u4ef6\u5939pfSense\u91cd\u547d\u540d\u4e3alibreSense\u3002<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><a id=\"user-content-a-deeper-look-into-netgate-build-environment\" class=\"anchor\" href=\"https:\/\/github.com\/Augustin-FL\/building-pfsense-iso-from-source#a-deeper-look-into-netgate-build-environment\" aria-hidden=\"true\"><\/a><strong>Netgate\u6784\u5efa\u73af\u5883<\/strong><\/p>\n<p style=\"text-align: justify;\">\u4e86\u89e3\u6211\u4eec\u5c06\u5982\u4f55\u6784\u5efaISO\u4ee5\u53ca\u642d\u5efa\u6784\u5efa\u73af\u5883\u975e\u5e38\u91cd\u8981\u3002<\/p>\n<p style=\"text-align: justify;\">Netgate\u4f7f\u7528\u4e86\u4e00\u4e2a\u975e\u5e38\u7e41\u7410\u7684\u6784\u5efa\u73af\u5883\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/netgate_env-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4369\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/netgate_env-1.png\" alt=\"\" width=\"1043\" height=\"835\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/netgate_env-1.png 1043w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/netgate_env-1-300x240.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/netgate_env-1-1024x820.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/netgate_env-1-768x615.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/netgate_env-1-375x300.png 375w\" sizes=\"auto, (max-width: 1043px) 100vw, 1043px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u8003\u8651\u672c\u6559\u7a0b\u7684\u76ee\u7684\u4e0d\u662f\u5efa\u7acb\u5546\u4e1a\u5316\u7684\u6784\u5efa\u73af\u5883\uff0c\u6240\u4ee5:<\/p>\n<ul style=\"text-align: justify;\">\n<li>\u6784\u5efa\u670d\u52a1\u5668\u8fd8\u5c06\u5145\u5f53\u7528\u4e8e\u4ea4\u4ed8PKG\u5b58\u50a8\u5e93\u7684Web\u670d\u52a1\u5668(\u6784\u5efa\u7cfb\u7edf\u5728\u5236\u4f5cISO\u65f6\u6b63\u5728\u79ef\u6781\u4f7f\u7528PKG\u5b58\u50a8\u5e93)\u3002<\/li>\n<li>PKG\u7b7e\u540d\u811a\u672c\u5c06\u4f4d\u4e8e\u6784\u5efa\u670d\u52a1\u5668\u4e0a\u3002<\/li>\n<li>\u6587\u4ef6\u751f\u6210\u540e\u5c06\u4e0d\u4f1a\u53d1\u9001\u5230\u5916\u90e8NFS\u670d\u52a1\u5668\u3002<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u4e0b\u9762\u6765\u8bbe\u7f6e\u6784\u5efa\u670d\u52a1\u5668\u3002<\/p>\n<h1 style=\"text-align: justify;\"><a id=\"user-content-setup-a-proper-build-environment\" class=\"anchor\" href=\"https:\/\/github.com\/Augustin-FL\/building-pfsense-iso-from-source#setup-a-proper-build-environment\" aria-hidden=\"true\"><\/a>\u4e8c\u3001\u8bbe\u7f6e\u5408\u9002\u7684\u6784\u5efa\u73af\u5883<\/h1>\n<p>\u4e0b\u8f7d\u5e76\u5b89\u88c5\u4e0e\u8981\u6784\u5efa\u7684\u7248\u672c\u5339\u914d\u7684FreeBSD\u670d\u52a1\u5668\u3002 pfSense 2.5.0\u9700\u8981<a href=\"https:\/\/docs.netgate.com\/pfsense\/en\/latest\/releases\/versions-of-pfsense-and-freebsd.html\">FreeBSD 12<\/a>\uff0c\u4f7f\u7528AMD64\u5e73\u53f0\u67b6\u6784\u3002<\/p>\n<p style=\"text-align: justify;\">\u670d\u52a1\u5668\u53ef\u4ee5\u662fVM\u6216\u7269\u7406\u673a\u300230 Gb\u4ee5\u4e0a\u7684\u786c\u76d8\u7a7a\u95f4\uff0c\u591a\u6838CPU\uff0c\u5185\u5b58\u5927\u4e8e8Gb\u3002 \u53ef\u4ee5\u5728<a href=\"https:\/\/download.freebsd.org\/ftp\/releases\/amd64\/amd64\/ISO-IMAGES\/\">\u8fd9\u91cc<\/a>\u4e0b\u8f7dFreeBSD ISO\u6587\u4ef6\u3002<\/p>\n<p style=\"text-align: justify;\">\u670d\u52a1\u5668\u5fc5\u987b\u8fde\u63a5\u5230Internet\uff0c\u53ef\u4ee5\u5728\u5de5\u4f5c\u7ad9\u4f7f\u7528SSH\u548cHTTP\u8bbf\u95ee\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u8bf7\u4f7f\u7528ZFS\u683c\u5f0f\u5bf9\u78c1\u76d8\u8fdb\u884c\u5206\u533a\u3002<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/ZFS-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4370\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/ZFS-1.png\" alt=\"\" width=\"719\" height=\"400\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/ZFS-1.png 719w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/ZFS-1-300x167.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/ZFS-1-500x278.png 500w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/a><\/p>\n<h2 style=\"text-align: justify;\"><a id=\"user-content-make-some-configurations-on-the-build-server\" class=\"anchor\" href=\"https:\/\/github.com\/Augustin-FL\/building-pfsense-iso-from-source#make-some-configurations-on-the-build-server\" aria-hidden=\"true\"><\/a>1\u3001\u670d\u52a1\u5668\u914d\u7f6e<\/h2>\n<p style=\"text-align: justify;\">\u670d\u52a1\u5668\u7cfb\u7edf\u5b89\u88c5\u5b8c\u6210\u4ee5\u540e\uff0c\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u66f4\u65b0\u548c\u914d\u7f6e\u3002\u4ee5root\u7528\u6237\u8eab\u4efd\u767b\u5f55\u5e76\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code># Allow SSH using root, if you want it.\r\necho PermitRootLogin yes &gt;&gt; \/etc\/ssh\/sshd_config\r\nservice sshd restart\r\n\r\n# Required for configuring the server\r\npkg install -y pkg vim nano\r\n\r\n# Required for installing and building ports\r\npkg install -y git nginx poudriere-devel mkfile rsync sudo\r\n\r\n# Required for building kernel and iso\r\npkg install -y vmdktool curl qemu-user-static gtar xmlstarlet pkgconf openssl111\r\n\r\n# Required for building iso\r\nportsnap fetch extract\r\n\r\n# not required but advised for building\/monitoring\/debugging\r\npkg install -y htop screen wget\r\n\r\n# Only install this if your FreeBSD is a virtual machine\r\npkg install -y open-vm-tools\r\n<\/code><\/pre>\n<p style=\"text-align: justify;\">\u7136\u540e\uff0c\u4e3aPKG\u6258\u7ba1\u548cPoudriere\u76d1\u89c6\u914d\u7f6enginx\uff1a<\/p>\n<pre><code># pfSense_gui_branch represents the branch of pfSense GUI that will be compiled, with \"RELENG\" replaced by \"v\" : master for a development ISO, v2_5_0 for a stable ISO\r\n# pfSense_port_branch represents the branch of FreeBSD ports that will be compiled, using the same replacement (\"RELENG\"=&gt;\"v\") : devel for a development ISO, v2_5_0 for a stable ISO\r\n# product_name represents the name of your product.\r\n\r\nset pfSense_gui_branch=v2_5_0 # Replace with the version you want to build\r\nset pfSense_port_branch=v2_5_0 # Replace with the version you want to build\r\nset product_name=libreSense # Replace with your product name\r\n\r\n\r\ncd \/usr\/local\/www\/nginx\/\r\nrm -rf *\r\nmkdir -p packages\r\n# PKG web server for core PKG repositories (pfSense-base, pfSense-rc, etc...)\r\nln -s \/root\/pfsense\/tmp\/${product_name}_${pfSense_gui_branch}_amd64-core\/.latest packages\/${product_name}_${pfSense_gui_branch}_amd64-core\r\n# PKG web server for other PKG repositories\r\nln -s \/usr\/local\/poudriere\/data\/packages\/${product_name}_${pfSense_gui_branch}_amd64-${product_name}_${pfSense_port_branch} packages\/${product_name}_${pfSense_gui_branch}_amd64-${product_name}_${pfSense_port_branch} \r\n# Web server for monitoring ports build\r\nln -s \/usr\/local\/poudriere\/data\/logs\/bulk\/${product_name}_${pfSense_gui_branch}_amd64-${product_name}_${pfSense_port_branch}\/latest poudriere\r\n\r\n# Allow directory indexing, and configure nginx to start automatically on boot\r\nsed -i '' 's+\/usr\/local\/www\/nginx;+\/usr\/local\/www\/nginx; autoindex on;+g' \/usr\/local\/etc\/nginx\/nginx.conf\r\necho nginx_enable=\\\"YES\\\" &gt;&gt; \/etc\/rc.conf\r\nservice nginx restart\r\n<\/code><\/pre>\n<h2 style=\"text-align: justify;\"><a id=\"user-content-setup-a-signing-key\" class=\"anchor\" href=\"https:\/\/github.com\/Augustin-FL\/building-pfsense-iso-from-source#setup-a-signing-key\" aria-hidden=\"true\"><\/a>2\u3001\u8bbe\u7f6e\u7b7e\u540d\u5bc6\u94a5<\/h2>\n<p style=\"text-align: justify;\">\u5728\u670d\u52a1\u5668\u4e2d\u8bbe\u7f6e\u7b7e\u540d\u5bc6\u94a5\u3002\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u751f\u6210\u7b7e\u540d\u5bc6\u94a5\uff1a<\/p>\n<pre><code>mkdir -p \/root\/sign\/\r\ncd \/root\/sign\/\r\nopenssl genrsa -out repo.key 2048\r\nchmod 0400 repo.key\r\nopenssl rsa -in repo.key -out repo.pub -pubout\r\nprintf \"function: sha256\\nfingerprint: `sha256 -q repo.pub`\\n\" &gt; fingerprint\r\n<\/code><\/pre>\n<p style=\"text-align: justify;\">\u7136\u540e\u5728\/root\/sign \/\u6587\u4ef6\u5939\u4e2d\u521b\u5efa\u4e00\u4e2a\u811a\u672c\u6587\u4ef6sign.sh\u3002<\/p>\n<pre><code>#!\/bin\/sh\r\nread -t 2 sum\r\n[ -z \"$sum\" ] &amp;&amp; exit 1\r\necho SIGNATURE\r\necho -n $sum | openssl dgst -sign \/root\/sign\/repo.key -sha256 -binary\r\necho\r\necho CERT\r\ncat \/root\/sign\/repo.pub\r\necho END\r\n<\/code><\/pre>\n<p style=\"text-align: justify;\">\u6700\u540e\uff0c\u786e\u4fdd\u6b64\u811a\u672c\u662f\u53ef\u4ee5\u6267\u884c\u7684\uff1a<\/p>\n<pre><code>chmod +x \/root\/sign\/sign.sh\r\n<\/code><\/pre>\n<h2 style=\"text-align: justify;\"><a id=\"user-content-configure-how-pfsense-will-be-built\" class=\"anchor\" href=\"https:\/\/github.com\/Augustin-FL\/building-pfsense-iso-from-source#configure-how-pfsense-will-be-built\" aria-hidden=\"true\"><\/a>3\u3001\u914d\u7f6epfSense<\/h2>\n<p style=\"text-align: justify;\">\u73b0\u5728\u5df2\u7ecf\u914d\u7f6e\u4e86\u670d\u52a1\u5668\uff0c\u6211\u4eec\u5c06\u914d\u7f6epfSense\u7684\u7f16\u8bd1\u65b9\u5f0f\u3002\u514b\u9686pfSense GUI\u7684fork\uff0c\u7b7e\u51fa\u5c06\u8981\u6784\u5efa\u7684\u5206\u652f\uff0c\u5e76\u914d\u7f6efork\u6765\u4f7f\u7528\u524d\u9762\u521b\u5efa\u7684\u7b7e\u540d\u5bc6\u94a5\u3002<\/p>\n<pre><code>cd \/root\r\ngit clone https:\/\/github.com\/{your username}\/pfsense.git\r\ncd pfsense\r\ngit checkout ${pfSense_gui_branch}\r\n\r\n# PKG signing key\r\nrm src\/usr\/local\/share\/${product_name}\/keys\/pkg\/trusted\/*\r\ncp \/root\/sign\/fingerprint src\/usr\/local\/share\/${product_name}\/keys\/pkg\/trusted\/fingerprint\r\n<\/code><\/pre>\n<p style=\"text-align: justify;\">\u5728pfSense GUI\u6587\u4ef6\u5939\u4e2d\u521b\u5efa\u4e00\u4e2a\u540d\u4e3abuild.conf\u7684\u6587\u4ef6\u3002<\/p>\n<pre><code>export PRODUCT_NAME=\"libreSense\" # Replace with your product name\r\nexport FREEBSD_REPO_BASE=https:\/\/github.com\/{your username}\/FreeBSD-src.git #\u00a0Location of your FreeBSD sources repository\r\nexport POUDRIERE_PORTS_GIT_URL=https:\/\/github.com\/{your username}\/FreeBSD-ports.git #\u00a0Location your FreeBSD ports repository\r\n\r\nexport FREEBSD_BRANCH=RELENG_2_5 # Branch of FreeBSD sources to build\r\n\r\n# The branch of FreeBSD ports to build is set automatically based on pfSense GUI branch.\r\n# If you would like to build a specific branch of FreeBSD ports, the variable to set is POUDRIERE_PORTS_GIT_BRANCH\r\n# Also, if you are building a FreeBSD port branch that does not respect Netgate conventions (devel or RELENG_*),\r\n# You will also have to update .conf files in \"tools\/templates\/pkg_repos\/\" because repositories names are partially \r\n# hardcoded there.\r\n\r\n\r\n\r\n# Netgate support creation of staging builds (pre-dev, nonpublic version)\r\nunset USE_PKG_REPO_STAGING #\u00a0This disable staging build\r\n# The kind of ISO that will be built (stable or development) is defined in src\/etc\/version in pfSense GUI repo\r\n\r\nexport DEFAULT_ARCH_LIST=\"amd64.amd64\" #\u00a0We only want to build an x64 ISO, we don't care of ARM versions\r\n\r\n# Signing key\r\nexport PKG_REPO_SIGNING_COMMAND=\"\/root\/sign\/sign.sh ${PKG_REPO_SIGN_KEY}\"\r\n\r\n# This command retrieves the IP address of the first network interface\r\nexport myIPAddress=$(ifconfig -a | grep inet | head -1 | cut -d ' ' -f 2)\r\n\r\nexport PKG_REPO_SERVER_DEVEL=\"pkg+http:\/\/${myIPAddress}\/packages\"\r\nexport PKG_REPO_SERVER_RELEASE=\"pkg+http:\/\/${myIPAddress}\/packages\"\r\n\r\nexport PKG_REPO_SERVER_STAGING=\"pkg+http:\/\/${myIPAddress}\/packages\" # We need to also specify this variable, because even\r\n# if we don't build staging release some ports configuration is made for staging.\r\n<\/code><\/pre>\n<h1 style=\"text-align: justify;\"><a id=\"user-content-building-the-iso\" class=\"anchor\" href=\"https:\/\/github.com\/Augustin-FL\/building-pfsense-iso-from-source#building-the-iso\" aria-hidden=\"true\"><\/a>\u4e09\u3001\u521b\u5efaISO\u6587\u4ef6<\/h1>\n<p style=\"text-align: justify;\">\u9996\u5148\uff0c\u4f7f\u7528\u547d\u4ee4screen -S build\u5728\u6784\u5efa\u670d\u52a1\u5668\u4e0a\u542f\u52a8\u4e00\u4e2a\u5c4f\u5e55\u3002\u53ef\u4ee5\u4f7f\u7528ctrl + A\uff0c\u7136\u540e\u4f7f\u7528D\u79bb\u5f00\u6b64\u5c4f\u5e55\uff0c\u5e76\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4screen -r build\u518d\u6b21\u8fdb\u5165\u6b64\u5c4f\u5e55\u3002<\/p>\n<h2 style=\"text-align: justify;\"><a id=\"user-content-setup-jails\" class=\"anchor\" href=\"https:\/\/github.com\/Augustin-FL\/building-pfsense-iso-from-source#setup-jails\" aria-hidden=\"true\"><\/a>1\u3001\u8bbe\u7f6eJails<\/h2>\n<p style=\"text-align: justify;\">\u6267\u884c\u547d\u4ee4\uff1a <code>.\/build.sh --setup-poudriere<\/code>\u3002\u8fd9\u5c06\u8bbe\u7f6e\u73af\u5883\u5e76\u521b\u5efa\u6784\u5efa\u6240\u9700\u7684FreeBSD jail \u3002\u7136\u540e\u53ef\u4ee5\u79bb\u5f00\u5c4f\u5e55\uff0c\u6267\u884c<code>tail -f logs\/poudriere.log<\/code>\u68c0\u67e5\u662f\u5426\u5df2\u8bbe\u7f6e\u5b8c\u6210\u3002 \u9884\u8ba1\u8be5\u547d\u4ee4\u5c06\u8fd0\u884c\u7ea6\u534a\u5c0f\u65f6\u3002<\/p>\n<p style=\"text-align: justify;\">\u5982\u679c\u51fa\u73b0\u95ee\u9898\uff1a<\/p>\n<ul style=\"text-align: justify;\">\n<li>\u53ef\u4ee5\u5728build.sh\u7684\u5f00\u5934\u6dfb\u52a0set -x\u6765\u8c03\u8bd5\u67e5\u770b\u5176\u4e2d\u53d1\u751f\u7684\u60c5\u51b5\u3002<\/li>\n<li>\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4<code>poudriere jail -l<\/code>\u5217\u51fa\u521b\u5efa\u7684jails \uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528<code>poudriere jail -d -j {jailName} -C clean<\/code>\u5220\u9664\u521b\u5efa\u7684jails \u3002<\/li>\n<li>\u8fd8\u53ef\u4ee5\u9a8c\u8bc1\u662f\u5426\u4e3aFreeBSD\u7aef\u53e3build.conf\u8f93\u5165\u4e86\u9519\u8bef\u7684URL\u3002\u8fd9\u4f1a\u5bfc\u81f4\u547d\u4ee4\u65e0\u6cd5\u6267\u884c(\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u4f1a\u5728\u65e5\u5fd7\u4e2d\u663e\u793a\u4e00\u6761\u6d88\u606f\uff0c\u8bf7\u8f93\u5165\u201chttps:\/\/github.com\u201d\u7684\u7528\u6237\u540d)\u3002<\/li>\n<\/ul>\n<h2 style=\"text-align: justify;\">2\u3001\u5efa\u7acb\u7aef\u53e3<\/h2>\n<p style=\"text-align: justify;\">\u6267\u884c<code>.\/build.sh --update-pkg-repo<\/code>\u6765\u7f16\u8bd1pfSense\u7684\u301c500 FreeBSD\u7aef\u53e3\u3002\u53ef\u4ee5\u4f7f\u7528HTTP\u76d1\u89c6\u670d\u52a1\u5668\u4e0a\u7684\u6784\u5efa\u73af\u5883(http:\/\/\u670d\u52a1\u5668IP\u5730\u5740\/poudriere)\u3002\u9884\u8ba1\u8fd0\u884c\u65f6\u95f42\u52304\u4e2a\u5c0f\u65f6\u3002<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/poudriere_build-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4372\" src=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/poudriere_build-1.png\" alt=\"\" width=\"1323\" height=\"925\" srcset=\"https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/poudriere_build-1.png 1323w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/poudriere_build-1-300x210.png 300w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/poudriere_build-1-1024x716.png 1024w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/poudriere_build-1-768x537.png 768w, https:\/\/blog.pfchina.org\/wp-content\/uploads\/2020\/01\/poudriere_build-1-429x300.png 429w\" sizes=\"auto, (max-width: 1323px) 100vw, 1323px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">\u5982\u679c\u51fa\u73b0\u95ee\u9898\uff0c\u53ef\u4ee5\u4f7f\u7528HTTP\u6216\u76f4\u63a5\u5728\u670d\u52a1\u5668\u7684\/usr\/local\/poudriere\/data\/logs\/bulk\/\u76ee\u5f55\u4e2d\u67e5\u770b\u65e5\u5fd7\u6587\u4ef6\u3002\u9700\u8981\u5206\u6790\u6bcf\u4e2a\u5931\u8d25\u7aef\u53e3\u7684\u65e5\u5fd7\uff0c\u6765\u67e5\u627e\u6bcf\u4e2a\u7aef\u53e3\u7684\u95ee\u9898\u3002<\/p>\n<p style=\"text-align: justify;\">\u53ef\u80fd\u7684\u539f\u56e0:<\/p>\n<ul style=\"text-align: justify;\">\n<li>\u8bd5\u56fe\u6784\u5efa\u7684FreeBSD-port\u5206\u652f\u4e0e\u6784\u5efa\u670d\u52a1\u5668\u7684FreeBSD\u7248\u672c\u4e0d\u5339\u914d\u3002<\/li>\n<li>\u5c1d\u8bd5\u6784\u5efapfSense\u7684\u7248\u672c\u8fc7\u65f6\uff0c\u5e76\u4e14\u67d0\u4e9bdist\u6587\u4ef6\u5728FreeBSD\u5b98\u65b9distcache\u4e0a\u4e0d\u518d\u4f7f\u7528\uff0c\u4ece\u800c\u5bfc\u81f4\u65e0\u6cd5\u83b7\u53d6\u6587\u4ef6\u3002\n<ul>\n<li>\u53ef\u4ee5\u5728FreeBSD\u7aef\u53e3\u7684GitHub\u5206\u652f\u4e2d\u66f4\u65b0\u6bcf\u4e2a\u76f8\u5173\u7aef\u53e3\u7684distinfo\uff0c\u7136\u540e\u8fd0\u884c<code>.\/build.sh --update-poudriere-ports<\/code>\u6765\u5237\u65b0\u6784\u5efa\u670d\u52a1\u5668\u4e0a\u7684\u6587\u4ef6\u3002<\/li>\n<li>\u6216\u8005\u627e\u5230\u4efb\u4f55\u65e7\u7684dist\u955c\u50cf(\u4f8b\u5982\u8be5<a href=\"http:\/\/distfiles.icmpv6.org\/distfiles\/\">\u955c\u50cf<\/a>)\uff0c\u5c06\u6784\u5efa\u670d\u52a1\u5668\u4e0a\u7684\u6587\u4ef6\u4e0b\u8f7d\u5230\u5176\u5339\u914d\u7684\u6587\u4ef6\u5939\u4e2d(\u4f7f\u7528<code>wget<\/code>\/<code>curl<\/code>)\uff0c\u7136\u540e\u7ee7\u7eed\u6784\u5efa\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u9700\u8981\u5148\u6784\u5efa\u6240\u6709\u7aef\u53e3\uff0c\u7136\u540e\u518d\u7ee7\u7eed\u4e0b\u4e00\u6b65\u3002\u5982\u679c\u4e0d\u60f3\u5efa\u7acb\u4e00\u4e2a\u7aef\u53e3\uff0c\u5219\u53ef\u4ee5\u901a\u8fc7\u5728<a href=\"https:\/\/github.com\/pfsense\/pfsense\/blob\/master\/tools\/conf\/pfPorts\/poudriere_bulk\">poudriere_bulk<\/a>\u4e2d\u5220\u9664\u8be5\u7aef\u53e3\u6765\u8fdb\u884c\u6392\u9664\u3002<\/p>\n<h2 style=\"text-align: justify;\"><a id=\"user-content-build-kernel-and-create-iso\" class=\"anchor\" href=\"https:\/\/github.com\/Augustin-FL\/building-pfsense-iso-from-source#build-kernel-and-create-iso\" aria-hidden=\"true\"><\/a>3\u3001\u6784\u5efa\u5185\u6838\u5e76\u521b\u5efaISO<\/h2>\n<p style=\"text-align: justify;\">\u6267\u884c\u547d\u4ee4<code>.\/build.sh --skip-final-rsync iso<\/code>\u6784\u5efa\u5185\u6838\uff0c\u7136\u540e\u8bbe\u7f6e\u7aef\u53e3\u5e76\u521b\u5efaISO\u6587\u4ef6\u3002\u8be5\u547d\u4ee4\u5c06\u8fd0\u884c\u7ea6\u4e00\u5c0f\u65f6\u5de6\u53f3\u3002<\/p>\n<p style=\"text-align: justify;\">\u6784\u5efa\u8fc7\u7a0b\u53ef\u4ee5\u4ecepfSense GUI\u7684<code>logs\/<\/code>\u76ee\u5f55\u4e2d\u7684\u4e24\u4e2a\u6587\u4ef6\u8fdb\u884c\u67e5\u770b:<\/p>\n<ul style=\"text-align: justify;\">\n<li><code>buildworld.amd64<\/code>,\u00a0<code>installworld.amd64<\/code>\u00a0\u548c\u00a0<code>kernel.libreSense.amd64.log<\/code>\u5305\u542b\u4e0eFreeBSD\u5185\u6838\u6784\u5efa\u6709\u5173\u7684\u65e5\u5fd7\u3002<\/li>\n<li><code>install_pkg_install_ports.txt<\/code>\u5305\u542b\u6709\u5173\u7aef\u53e3\u5b89\u88c5\u7684\u65e5\u5fd7\u3002\u4ece<code>build.conf<\/code>\u6587\u4ef6\u4e2d\u6307\u5b9a\u7684URL\u53ef\u4ee5\u68c0\u7d22\u5230\u5b83\u4eec\u3002<\/li>\n<li><code>isoimage.amd64<\/code>\u00a0\u548c\u00a0<code>cloning.amd64.log<\/code>\u5305\u542b\u6709\u5173ISO\u672c\u8eab\u6784\u5efa\u7684\u65e5\u5fd7\u3002<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u5728\u6784\u5efa\u7ed3\u675f\u65f6\uff0c<code>~pfsense\/tmp\/${product_name}\/installer\/<\/code>\u4e2d\u5c06\u5b58\u5728\u4e00\u4e2a\u538b\u7f29\u7684iso\u6587\u4ef6\uff08<code>.iso.gz<\/code>\uff09\u6587\u4ef6\u3002\u5982\u679c\u9700\u8981\u666e\u901a\u7684ISO\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>gzip -kd *.gz<\/code>\u8fdb\u884c\u63d0\u53d6\u3002<\/p>\n<h2 style=\"text-align: justify;\"><a id=\"user-content-if-your-encounter-errors-during-ports-or-kernel-build-possible-root-causes-and-how-to-fix-them\" class=\"anchor\" href=\"https:\/\/github.com\/Augustin-FL\/building-pfsense-iso-from-source#if-your-encounter-errors-during-ports-or-kernel-build-possible-root-causes-and-how-to-fix-them\" aria-hidden=\"true\"><\/a>4\u3001\u6545\u969c\u6392\u9664\uff1a<\/h2>\n<p style=\"text-align: justify;\">\u5bfc\u81f4\u6784\u5efa\u5931\u8d25\u7684\u4e00\u4e2a\u975e\u5e38\u53ef\u80fd\u7684\u539f\u56e0\uff0c\u4e0e<code>Makefile<\/code>\u7cfb\u7edf\u7684\u5de5\u4f5c\u65b9\u5f0f\u548c\u4e0d\u5e78\u7684\u65f6\u673a\u6709\u5173\u3002\u901a\u5e38\u4f1a\u53d1\u751f\u4ee5\u4e0b\u60c5\u51b5\uff1a<\/p>\n<ol style=\"text-align: justify;\">\n<li>Netgate\u4ece<code>FreeBSD-ports<\/code>\u5efa\u7acb\u7aef\u53e3XXX\u3002 Poudriere\u5c06\u7aef\u53e3\u6807\u8bb0\u4e3a\u5df2\u6784\u5efa\uff0c\u5e76\u4e14\u9664\u975e\u5bf9\u4ee3\u7801\u8fdb\u884c\u4e86\u66f4\u65b0(\u201c\u914d\u7f6e\u7f13\u51b2\u201d)\uff0c\u5426\u5219\u4e0d\u4f1a\u5c1d\u8bd5\u91cd\u65b0\u6784\u5efa\u5b83\u3002<\/li>\n<li>Netgate\u4e0d\u4f1a\u5237\u65b0<code>FreeBSD-ports<\/code>\u4e0a\u7684pfSense\u5206\u652f\u3002<\/li>\n<li>\u7aef\u53e3\u6240\u6709\u8005\u66f4\u65b0\u4e86\u5176\u6784\u5efa\u8981\u6c42(<code>distfile<\/code>\u66f4\u65b0)\uff0c\u6216Netgate\u66f4\u65b0\u4e86\u5176\u6784\u5efa\u73af\u5883(\u4f8b\u5982:<code>openssl =&gt; opensll111<\/code>)\uff0c\u4f46\u662f\u4e0d\u4f1a\u91cd\u65b0\u6784\u5efa\u5df2\u6784\u5efa\u7684\u8f6f\u4ef6\u5305\uff0c\u56e0\u4e3a\u5728\u7aef\u53e3\u4e0a\u672a\u8fdb\u884c\u4efb\u4f55\u914d\u7f6e\u66f4\u6539\u3002\u6b64\u65f6\uff0c\u4efb\u4f55\u4e0d\u66f4\u65b0<code>FreeBSD-ports<\/code>\u800c\u91cd\u5efa\u7aef\u53e3\u7684\u5c1d\u8bd5\u90fd\u5c06\u5931\u8d25\u3002<\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><code>FreeBSD-src<\/code>\u7684\u5185\u5bb9\u4e5f\u662f\u5982\u6b64\u3002\u89e3\u51b3\u6b64\u95ee\u9898\u7684\u63a8\u8350\u65b9\u6cd5\u662f\u7b80\u5355\u5730\u91cd\u65b0\u540c\u6b65\u4e0a\u6e38\u53d1\u751f\u6545\u969c\u7684\u6a21\u5757\uff0c\u4ee5\u4fbf\u62e5\u6709\u6700\u65b0\u7684ISO\u3002<\/p>\n<p style=\"text-align: justify;\">\u540c\u6837\uff0cNetgate\u8fc7\u53bb\u4e5f\u88ab\u6307\u63a7\u5728Freebsd-src\u4e0a\u6267\u884c\u5ef6\u8fdf\u7684\u5f00\u6e90\u3002\u76ee\u524d\u5c1a\u4e0d\u6e05\u695a\u662f\u5426\u662f\u7531\u4e8e\u7528\u6237\u5bf9\u6784\u5efa\u7cfb\u7edf\u7684\u5de5\u4f5c\u65b9\u5f0f\u6709\u8bef\u89e3\uff0c\u8fd8\u662fNetgate\u7684\u9634\u6697\u505a\u6cd5\u6216\u4e34\u65f6\u7ef4\u62a4\u3002\u5982\u679c\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\uff0c\u53ef\u4ee5\u76f4\u63a5\u5c06FreeBSD\u6e90\u4e0e\u5206\u652f\u5408\u5e76\u3002<\/p>\n<h1 style=\"text-align: justify;\"><a id=\"user-content-differences-between-a-genuine-pfsense-and-your-iso\" class=\"anchor\" href=\"https:\/\/github.com\/Augustin-FL\/building-pfsense-iso-from-source#differences-between-a-genuine-pfsense-and-your-iso\" aria-hidden=\"true\"><\/a>\u56db\u3001\u6b63\u7248ISO\u548c\u81ea\u5df1\u6784\u5efaISO\u4e4b\u95f4\u7684\u533a\u522b<\/h1>\n<p style=\"text-align: justify;\">\u81ea\u5df1\u6784\u5efa\u7684ISO\u4e0eNetgate\u53d1\u5e03\u7684pfSense ISO\u7684\u6784\u5efa\u65b9\u5f0f\u76f8\u540c\uff0c\u5305\u542b\u76f8\u540c\u7684\u4ee3\u7801\u3002\u4f46\u6709\u4e00\u4e2a\u4e3b\u8981\u533a\u522b\uff1a\u81ea\u5df1\u6784\u5efa\u7684ISO\u4e0d\u5305\u542bGNID\u3002<\/p>\n<p style=\"text-align: justify;\">GNID\u662f\u4e00\u4e2a\u4e8c\u8fdb\u5236\u6587\u4ef6\uff08\u4f4d\u4e8e<code>\/usr\/sbin\/gnid<\/code>\uff09\uff0c\u7528\u4e8e\u7ba1\u7406pfSense\u7684Netgate\u8bb8\u53ef\u8bc1\u3002\u8be5\u4e8c\u8fdb\u5236\u6587\u4ef6\u4e3a\u6bcf\u4e2a\u6b63\u7248pfSense\u751f\u6210\u4e00\u4e2a\u552f\u4e00\u7684Netgate ID\u3002\u7136\u540e\uff0c\u5728\u4f7f\u7528PHP\u53d1\u51faHTTP\u8bf7\u6c42\u65f6\uff0c\u751f\u6210\u7684\u552f\u4e00ID\u5c06\u6210\u4e3a\u9ed8\u8ba4\u201c\u7528\u6237\u4ee3\u7406\u201d\u7684\u4e00\u90e8\u5206(HTTP\u8bf7\u6c42\u7528\u4e8e\u83b7\u53d6Bogon\uff0c\u5b89\u88c5\u8f6f\u4ef6\u5305\uff0c\u663e\u793a\u7b2c\u4e00\u6761\u7248\u6743\u6d88\u606f\u7b49)\u3002\u8bbf\u95eepfSense\u4e0a\u7684Netgate\u670d\u52a1(\u4f8b\u5982ACB\u6216\u4e13\u4e1a\u652f\u6301)\u4e5f\u662f\u5fc5\u9700\u7684\u3002<\/p>\n<p style=\"text-align: justify;\">\u8be5\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u5de5\u4f5c\u65b9\u5f0f\u662f\u5df2\u77e5\u7684\uff08\u4f7f\u7528radare2\u5feb\u901f\u67e5\u770b\u8be5\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u53ef\u4ee5\u53d1\u73b0\u5b83\u8bd5\u56fe\u83b7\u53d6\u5176\u8fd0\u884c\u7684\u5e73\u53f0\u4fe1\u606f\uff0c\u5982\u679c\u5e73\u53f0\u4e0d\u662fNetgate\u786c\u4ef6\uff0c\u5219\u5b83\u5c06\u4f7f\u7528sha256\u548c\u8bbe\u5907\u7684MAC\u5730\u5740\u6765\u8ba1\u7b97ID)\uff0c\u4f46\u662f\u6b64\u7a0b\u5e8f\u662fNetgate\u7684\u5c5e\u6027\uff0c\u5e76\u4e14\u662f\u5c01\u95ed\u6e90\u4ee3\u7801(\u5b58\u50a8\u5728Netgate\u7684\u5185\u90e8GitLab\u4e2d)\u3002<\/p>\n<p style=\"text-align: justify;\">\u7531\u4e8e\u81ea\u5df1\u6784\u5efa\u7684ISO\u4e0d\u5305\u542bGNID\uff0c\u56e0\u6b64\u53ef\u80fd\u65e0\u6cd5\u4eceNetgate\u68c0\u7d22bogon\u66f4\u65b0\u3001\u4f7f\u7528ACB\u3001\u4ece\u5b98\u65b9\u5b58\u50a8\u5e93\u5b89\u88c5\u8f6f\u4ef6\u5305\u6216\u5bfb\u6c42Netgate\u7684\u4e13\u4e1a\u652f\u6301\uff0c\u5f53\u7136\u4e5f\u4e0d\u4f1a\u6536\u5230\u6700\u65b0\u7684pfSense\u66f4\u65b0\u3002<\/p>\n<p style=\"text-align: justify;\">\u539f\u6587<a href=\"https:\/\/github.com\/Augustin-FL\/building-pfsense-iso-from-source#how-to-building-a-pfsense-iso-from-sources\">\u5730\u5740<\/a>\u3002<\/p>\n<p>\u76f8\u5173\u6587\u7ae0\uff1a<a href=\"https:\/\/zhuanlan.zhihu.com\/p\/104992500\">\u4ece\u5f00\u6e90\u9632\u706b\u5899\u6e90\u7801\u7f16\u8bd1\u5f97\u5230\u5230ISO\u6587\u4ef6<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u4e0b\u662f\u6784\u5efapfSense ISO\u6587\u4ef6\u7684\u6b65\u9aa4\u3002\u5728\u770b\u8fd9\u7bc7\u6559\u7a0b\u4e4b\u524d\uff0c\u4f60\u53ef\u4ee5\u5148\u770b\u770bPiB &hellip; <a href=\"https:\/\/blog.pfchina.org\/?p=4279\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[121],"class_list":["post-4279","post","type-post","status-publish","format-standard","hentry","category-pfsense","tag-121"],"_links":{"self":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/4279","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4279"}],"version-history":[{"count":0,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/4279\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}