{"id":1128,"date":"2026-07-07T09:02:37","date_gmt":"2026-07-07T09:02:37","guid":{"rendered":"https:\/\/opshub.com.cn\/?p=1128"},"modified":"2026-07-07T09:03:11","modified_gmt":"2026-07-07T09:03:11","slug":"easyrsa-%e5%88%b6%e4%bd%9cssl%e8%af%81%e4%b9%a6","status":"publish","type":"post","link":"https:\/\/opshub.com.cn\/?p=1128","title":{"rendered":"EasyRSA \u5236\u4f5cSSL\u8bc1\u4e66"},"content":{"rendered":"\n<p>\u4e0b\u8f7d\uff1a<a href=\"https:\/\/github.com\/OpenVPN\/easy-rsa\/releases\/download\/v3.1.7\/EasyRSA-3.1.7.tgz\">https:\/\/github.com\/OpenVPN\/easy-rsa\/releases\/download\/v3.1.7\/EasyRSA-3.1.7.tgz<\/a><\/p>\n\n\n\n<p>vars\u6587\u4ef6\u8bbe\u7f6e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if &#91; -z \"$EASYRSA_CALLER\" ]; then\n        echo \"You appear to be sourcing an Easy-RSA *vars* file. This is\" >&amp;2\n        echo \"no longer necessary and is disallowed. See the section called\" >&amp;2\n        echo \"*How to use this file* near the top comments for more details.\" >&amp;2\n        return 1\nfi\nset_var EASYRSA_DN      \"cn_only\"\nset_var EASYRSA_NS_SUPPORT      \"yes\"\nset_var EASYRSA_CERT_EXPIRE    7300\nset_var EASYRSA_CA_EXPIRE      14600<\/code><\/pre>\n\n\n\n<p>\u670d\u52a1\u5668\u81ea\u7b7e\u540d\u8bc1\u4e66\u5236\u4f5c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/easyrsa init-pki\n.\/easyrsa build-ca nopass\n.\/easyrsa gen-req &lt;\u8bc1\u4e66\u540d> nopass\n.\/easyrsa sign server &lt;\u8bc1\u4e66\u540d>\n.\/easyrsa gen-dh \uff08\u975e\u5fc5\u9700\uff09<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>.\/easyrsa sign server &lt;\u8bc1\u4e66\u540d> \u8fd9\u4e00\u6b65common name\u8f93\u5165\u8bc1\u4e66\u7684\u57df\u540dfqdn<\/li>\n\n\n\n<li>.\/easyrsa gen-req &lt;\u8bc1\u4e66\u540d> nopass \u4f1a\u751f\u6210\u8bc1\u4e66\u7684\u8bf7\u6c42\u548c\u79c1\u94a5<\/li>\n\n\n\n<li>\u8bc1\u4e66\u4f4d\u7f6e:pki\/issued <\/li>\n\n\n\n<li>\u8bc1\u4e66\u79c1\u94a5\u4f4d\u7f6e:pki\/private <\/li>\n\n\n\n<li>\u8bc1\u4e66\u8bf7\u6c42\u4f4d\u7f6e:pki\/reqs<\/li>\n<\/ul>\n\n\n\n<p>\u5ba2\u6237\u7aef\u81ea\u7b7e\u540d\u8bc1\u4e66\u5236\u4f5c\uff08\u975e\u5fc5\u9700\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp EasyRSA-3.1.7 EasyRSA-3.1.7-c1\n\/bin\/rm -rf EasyRSA-3.1.7-c1\/pki\ncd EasyRSA-3.1.7-c1\n.\/easyrsa init-pki\n.\/easyrsa gen-req &lt;\u8bc1\u4e66\u540d> nopass\ncd ..\/EasyRSA-3.1.7\n.\/easyrsa import-req ..\/EasyRSA-3.1.7-c1\/pki\/reqs\/&lt;\u8bc1\u4e66\u540d>.req &lt;\u8bc1\u4e66\u540d>\n.\/easyrsa sign client &lt;\u8bc1\u4e66\u540d><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>.\/easyrsa sign client &lt;\u8bc1\u4e66\u540d> \u8fd9\u4e00\u6b65common name\u8f93\u5165\u8bc1\u4e66\u7684\u57df\u540dfqdn<\/li>\n\n\n\n<li>.\/easyrsa gen-req &lt;\u8bc1\u4e66\u540d&gt; nopass \u4f1a\u751f\u6210\u8bc1\u4e66\u7684\u8bf7\u6c42\u548c\u79c1\u94a5<\/li>\n\n\n\n<li>\u8bc1\u4e66\u4f4d\u7f6e:pki\/issued <\/li>\n\n\n\n<li>\u8bc1\u4e66\u79c1\u94a5\u4f4d\u7f6e:pki\/private <\/li>\n\n\n\n<li>\u8bc1\u4e66\u8bf7\u6c42\u4f4d\u7f6e:pki\/reqs<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0b\u8f7d\uff1ahttps:\/\/github.com\/OpenVPN\/easy-rsa\/releases\/download\/v3.1.7\/EasyRSA-3.1.7.tgz vars\u6587\u4ef6\u8bbe\u7f6e\uff1a \u670d\u52a1\u5668\u81ea\u7b7e\u540d\u8bc1\u4e66\u5236\u4f5c \u5ba2\u6237\u7aef\u81ea\u7b7e\u540d\u8bc1\u4e66\u5236\u4f5c\uff08\u975e\u5fc5\u9700\uff09<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-1128","post","type-post","status-publish","format-standard","hentry","category-9"],"_links":{"self":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/1128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1128"}],"version-history":[{"count":3,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/1128\/revisions"}],"predecessor-version":[{"id":1134,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/1128\/revisions\/1134"}],"wp:attachment":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}