{"id":847,"date":"2020-09-08T23:22:40","date_gmt":"2020-09-08T15:22:40","guid":{"rendered":"https:\/\/www.iotch.xyz\/?p=847"},"modified":"2020-09-08T23:22:40","modified_gmt":"2020-09-08T15:22:40","slug":"%e6%a0%91%e8%8e%93%e6%b4%bewordpress%e6%90%ad%e5%bb%ba%e4%b8%aa%e4%ba%ba%e7%bd%91%e9%a1%b5-%e5%8d%9a%e5%ae%a2","status":"publish","type":"post","link":"https:\/\/www.iotch.xyz\/?p=847","title":{"rendered":"\u6811\u8393\u6d3e+wordpress\u642d\u5efa\u4e2a\u4eba\u7f51\u9875\/\u535a\u5ba2"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">0.\u5f15\u8a00\uff08\u788e\u788e\u5ff5\uff09<\/h2>\n\n\n\n<p>\u672c\u4eba\u5728\u51e0\u5468\u4e4b\u524d\u8d2d\u4e70\u4e86\u4e00\u4e2a\u6811\u8393\u6d3e\u8fdb\u884c\u5b66\u4e60\uff0c\u4e4b\u540e\u4e5f\u840c\u751f\u4e86\u7528\u6811\u8393\u6d3e\u642d\u5efa\u4e00\u4e2a\u81ea\u5df1\u7684\u4e2a\u4eba\u535a\u5ba2\u7684\u60f3\u6cd5\uff0c\u5bfb\u601d\u7740\u65e2\u80fd\u5b66\u5230\u4e1c\u897f\uff0c\u4ee5\u540e\u4e5f\u80fd\u5c06\u5b66\u4e60\u8fc7\u7a0b\u4e2d\u8e29\u7684\u5751\u5728\u535a\u5ba2\u91cc\u8bb0\u5f55\u4e0b\u6765\uff0c\u4e00\u4e3e\u4e24\u5f97\uff0c\u4e8e\u662f\u4e00\u5f00\u59cb\u4fbf\u4f7f\u7528wordpress\u6765\u642d\u5efa\uff0c\u5728\u8e29\u4e86\u8bb8\u591a\u5751\u540e\uff0c\u7ec8\u4e8e\u642d\u5efa\u597d\u4e86\uff0c\u4f46\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u53d1\u73b0\u642d\u5efa\u7684\u535a\u5ba2\u5e76\u6ca1\u6709\u8fbe\u5230\u6211\u60f3\u8981\u7684\u6548\u679c\uff0c\u5728\u7ecf\u8fc7\u4e00\u6bb5\u65f6\u95f4\u7684\u641c\u7d22\u540e\uff0c\u53d1\u73b0\u4f7f\u7528hexo\u6846\u67b6\u6765\u642d\u5efa\u535a\u5ba2\u66f4\u80fd\u6ee1\u8db3\u6211\u7684\u8981\u6c42\uff0c\u4e8e\u662f\u53c8\u4f7f\u7528hexo\u642d\u5efa\u4e86\u4e00\u4e2a\u5168\u65b0\u7684\u535a\u5ba2\uff0c\u4f7f\u7528hexo\u548cwordpress\u642d\u5efa\u535a\u5ba2\u5728\u6211\u770b\u6765\u6700\u5927\u7684\u533a\u522b\u5c31\u662f\uff0cwordpress\u642d\u5efa\u7684\u535a\u5ba2\u9700\u8981\u4f60\u7684\u670d\u52a1\u566824\u5c0f\u65f6\u5728\u7ebf\uff0c\u5426\u5219\u4f60\u7684\u535a\u5ba2\u5c31\u65e0\u6cd5\u8bbf\u95ee\uff0c\u800c\u4f7f\u7528hexo\u642d\u5efa\u7f51\u7ad9\uff0c\u7531\u4e8e\u5b83\u662f\u5728\u4f60\u7684github\u5e93\u91cc\u751f\u6210\u9759\u6001\u7f51\u9875\uff0c\u6240\u4ee5\u4e0d\u9700\u8981\u4f60\u7684\u670d\u52a1\u566824\u5c0f\u65f6\u5728\u7ebf\u4e5f\u80fd\u6b63\u5e38\u8bbf\u95ee\uff0c\u76f8\u5f53\u4e8egithub\u63d0\u4f9b\u4e86\u4e00\u4e2a\u514d\u8d39\u7684\u670d\u52a1\u5668\u3002\u867d\u7136\u4e2a\u4eba\u66f4\u52a0\u559c\u6b22hexo\u4e00\u70b9\uff0c\u4f46\u662f\u597d\u6b79wordpress\u4e5f\u8e29\u4e86\u8fd9\u4e48\u591a\u5751\uff0c\u5c31\u5199\u4e00\u4efd\u8be6\u7ec6\u7684\u6559\u7a0b\u5427\uff0c\u8d77\u7801wordpress\u9664\u4e86\u80fd\u642d\u535a\u5ba2\u4e4b\u5916\uff0c\u8fd8\u80fd\u5efa\u5176\u4ed6\u7f51\u9875\u561b\u3002\u60f3\u4f7f\u7528hexo\u642d\u535a\u5ba2\u7684\u5c0f\u4f19\u4f34\u53ef\u4ee5\u770b\u6211\u7684\u4e0b\u4e00\u7bc7\u535a\u5ba2<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1.\u5b89\u88c5LNMP\u56db\u4ef6\u5957<\/h2>\n\n\n\n<p>\u5728\u4f7f\u7528wordpress\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5148\u5728\u4f60\u7684\u6570\u7801\u6d3e\u4e0a\u5c06LNMP\u56db\u4ef6\u5957\u5b89\u88c5\u5b8c\u6210\uff0cLNMP\u5373\u4e3aLinux\u3001Nginx\u3001MaraiDB\uff08MySQL\uff09\u3001PHP\uff0c\u8fd9\u4e5f\u5c31\u610f\u5473\u8fd9\u9664\u4e86\u6811\u8393\u6d3e\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528\u5176\u4ed6\u8fd0\u884c\u7740Linux\u7cfb\u7edf\u7684\u8bbe\u5907\u3002\u672c\u6587\u57fa\u4e8e\u6811\u8393\u6d3e\u8fdb\u884c\u642d\u5efa\uff0c\u5982\u679c\u4f60\u4f7f\u7528\u7684\u4e0d\u662f\u6811\u8393\u6d3e\u53ef\u80fd\u6709\u4e9b\u5730\u65b9\u6709\u51fa\u5165\uff0c\u4e0d\u8fc7\u90fd\u662f\u5927\u540c\u5c0f\u5f02\u7684\uff0c\u7a0d\u52a0\u4fee\u6539\u5373\u53ef\u3002<\/p>\n\n\n\n<p>\u6253\u5f00\u547d\u4ee4\u884c\uff0c\u4f9d\u6b21\u8f93\u5165\u4e0b\u5217\u547d\u4ee4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install nginx        #\u5b89\u88c5Nginx\nsudo apt install php7.3\t      #\u5b89\u88c5PHP\u53ca\u76f8\u5173\u5e94\u7528\uff0c\u53ef\u80fd\u4f60\u5b89\u88c5\u7684\u65f6\u50197.3\u5df2\u7ecf\u4e0d\u662f\u6700\u65b0\u7248\u4e86\uff0c\u767e\u5ea6\u4e00\u4e0b\u6700\u65b0\u7248\u7136\u540e\u4fee\u6539\u7248\u672c\u53f7\u5373\u53ef\nsudo apt install php7.3-fpm\nsudo apt install php7.3-mysql\nsudo apt install php7.3-common\nsudo apt install mariadb-server     #\u5b89\u88c5MaraiDB<\/code><\/pre>\n\n\n\n<p>\u4e4b\u540e\u6211\u4eec\u9700\u8981\u5bf9\u6211\u4eec\u7684Nginx\u8fdb\u884c\u4e00\u4e9b\u7b80\u5355\u7684\u914d\u7f6e\uff0c\u8f93\u5165\u4e0b\u5217\u547d\u4ee4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/nginx\/sites-available\/default<\/code><\/pre>\n\n\n\n<p>\u627e\u5230\u548c\u4e0b\u9762\u76f8\u5bf9\u5e94\u7684\u90e8\u5206\u5e76\u7528\u4e0b\u9762\u7684\u5c06\u539f\u90e8\u5206\u8986\u76d6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Default server configuration\n#\nserver {\n        listen 80 default_server;\n        listen &#91;::]:80 default_server;\n \n        root \/var\/www\/html;\n \n        # Add index.php to the list if you are using PHP\n        index index.html index.htm index.nginx-debian.html index.php;\n \n        server_name _;\n \n        location \/ {\n                 # First attempt to serve request as file, then\n                 # as directory, then fall back to displaying a 404.\n                 try_files $uri $uri\/ =404;\n        }\n \n        # pass PHP scripts to FastCGI server\n        #\n        location ~ \\.php$ {\n                 # include snippets\/fastcgi-php.conf;\n                 #\n                 # # With php-fpm (or other unix sockets):\n                 fastcgi_pass unix:\/run\/php\/php7.3-fpm.sock;\n                 # # With php-cgi (or other tcp sockets):\n                 # fastcgi_pass 127.0.0.1:9000;\n                 # \u8bbe\u7f6e\u811a\u672c\u6587\u4ef6\u8bf7\u6c42\u7684\u8def\u5f84\n                 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n                 # \u5f15\u5165fastcgi\u7684\u914d\u7f6e\u6587\u4ef6 \n                 include fastcgi_params;\n        }\n \n}<\/code><\/pre>\n\n\n\n<p>Ctrl+O\u4fdd\u5b58\u6587\u6863\uff0cCtrl+X\u9000\u51fa<\/p>\n\n\n\n<p>\u8f93\u5165\u4e0b\u5217\u547d\u4ee4\u91cd\u542f\u670d\u52a1<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo \/etc\/init.d\/nginx restart\nsudo \/etc\/init.d\/php7.3-fpm restart<\/code><\/pre>\n\n\n\n<p>\u4e24\u6b21\u5747\u51fa\u73b0OK\u5373\u8868\u793a\u91cd\u542f\u6210\u529f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo service mariadb restart    #\u8f93\u5165\u8fd9\u4e24\u884c\u547d\u4ee4\u65e0\u4efb\u4f55\u63d0\u793a\u662f\u6b63\u5e38\u73b0\u8c61\nsudo service nginx restart<\/code><\/pre>\n\n\n\n<p>\u63a5\u7740\u8f93\u5165\u4e0b\u5217\u547d\u4ee4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chmod 777 \/var\/            #\u4e0b\u9762\u4e09\u884c\u7ed9\u6587\u4ef6\u6388\u4e88\u6743\u9650\nsudo chmod 777 \/var\/www\nsudo chmod 777 \/var\/www\/html\ncd \/var\/www\/html                #\u8be5\u6587\u4ef6\u5939\u4e0b\u4e3a\u7f51\u7ad9\u6839\u76ee\u5f55\nsudo nano index.php             #\u65b0\u5efaPHP\u6587\u4ef6\u8fdb\u884c\u6d4b\u8bd5<\/code><\/pre>\n\n\n\n<p>\u5728index.php\u4e2d\u8f93\u5165<strong>&lt;?php phpinfo(); ?&gt;<\/strong>\uff0c\u4fdd\u5b58\u540e\u9000\u51fa\uff0c\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165<strong>\u4f60\u7684\u6811\u8393\u6d3eip\/index.php<\/strong>\uff0c\u5982\u679c\u770b\u5230\u4e86\u4e0b\u56fe\u7684phpinfo \u4fe1\u606f\uff0c\u8bf4\u660ephp\u548cnginx\u914d\u7f6e\u6210\u529f<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic1.zhimg.com\/80\/v2-b274e4f566cad05f73e1119d61f7b8d1_720w.jpg\" alt=\"\"\/><figcaption>\u6211\u7684phpinfo\u4fe1\u606f<\/figcaption><\/figure>\n\n\n\n<p>\u63a5\u4e0b\u6765\u6211\u4eec\u8fd8\u9700\u8981\u5b89\u88c5phpMyAdmin<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install phpmyadmin<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic3.zhimg.com\/80\/v2-865acf437e4891a94f0a21e041fe6e94_720w.jpg\" alt=\"\"\/><figcaption>\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u4f1a\u51fa\u73b0\u8be5\u5bf9\u8bdd\u6846\uff0c\u9009\u62e9\u7b2c\u4e00\u4e2a\u6309\u56de\u8f66\u5373\u53ef<\/figcaption><\/figure>\n\n\n\n<p>\u51fa\u73b0\u7b2c\u4e8c\u4e2a\u5bf9\u8bdd\u6b3e\u9009\u62e9YES\u5373\u53ef\uff0c\u4e4b\u540e\u4f1a\u518d\u5f39\u51fa\u4e2a\u5bf9\u8bdd\u6846\u8ba9\u4f60\u8f93\u5165\u5bc6\u7801\uff0c\u8f93\u5165\u5b8c\u6210\u540e\u9009\u62e9ok\uff0c\u7136\u540e\u518d\u8f93\u5165\u4e00\u904d\u5bc6\u7801\u5373\u53ef\uff08\u8fd9\u4e2a\u5bc6\u7801\u662f\u4e4b\u540e\u767b\u5f55phpmyadmin\u8981\u7528\u7684\uff0c\u52a1\u5fc5\u7262\u8bb0\uff0c\u540c\u65f6\u4e5f\u8981\u6ce8\u610f\u5927\u5c0f\u5199\uff09<\/p>\n\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\u8fd8\u9700\u8981\u628aphpmyadmin \u8fde\u63a5\u5230 nginx\u670d\u52a1\u5668\u7684php\u6839\u76ee\u5f55\u4e0a\uff0c\u7528\u4e0b\u9762\u8fd9\u4e2a\u547d\u4ee4\u6765\u5efa\u7acb\u8f6f\u8fde\u63a5<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ln -s \/usr\/share\/phpmyadmin \/var\/www\/html<\/code><\/pre>\n\n\n\n<p>\u5b8c\u6210\u540e\u5728\u6d4f\u89c8\u5668\u5185\u8f93\u5165<strong>\u4f60\u7684\u6811\u8393\u6d3eip\/phpmyadmin<\/strong>\uff0c\u51fa\u73b0\u4e0b\u65b9\u56fe\u7247\u5373\u8bf4\u660e\u914d\u7f6e\u6210\u529f<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/picb.zhimg.com\/80\/v2-2aca3c95ed92f1685818047561434ad4_720w.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u4f46\u662f\u6211\u4eec\u4e0d\u80fd\u76f4\u63a5\u4f7f\u7528\uff0c\u56e0\u4e3a\u6211\u4eec\u76ee\u524d\u7684\u6570\u636e\u5e93\u7528\u6237\u662f\u6ca1\u6709\u6743\u9650\u7684\uff0c\u6240\u4ee5\u6211\u4eec\u8fd8\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u6709\u6743\u9650\u7684\u6570\u636e\u5e93\u7528\u6237<\/p>\n\n\n\n<p>\u56de\u5230\u547d\u4ee4\u884c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mysql -u root -p     #\u8fdb\u5165mariaDB\u73af\u5883\uff0c\u7b2c\u4e00\u6b21\u767b\u9646\u662f\u6ca1\u6709\u5bc6\u7801\u7684\uff0c\u76f4\u63a5\u6309\u56de\u8f66\u5373\u53ef<\/code><\/pre>\n\n\n\n<p>\u8f93\u5165\u4e0b\u5217\u547d\u4ee4<\/p>\n\n\n\n<p>CREATE USER 'name'@' localhost ' IDENTIFIED BY 'password'\uff1b<\/p>\n\n\n\n<p><strong>\u6ce8\uff1a\u4e0d\u8981\u6f0f\u6389\u5206\u53f7\uff0cname\u5904\u586b\u5165\u4f60\u60f3\u8981\u521b\u5efa\u7684\u8d26\u6237\u540d\uff0cpassword\u5904\u586b\u5165\u8be5\u8d26\u6237\u7684\u5bc6\u7801\uff0c\u4e00\u4e0b\u6240\u6709\u8d26\u53f7\u540d\u90fd\u7528name\u6765\u4ee3\u66ff\uff0c\u8bf7\u6839\u636e\u81ea\u5df1\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u4fee\u6539<\/strong><\/p>\n\n\n\n<p>\u51fa\u73b0Query OK\u8bf4\u660e\u521b\u5efa\u6210\u529f\uff0c\u6ca1\u51fa\u73b0\u8bf4\u660e\u8f93\u5165\u7684\u547d\u4ee4\u6709\u95ee\u9898\uff0c\u518d\u68c0\u67e5\u4e00\u904d<\/p>\n\n\n\n<p>\u7136\u540e\u8f93\u5165\u4e0b\u9762\u7684\u547d\u4ee4\u6765\u6388\u4e88\u6211\u4eec\u7684\u7528\u6237\u6700\u9ad8\u6743\u9650<\/p>\n\n\n\n<p>grant all privileges on *.* to name@localhost;<\/p>\n\n\n\n<p>\u5982\u679c\u60f3\u8981\u64a4\u9500\u6743\u9650\u7684\u8bdd\u5c31\u8f93\u5165\u4e0b\u5217\u547d\u4ee4<\/p>\n\n\n\n<p>revoke all privileges on *.* form name@localhost;<\/p>\n\n\n\n<p>\u6700\u540e\u8bb0\u5f97\u5237\u65b0\u4e00\u4e0b\u6743\u9650\u4fe1\u606f\uff0c\u5426\u5219\u5728\u4e4b\u540e\u4f1a\u51fa\u73b0\u9519\u8bef<\/p>\n\n\n\n<p>flush privileges;<\/p>\n\n\n\n<p>\u7136\u540e\u5c31\u53ef\u4ee5\u8f93\u5165exit\u9000\u51fa\u4e86<\/p>\n\n\n\n<p>\u4e4b\u540e\u6253\u5f00\u6d4f\u89c8\u5668\u8f93\u5165\u7f51\u5740\u8fdb\u5165phpmyadmin,\u7528\u4e4b\u524d\u521b\u5efa\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\u8fdb\u884c\u767b\u5f55\uff0c\u5c31\u4f1a\u53d1\u73b0\u5df2\u7ecf\u62e5\u6709\u5168\u90e8\u6743\u9650\u4e86<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic3.zhimg.com\/80\/v2-4b4c7183c13aca57e7d149b77aae937e_720w.jpg\" alt=\"\"\/><figcaption>\u70b9\u51fb\u56fe\u4e2d\u7ea2\u6846\u5904\u5373\u53ef\u91cd\u65b0\u767b\u5f55<\/figcaption><\/figure>\n\n\n\n<p>\u81f3\u6b64LNMP\u56db\u4ef6\u5957\u90fd\u5df2\u5b89\u88c5\u914d\u7f6e\u5b8c\u6210\uff01<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2.\u5b89\u88c5wordpress<\/h2>\n\n\n\n<p>\u6253\u5f00\u6811\u8393\u6d3e\u6d4f\u89c8\u5668\uff0c\u8f93\u5165wordpress.org,\u5728\u5b98\u7f51\u4e2d\u8fdb\u884c\u4e0b\u8f7d\uff0c\u4e5f\u53ef\u4ee5\u83b7\u53d6\u4e0b\u8f7d\u94fe\u63a5\uff0c\u5728\u63a7\u5236\u53f0\u4e2d\u4f7f\u7528wget\u547d\u4ee4\u76f4\u63a5\u8fdb\u884c\u4e0b\u8f7d\uff0c\u5982\u679c\u5728\u6811\u8393\u6d3e\u5185\u4e0b\u8f7d\u901f\u5ea6\u7f13\u6162\uff0c\u53ef\u4ee5\u5148\u5728PC\u4e0a\u5c06\u538b\u7f29\u5305\u4e0b\u8f7d\u4e0b\u6765\uff0c\u518d\u4f20\u5230\u6811\u8393\u6d3e\u4e0a\u3002<\/p>\n\n\n\n<p>\u4e0b\u8f7d\u5b8c\u6210\u540e\u5c06\u6587\u4ef6\u89e3\u538b\u81f3\/var\/www\/html\u5904\uff0c\u4f60\u4e5f\u53ef\u4ee5\u5c06\u89e3\u538b\u540e\u7684\u6587\u4ef6\u91cd\u547d\u540d\uff0c\u6bd4\u5982\u6211\u5c06\u6587\u4ef6\u91cd\u547d\u540d\u4e3ablog\uff0c\u7136\u540e\u8fd8\u9700\u8981\u8f93\u5165\u4e0b\u5217\u547d\u4ee4\u7ed9\u6587\u4ef6\u8d4b\u4e88\u6743\u9650<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chmod 777 \/var\/www\/html\/blog<\/code><\/pre>\n\n\n\n<p>\u4e4b\u540e\u4f60\u9700\u8981\u7ed9\u4f60\u7684\u7f51\u7ad9\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93\uff0c\u6253\u5f00\u6811\u8393\u6d3e\u6d4f\u89c8\u5668\u8fdb\u5165phpmyadmin\uff0c\u70b9\u6570\u636e\u5e93\uff0c\u8f93\u5165\u6570\u636e\u5e93\u540d\u5c31\u53ef\u4ee5\u76f4\u63a5\u70b9\u521b\u5efa\u4e86<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic1.zhimg.com\/80\/v2-7dc94129dba5d1a5e0e5bb40550d0089_720w.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u4e4b\u540e\u8f93\u5165<strong>\u4f60\u7684\u6811\u8393\u6d3eIP\/\u6587\u4ef6\u540d<\/strong>\uff0c\u4ee5\u6211\u7684\u4e3a\u4f8b\u5c31\u662f<strong>168.192.1.100\/blog<\/strong>,\u7136\u540e\u4f1a\u51fa\u73b0\u6b22\u8fce\u754c\u9762\uff0c\u70b9\u51fb\u5f00\u59cb\u5373\u53ef\uff0c\u7136\u540e\u4f1a\u8ba9\u4f60\u586b\u5199\u4e00\u4e9b\u57fa\u672c\u4fe1\u606f\uff0c\u7528\u6237\u540d\u548c\u5bc6\u7801\u4e3a\u4f60\u767b\u5f55phpmyadmin\u65f6\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u6570\u636e\u5e93\u4e3b\u673a\u586b\u4e3a<strong>\u4f60\u7684\u6811\u8393\u6d3eIP\u5730\u5740<\/strong>\uff0c\u8868\u524d\u7f00\u4e0d\u9700\u8981\u8fdb\u884c\u66f4\u6539\u3002<\/p>\n\n\n\n<p>\u7136\u540e\u4f1a\u8df3\u8f6c\u5230\u4e00\u4e2a\u65b0\u7684\u9875\u9762\uff0c\u6309\u7167\u63d0\u793a\u586b\u5199\u4fe1\u606f\u5373\u53ef\uff0c\u5b8c\u6210\u4e4b\u540e\u8fdb\u884c\u767b\u5f55\uff0c\u51fa\u73b0\u4e0b\u56fe\u5373\u8bf4\u660e\u5927\u529f\u544a\u6210\u5566\uff01<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic4.zhimg.com\/80\/v2-28095c3edfae45136b3ba4cd37dc4075_720w.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u7136\u540e\u4f60\u53ef\u4ee5\u81ea\u5df1\u66f4\u6362\u7f51\u7ad9\u7684\u5916\u89c2\uff0c\u6216\u8005\u4f7f\u7528\u63d2\u4ef6\u6765\u7f8e\u5316\u81ea\u5df1\u7684\u7f51\u7ad9\uff0call up to you\uff01<\/p>\n\n\n\n<p>\u5f53\u7136\u4f60\u4e5f\u53ef\u4ee5\u5728\u540c\u4e00\u5c40\u57df\u7f51\u4e0b\u4f7f\u7528\u5176\u4ed6\u8bbe\u5907\u6765\u8bbf\u95ee\u4f60\u7684\u7f51\u7ad9\uff0c\u5982\u679c\u5e0c\u671b\u81ea\u5df1\u7684\u7f51\u7ad9\u80fd\u88ab\u5f53\u524d\u5c40\u57df\u7f51\u4ee5\u5916\u7684\u7f51\u7edc\uff08\u5373\u5916\u7f51\uff09\u8bbf\u95ee\u7684\u8bdd\uff0c\u63a8\u8350\u65b0\u624b\u4f7f\u7528\u82b1\u751f\u58f3\u8fdb\u884c\u5185\u7f51\u7a7f\u900f\uff0c\u82b1\u751f\u58f3\u5b98\u65b9\u4e5f\u6709\u5341\u5206\u8be6\u7ec6\u7684\u6559\u7a0b\uff0c\u8fd9\u7bc7\u6587\u7ae0\u5c31\u4e0d\u8fc7\u591a\u7684\u6d89\u53ca\u4e86\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3.\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6cd5<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\uff081\uff09\u540c\u4e00\u5c40\u57df\u7f51\u4e0b\u5176\u4ed6\u8bbe\u5907\u65e0\u6cd5\u6b63\u5e38\u663e\u793a\u7f51\u7ad9\u9875\u9762<\/h3>\n\n\n\n<p>\u68c0\u67e5\u4e00\u4e0b\u8bbe\u7f6e\uff0c\u5c06\u8fd9\u4e24\u5904\u6539\u4e3a<strong>\u4f60\u7684\u6811\u8393\u6d3e\u7684IP\u5730\u5740\/\u6587\u4ef6\u540d<\/strong>\u5373\u53ef\uff0c\u5982\u679c\u4f60wordpress\u7684\u6587\u4ef6\u5939\u6362\u4e86\u4f4d\u7f6e\u6216\u8005\u91cd\u547d\u540d\u4e86\u4e5f\u9700\u8981\u4fee\u6539\u6b64\u5904<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic3.zhimg.com\/80\/v2-bfa52da0b1d3ba45a2bbc91193bab4f7_720w.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\uff082\uff09\u4e0b\u8f7d\u4e3b\u9898\u6216\u8005\u63d2\u4ef6\u65f6\u663e\u793a\u672a\u80fd\u8fde\u63a5\u5230FTP\u670d\u52a1\u5668<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic3.zhimg.com\/80\/v2-e452a5f3ff83787e622b59bad77ca79e_720w.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u5982\u679c\u51fa\u73b0\u4e0a\u8bc9\u9519\u8bef\u63d0\u793a\uff0c\u5728\u63a7\u5236\u53f0\u8f93\u5165<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install vsftpd        #\u5b89\u88c5ftpd\u670d\u52a1<\/code><\/pre>\n\n\n\n<p>\u5b89\u88c5\u6210\u529f\u540e\uff0cftpd\u5c31\u5df2\u7ecf\u53ef\u4ee5\u767b\u5f55\u548c\u6d4f\u89c8\u6587\u4ef6\u4e86\uff0c\u4f46\u662f\u4e0d\u80fd\u5199\uff0c\u9700\u8981\u66f4\u6539\u5199\u6743\u9650\u3002<\/p>\n\n\n\n<p>\u66f4\u6539\u6743\u9650\u9700\u8981<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo passwd root<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u8f93\u5165\u4e24\u904d\u5bc6\u7801<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo --unlock root           #\u89e3\u9501root\u7528\u6237<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u518d\u8f93\u5165su\uff0c\u8f93\u5165\u521a\u521a\u7684\u5bc6\u7801\uff0c\u8fdb\u5165root\u7528\u6237<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/vsftpd.conf<\/code><\/pre>\n\n\n\n<p>\u53bb\u6389write_enable=YES\u524d\u9762\u7684#\uff0c\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>service vsftpd restart         #\u91cd\u542f\u670d\u52a1<\/code><\/pre>\n\n\n\n<p>\u4e4b\u540e\u518d\u91cd\u542f\u6811\u8393\u6d3e\u5373\u53ef<\/p>\n\n\n\n<p>\u4e4b\u540e\u518d\u4e0b\u8f7d\u4e3b\u9898\u5373\u53ef\uff0cFTP\u7528\u6237\u540d\u548c\u5bc6\u7801\u4e3a\u6811\u8393\u6d3e\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u9ed8\u8ba4\u4e3api\u548craspberry<\/p>\n\n\n\n<p>\u5982\u679c\u8fdb\u884c\u4e86\u4ee5\u4e0a\u64cd\u4f5c\u8fd8\u662f\u65e0\u6cd5\u4e0b\u8f7d\u4e3b\u9898\u7684\u8bdd\uff0c\u53ef\u4ee5\u5148\u5728PC\u4e0a\u5c06\u4e3b\u9898\u4e0b\u8f7d\u4e0b\u6765\uff0c\u518d\u4f20\u5230\u6811\u8393\u6d3e\u4e2d\uff0c\u89e3\u538b\u653e\u5728\/var\/www\/html\/blog\/wp-content\/thems\u4e2d\u5373\u53ef\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4.one more things<\/h2>\n\n\n\n<p>\u535a\u5ba2\u5efa\u5b8c\u4e4b\u540e\u5c31\u5b8c\u4e86\uff1f\u6211\u5728\u5f00\u5934\u5c31\u8bb2\u8fc7wordpress\u8fd8\u53ef\u4ee5\u505a\u5176\u4ed6\u7f51\u7ad9\uff0c\u6240\u4ee5\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528wordpress\u642d\u5efa\u4e00\u4e2a\u7b80\u6613\u7684\u6811\u8393\u6d3e\u8d44\u6e90\u76d1\u63a7\u7f51\u7ad9\uff0c\u8fd9\u4e5f\u662f\u6211\u5373\u4fbf\u662f\u540e\u6765\u4f7f\u7528hexo\u642d\u5b8c\u535a\u5ba2\u4e4b\u540e\u8fd8\u7559\u7740wordpress\u7684\u539f\u56e0\u3002<\/p>\n\n\n\n<p>\u800c\u8fd9\u4e2a\u7f51\u7ad9\u642d\u5efa\u8d77\u6765\u4e5f\u5341\u5206\u7684\u7b80\u5355\uff0c\u56e0\u4e3a\u96be\u7684\u90e8\u5206\u522b\u4eba\u90fd\u5e2e\u6211\u4eec\u505a\u597d\u4e86\uff0c\u6211\u4eec\u53ea\u9700\u8981\u5728github\u4e0aclone\u4e0b\u6765\u4f7f\u7528\u5c31\u597d\u4e86\u3002<\/p>\n\n\n\n<p>\u9996\u5148\u6211\u4eec\u9700\u8981\u5b89\u88c5git\uff0c\u4e00\u822c\u6765\u8bf4Raspbian\u91cc\u5185\u7f6e\u6709git\uff0c\u5982\u679c\u6ca1\u6709\u7684\u8bdd\u4f7f\u7528\u4e00\u4e0b\u547d\u4ee4\u6765\u8fdb\u884c\u5b89\u88c5<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install git<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u6211\u4eec\u9700\u8981\u628a\u6211\u4eec\u7684\u76ee\u5f55\u8bbe\u5b9a\u5728\u7f51\u7ad9\u7684\u6839\u76ee\u5f55\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/var\/www\/html\/<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u4f7f\u7528git\u5de5\u5177\u5c06github\u4e0a\u7684\u5f00\u6e90\u9879\u76eepi dashboard\u7ed9clone\u4e0b\u6765\u5e76\u8d4b\u4e88\u6743\u9650<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo git clone https:\/\/github.com\/spoonysonny\/pi-dashboard.git\nsudo chown-R www-data pi-dashboard        #\u4e3api dashboard\u8d4b\u4e88\u6743\u9650<\/code><\/pre>\n\n\n\n<p>\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8f93\u5165<strong>\u4f60\u7684\u6811\u8393\u6d3eIP\/dashboard\uff0c<\/strong>\u5373\u53ef\u770b\u5230\u6811\u8393\u6d3e\u7684\u8d44\u6e90\u4f7f\u7528\u60c5\u51b5<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/picb.zhimg.com\/80\/v2-3bc7d4c9235dd2c9989dad0b66afbf0d_720w.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u5982\u679c\u4f60\u611f\u5174\u8da3\u7684\u8bdd\u8fd8\u53ef\u4ee5\u6765\u6211\u4eec\u7684\u4e2a\u4eba\u535a\u5ba2\u770b\u770b<a href=\"https:\/\/link.zhihu.com\/?target=http%3A\/\/inkor.xyz\/\" target=\"_blank\" rel=\"noreferrer noopener\" rel=\"nofollow\" >inkor.xyz<\/a><\/p>\n\n\n\n<p>\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https:\/\/zhuanlan.zhihu.com\/p\/165123275\" target=\"_blank\" rel=\"noreferrer noopener\" rel=\"nofollow\" >https:\/\/zhuanlan.zhihu.com\/p\/165123275<\/a><\/p>\n<button class=\"simplefavorite-button\" data-postid=\"847\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>0.\u5f15\u8a00\uff08\u788e\u788e\u5ff5\uff09 \u672c\u4eba\u5728\u51e0\u5468\u4e4b\u524d\u8d2d\u4e70\u4e86\u4e00\u4e2a\u6811\u8393\u6d3e\u8fdb\u884c\u5b66\u4e60\uff0c\u4e4b\u540e\u4e5f\u840c\u751f\u4e86\u7528\u6811\u8393\u6d3e\u642d\u5efa\u4e00\u4e2a\u81ea\u5df1\u7684\u4e2a\u4eba\u535a\u5ba2\u7684\u60f3\u6cd5\uff0c\u5bfb\u601d\u7740\u65e2\u80fd\u5b66\u5230\u4e1c\u897f\uff0c &#8230;<\/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-847","post","type-post","status-publish","format-standard","hentry","category-10"],"_links":{"self":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/847","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=847"}],"version-history":[{"count":0,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/847\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=847"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}