{"id":66,"date":"2021-01-13T11:20:53","date_gmt":"2021-01-13T03:20:53","guid":{"rendered":"https:\/\/www.ssle.cn\/help\/?p=66"},"modified":"2022-01-13T12:51:11","modified_gmt":"2022-01-13T04:51:11","slug":"apache-sheng-cheng-csr","status":"publish","type":"post","link":"https:\/\/ssle.cn\/help\/apache-sheng-cheng-csr\/","title":{"rendered":"Apache\u751f\u6210CSR"},"content":{"rendered":"<p>Linux\u7cfb\u7edf\u4e00\u822c\u9ed8\u8ba4\u81ea\u5e26openssl\uff0c\u5982\u679c\u6ca1\u6709\u5219\u9700\u8981\u5b89\u88c5 CentOS \u00a0<code>yum install openssl<\/code>\u00a0Debian\/Ubuntu\u00a0<code>sudo apt-get install openssl<\/code><\/p>\n<p>Windows\u7528\u6237\u9700\u8981\u4e0b\u8f7dopenssl\u8f6f\u4ef6\uff0c \u53ef\u4ee5\u4f7f\u7528\u6211\u4eec\u5728\u7ebf\u751f\u6210\u5de5\u5177\u00a0<a href=\"https:\/\/www.ssle.cn\/ssltools.php\">https:\/\/www.ssle.cn\/ssltools.php<\/a><\/p>\n<p>\u751f\u6210CSR\u547d\u4ee4<\/p>\n<pre class=\" language-bash\"><code class=\" language-bash\">openssl req -new -sha256 -newkey rsa:2048 -nodes -keyout server.key -out server.csr<\/code><\/pre>\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\">\n<p class=\"panel-title\"><strong>\u8fd0\u884c\u4e0a\u9762\u7684\u547d\u4ee4\u9700\u8981\u586b\u5199\u7533\u8bf7\u8005\u4fe1\u606f<\/strong><\/p>\n<\/div>\n<div class=\"panel-body\">Country Name (2 letter code) [AU]:<kbd>CN<\/kbd>\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 #\u56fd\u5bb6 2\u4e2a\u5b57\u6bcd\u7684\u7f29\u5199\uff08CN \u4e2d\u56fd \u00a0AU \u6fb3\u6d32\uff09<br \/>\nState or Province Name (full name) [Some-State]:<kbd>Shanghai<\/kbd>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 #\u7701\u4efd<br \/>\nLocality Name (eg, city) []:<kbd>Shanghai<\/kbd>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 #\u57ce\u5e02<br \/>\nOrganization Name (eg, company) [Internet Widgits Pty Ltd]:<kbd>SSLE<\/kbd>\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 #\u516c\u53f8\u540d\u79f0<br \/>\nOrganizational Unit Name (eg, section) []:<kbd>IT Dept.<\/kbd>\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 #\u90e8\u95e8<br \/>\nCommon Name (e.g. server FQDN or YOUR name) []:<kbd>www.yourdomain.com<\/kbd>\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 #\u7533\u8bf7SSL\u7684\u57df\u540d<br \/>\nEmail Address []:<kbd>demo@ssle.cn<\/kbd>\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 #Email\u5730\u5740 \u586b\u5199\u4efb\u610f\u53ef\u7528\u7684\u90ae\u7bb1<\/div>\n<\/div>\n<p>\u7533\u8bf7\u5b8c\u6210\u540e\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u751f\u62102\u4e2a\u6587\u4ef6<code>\u00a0server.csr[CSR\u6587\u4ef6]<\/code>\u548c\u00a0server.key[\u79c1\u94a5]\u00a0,\u8bf7\u52a1\u5fc5\u4fdd\u5b58\u597d\u8fd92\u4e2a\u6587\u4ef6\uff0c\u5426\u5219\u8bc1\u4e66\u65e0\u6cd5\u5b89\u88c5\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u5b8c\u6574\u7684\u751f\u6210\u8fc7\u7a0b<\/p>\n<pre>[root@iZ289qba919Z csr]# openssl req -new -sha256 -newkey rsa:2048 -nodes -keyout server.key -out server.csr\r\nGenerating a 2048 bit RSA private key\r\n..................+++\r\n...............+++\r\nwriting new private key to 'server.key'\r\n-----\r\nYou are about to be asked to enter information that will be incorporated\r\ninto your certificate request.\r\nWhat you are about to enter is what is called a Distinguished Name or a DN.\r\nThere are quite a few fields but you can leave some blank\r\nFor some fields there will be a default value,\r\nIf you enter '.', the field will be left blank.\r\n-----\r\nCountry Name (2 letter code) [AU]:CN\r\nState or Province Name (full name) [Some-State]:Shanghai \u00a0 \u00a0 \u00a0 \u00a0\r\nLocality Name (eg, city) []:Shanghai\r\nOrganization Name (eg, company) [Internet Widgits Pty Ltd]:SSLE\r\nOrganizational Unit Name (eg, section) []:IT Dept.\r\nCommon Name (e.g. server FQDN or YOUR name) []:www.yourdomain.com\r\nEmail Address []:demo@ssle.cn \u00a0 \u00a0\r\nPlease enter the following 'extra' attributes\r\nto be sent with your certificate request\r\nA challenge password []:\r\nAn optional company name []:\r\n[root@iZ289qba919Z csr]# ls\r\nserver.csr \u00a0server.key<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u7cfb\u7edf\u4e00\u822c\u9ed8\u8ba4\u81ea\u5e26openssl\uff0c\u5982\u679c\u6ca1\u6709\u5219\u9700\u8981\u5b89\u88c5 CentOS \u00a0yum install openssl\u00a0Debian\/Ubuntu\u00a0sudo apt-get install openssl Windows\u7528\u6237\u9700\u8981\u4e0b\u8f7dopenssl\u8f6f\u4ef6\uff0c \u53ef\u4ee5\u4f7f\u7528\u6211\u4eec\u5728\u7ebf\u751f\u6210\u5de5\u5177\u00a0https:\/\/www.s &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[],"class_list":["post-66","post","type-post","status-publish","format-standard","hentry","category-sheng-cheng-csr"],"_links":{"self":[{"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/posts\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":0,"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/posts\/66\/revisions"}],"wp:attachment":[{"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/categories?post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssle.cn\/help\/wp-json\/wp\/v2\/tags?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}