{"id":2165,"date":"2023-01-18T16:57:20","date_gmt":"2023-01-18T08:57:20","guid":{"rendered":"http:\/\/www.laihp.top\/zqb\/?p=2165"},"modified":"2023-01-31T16:58:00","modified_gmt":"2023-01-31T08:58:00","slug":"%e7%ae%80%e5%8d%95%e4%ba%91%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%83%a8%e7%bd%b2%e5%bc%80%e6%ba%90%e7%9f%ad%e9%93%be%e5%b7%a5%e5%85%b7-yourls","status":"publish","type":"post","link":"https:\/\/www.laihp.top\/zqb\/?p=2165","title":{"rendered":"\u7b80\u5355\u4e91\u670d\u52a1\u5668\u90e8\u7f72\u5f00\u6e90\u77ed\u94fe\u5de5\u5177-YOURLS"},"content":{"rendered":"<p>YOURLS\u662f\u4e00\u6b3e\u4f7f\u7528PHP+Mysql\u5f00\u53d1\u7684\u77ed\u94fe\u63a5\u7a0b\u5e8f\uff0c\u76f8\u6bd4\u516c\u5171\u77ed\u7f51\u5740\u597d\u5904\u662f\u6570\u636e\u638c\u63e1\u5728\u81ea\u5df1\u624b\u4e2d\uff0c\u53ef\u63a7\u6027\u66f4\u9ad8\u3002\u5f00\u6e90\u5730\u5740\uff1a<a href=\"https:\/\/github.com\/YOURLS\/YOURLS\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/YOURLS\/YOURLS<\/a><\/p>\n<h1 id=\"%E5%89%8D%E6%9C%9F%E5%87%86%E5%A4%87\">\u524d\u671f\u51c6\u5907<\/h1>\n<p>window\u7cfb\u7edf\u63a8\u8350phpStudy\u7b49\u96c6\u6210PHP\u73af\u5883<\/p>\n<p>linux\u7cfb\u7edf\uff1aLNMP\uff08Linux+Nginx+Mysql+PHP\uff09\u73af\u5883<\/p>\n<p>\u57df\u540d\uff0c\u5982\u679c\u670d\u52a1\u5668\u5728\u56fd\u5185\uff0c\u5219\u9700\u8981\u5907\u6848\uff0c\u7b14\u8005\u4f7f\u7528\u4e8c\u7ea7\u57df\u540dhttp:\/\/sd.laihp.top\/admin<\/p>\n<h1 id=\"%E9%83%A8%E7%BD%B2\">\u90e8\u7f72<\/h1>\n<p>YOURLS \u7684\u5b89\u88c5\u6d41\u7a0b\u7c7b\u4f3c\u4e8ePHP\u7ad9\u70b9\u3002<\/p>\n<p>\u5c06\u5b89\u88c5\u5305\u89e3\u538b\u5e76\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\uff1b \u5c06 user\/config-sample.php \u91cd\u547d\u540d\u4e3a user\/config.php\uff1b \u7f16\u8f91 user\/config.php \u6587\u4ef6\uff0c\u586b\u5165\u6570\u636e\u5e93\u4fe1\u606f\u548c\u914d\u7f6e\u7ad9\u70b9\u9009\u9879\uff1b \u8bbf\u95ee http:\/\/yoursite.com\/admin\/ \u5f00\u59cb\u4f7f\u7528\u5427\uff01<\/p>\n<h2 id=\"%E4%B8%8B%E8%BD%BDYOURLS\">\u4e0b\u8f7dYOURLS<\/h2>\n<p>YOURLS\u514d\u8d39\u5f00\u6e90\uff0c\u53ef\u4ee5\u5728Github\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\uff08https:\/\/github.com\/YOURLS\/YOURLS\/releases\uff09\uff0c\u89e3\u538b\u540e\u653e\u5230\u7ad9\u70b9\u6839\u76ee\u5f55\uff0c\u5e76\u5c06config-sample.php\u66f4\u540d\u4e3aconfig.php\u3002<\/p>\n<div class=\"developer-code-block\">\n<pre class=\"prism-token token line-numbers language-javascript\" tabindex=\"0\"><code class=\"language-javascript\">wget https<span class=\"token operator\">:<\/span><span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>github<span class=\"token punctuation\">.<\/span>com<span class=\"token operator\">\/<\/span><span class=\"token constant\">YOURLS<\/span><span class=\"token operator\">\/<\/span><span class=\"token constant\">YOURLS<\/span><span class=\"token operator\">\/<\/span>archive<span class=\"token operator\">\/<\/span>refs<span class=\"token operator\">\/<\/span>tags<span class=\"token operator\">\/<\/span><span class=\"token number\">1.8<\/span><span class=\"token number\">.2<\/span><span class=\"token punctuation\">.<\/span>tar<span class=\"token punctuation\">.<\/span>gz<\/code><\/pre>\n<p>\u914d\u7f6eMySQL\u6570\u636e\u5e93<\/p>\n<\/div>\n<p>\u9700\u8981\u5148\u65b0\u5efa\u4e00\u4e2aMySQL\u6570\u636e\u5e93\uff0c\u5e76\u8bbe\u7f6e\u597d\u8d26\u53f7\u3001\u5bc6\u7801\uff0c\u7136\u540e\u4fee\u6539user\/config.php\u914d\u7f6e\u6587\u4ef6\uff0c\u586b\u5199\u6b63\u786e\u7684MySQL\u4fe1\u606f\uff0c\u914d\u7f6e\u4fe1\u606f\u5982\u4e0b\u3002<\/p>\n<p>\u4fee\u6539\u6570\u636e\u5e93\u914d\u7f6e<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\u4fee\u6539 user\/config.php\r\n\u200b\r\n\/\/\u914d\u7f6e\u6570\u636e\u5e93\r\ndefine( 'YOURLS_DB_USER', 'your db user name' );\r\ndefine( 'YOURLS_DB_PASS', 'your db password' );\r\ndefine( 'YOURLS_DB_NAME', 'yourls' );\r\ndefine( 'YOURLS_DB_HOST', 'localhost' );\r\ndefine( 'YOURLS_DB_PREFIX', 'yourls_' );\r\n\u200b\r\n\/\/\u8bbe\u7f6e\u4f60\u7684\u57df\u540d\r\ndefine( 'YOURLS_SITE', 'http:\/\/y.xgss.net' );\r\n\u200b\r\n\/\/\u8bbe\u7f6e\u7528\u6237\u540d\u548c\u5bc6\u7801\r\n$yourls_user_passwords = [\r\n    'admin' =&gt; '123456', \/\/ \u8bbe\u7f6e\u597d\u5bc6\u7801\r\n];<\/pre>\n<p>\u8f93\u5165\u7ba1\u7406\u5458\u8d26\u53f7\u5bc6\u7801\u767b\u5f55\u540e\u5982\u679c\u51fa\u73b0\u201cCould not auto-encrypt passwords. Error was: \u201ccannot write file\u201d.\u201d\u62a5\u9519\uff0c\u8bf7\u5c06user\/config.php\u6587\u4ef6\u7684\u6743\u9650\u6539\u4e3a666\uff0c\u7136\u540e\u5237\u65b0\u7f51\u9875\uff0c\u518d\u628a\u6743\u9650\u6539\u56de644\uff0c\u56e0\u4e3a\u4f60\u521a\u624d\u586b\u5199\u5bc6\u7801\u65f6\u7528\u7684\u662f\u660e\u6587\uff0c\u8fd9\u6837\u5f88\u5371\u9669\uff0c\u6240\u4ee5\u7a0b\u5e8f\u9700\u8981\u5bf9\u5176\u52a0\u5bc6\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u5b89\u88c5\uff1ahttp:\/\/sd.laihp.top\/admin\/install.php<\/p>\n<p>\u767b\u5f55\uff1ahttp:\/\/sd.laihp.top\/admin<\/p>\n<p>&nbsp;<\/p>\n<p>https:\/\/cloud.tencent.com\/developer\/article\/2076770<\/p>\n","protected":false},"excerpt":{"rendered":"<p>YOURLS\u662f\u4e00\u6b3e\u4f7f\u7528PHP+Mysql\u5f00\u53d1\u7684\u77ed\u94fe\u63a5\u7a0b\u5e8f\uff0c\u76f8\u6bd4\u516c\u5171\u77ed\u7f51\u5740\u597d\u5904\u662f\u6570\u636e\u638c\u63e1\u5728\u81ea\u5df1\u624b\u4e2d\uff0c\u53ef\u63a7\u6027\u66f4\u9ad8\u3002 &#8230; <a title=\"\u7b80\u5355\u4e91\u670d\u52a1\u5668\u90e8\u7f72\u5f00\u6e90\u77ed\u94fe\u5de5\u5177-YOURLS\" class=\"read-more\" href=\"https:\/\/www.laihp.top\/zqb\/?p=2165\" aria-label=\"\u7ee7\u7eed\u9605\u8bfb\u7b80\u5355\u4e91\u670d\u52a1\u5668\u90e8\u7f72\u5f00\u6e90\u77ed\u94fe\u5de5\u5177-YOURLS\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2165","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts\/2165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2165"}],"version-history":[{"count":2,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts\/2165\/revisions"}],"predecessor-version":[{"id":2172,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts\/2165\/revisions\/2172"}],"wp:attachment":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}