{"id":42180,"date":"2023-03-20T11:00:58","date_gmt":"2023-07-04T17:20:17","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4\/"},"modified":"2024-04-29T19:45:59","modified_gmt":"2024-04-29T11:45:59","slug":"%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4\/","title":{"rendered":"\u5728Windows\u4e0a\u4f7f\u7528Bash\u7684Ubuntu\u73af\u5883\u6765\u6784\u5efaRails\/PostgreSQL\u5f00\u53d1\u73af\u5883[\u521b\u4f5c\u8005\u66f4\u65b0\u6559\u7a0b]"},"content":{"rendered":"<p>\u81ea\u4ece2016\u5e74\u5e95\u4f7f\u7528Bash on Ubuntu on Windows\u5728Windows\u4e0a\u642d\u5efa\u4e86Rails\/PostgreSQL\u5f00\u53d1\u73af\u5883\u4ee5\u6765\uff0c\u6211\u4eceMac\u56de\u5230\u4e86Windows\uff0c\u5e76\u4e14\u987a\u5229\u5730\u7ee7\u7eed\u5f00\u53d1\u800c\u4e0d\u611f\u5230\u538b\u529b\u3002<\/p>\n<p>\u5728Windows 10 Creators Update\u81ea\u52a8\u5b89\u88c5\u5230\u8fd9\u4e2a\u5f00\u53d1\u73af\u5883\u4e4b\u524d\uff0c\u9996\u5148\u5728\u865a\u62df\u673a\u4e0a\u8fdb\u884c\u4e00\u4e2a\u5e72\u51c0\u7684Creators Update\u5b89\u88c5\uff0c\u5e76\u5728Windows\u4e0a\u7684Bash on Ubuntu\u4e0a\u6784\u5efaRails\/PostgreSQL\u7684\u5f00\u53d1\u73af\u5883\u3002\u73b0\u5728\uff0c\u8ba9\u6211\u4e00\u6b65\u4e00\u6b65\u5730\u4ecb\u7ecd\u8fd9\u4e2a\u8fc7\u7a0b\u3002<\/p>\n<h2>\u9996\u5148<\/h2>\n<h3>\u76ee\u6807<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Windows \u30de\u30b7\u30f3\u306e\u30ed\u30fc\u30ab\u30eb\u4e0a\u306b Rails\/PostgreSQL \u306e\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u305f\u3044<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">CUI (PowerShell, BoW) \u306e\u307f\u3067\u69cb\u7bc9\u3057\u305f\u3044<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Mac \u304b\u3089 Windows \u306b\u56de\u5e30\u3057\u305f\u3044<\/ul>\n<h3>\u884c\u52a8\u73af\u5883<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Windows \u30de\u30b7\u30f3\u306e\u69cb\u6210 (\u8a66\u884c\u932f\u8aa4\u7528)<\/ul>\n<\/li>\n<\/ul>\n<p>VMware Fusion 8.5 \u306e\u4eee\u60f3\u30de\u30b7\u30f3 (Core i5-5257U\u3001\u30e1\u30e2\u30ea 4GB)<br \/>\nWindows 10 Pro x64, build 15063.13<\/p>\n<p>Ruby\/Rails \u306e\u30d0\u30fc\u30b8\u30e7\u30f3<\/p>\n<p>Ruby 2.3.0 \/ Rails 4.2.3<br \/>\nRuby 2.4.1 \/ Rails 5.0.2<\/p>\n<h3>\u8bcd\u888b\uff08Bag of Words\uff09\u7cfb\u7edf\u7684\u8981\u6c42<\/h3>\n<p>\u4f9b\u53c2\u8003\uff0c\u5728BoW\u7684\u5b89\u88c5\u6307\u5357\u4e2d\uff0c\u4ee5\u4e0b\u662fBoW\u7684\u7cfb\u7edf\u8981\u6c42\uff08\u9002\u7528\u4e8eWindows 10\u5bb6\u5ead\u7248\uff09\u3002<\/p>\n<blockquote><p>\u4f60\u7684\u7535\u8111\u5fc5\u987b\u8fd0\u884c64\u4f4d\u7684Windows 10\u7eaa\u5ff5\u7248\u66f4\u65b0\u7248\u672c14393\u6216\u66f4\u9ad8\u7684\u7248\u672c\u3002<\/p><\/blockquote>\n<h3>PostgreSQL \u914d\u7f6e<\/h3>\n<p>\u7531\u4e8eAnniversary Update\u7684BoW\u4e2d\u5b89\u88c5PostgreSQL\u5931\u8d25\u7684\u95ee\u9898\uff0cBoW\u53ea\u5b89\u88c5\u4e86PostgreSQL\u5ba2\u6237\u7aef\uff0c\u5e76\u76f4\u63a5\u5c06PostgreSQL for Windows\u4f5c\u4e3aPostgreSQL\u670d\u52a1\u5668\u5b89\u88c5\u5728Windows\u4e0a\u3002<\/p>\n<p>\u7531\u4e8e\u672c\u6b21\u7684Creators Update\uff0c\u5931\u8d25\u4e86PostgreSQL\u7684\u5b89\u88c5\u95ee\u9898\u88ab\u6210\u529f\u6539\u5584\uff0c\u56e0\u6b64\u6211\u5c1d\u8bd5\u5c06PostgreSQL\u670d\u52a1\u5668\u914d\u7f6e\u4e3aBoW\u65f6\uff0c\u9047\u5230\u4e86\u53e6\u4e00\u4e2a\u4e0ePostgreSQL\u65e0\u5173\u7684BoW\u95ee\u9898\uff0c\u5373\u4e0d\u80fd\u4f7f\u7528\u901a\u5e38\u7684Linux\u65b9\u5f0f\uff08sysv-rc-conf on\uff09\u6765\u8bbe\u7f6e\u670d\u52a1\u7684\u81ea\u52a8\u542f\u52a8\uff0c\u5e76\u4e14\u53d1\u73b0\u8fd9\u5f88\u9ebb\u70e6\uff08\u4ee5sshd\u4e3a\u4f8b\uff09\u3002<\/p>\n<p>\u5bf9\u4e8e\u8fd9\u4e00\u70b9\uff0cPostgreSQL for Windows \u4e0d\u9700\u8981\u4efb\u4f55\u7279\u6b8a\u8003\u8651\uff0c\u5b83\u4f1a\u4f5c\u4e3a Windows \u7684\u4e00\u4e2a\u670d\u52a1\u800c\u81ea\u52a8\u542f\u52a8\u3002\u6b64\u5916\uff0c\u5728\u8fc7\u53bb\u51e0\u4e2a\u6708\u91cc\uff0c\u6211\u4eec\u4e00\u76f4\u5728\u4f7f\u7528 BoW \u7684 PostgreSQL \u5ba2\u6237\u7aef\u8fde\u63a5\u5230 PostgreSQL for Windows \u8fdb\u884c\u5f00\u53d1\uff0c\u4f46\u6ca1\u6709\u4efb\u4f55\u7279\u522b\u5f15\u4eba\u5173\u6ce8\u7684\u4e0d\u5229\u4e4b\u5904\u3002\u7531\u4e8e\u6570\u636e\u5e93\u4e0e\u5176\u4ed6\u90e8\u5206\u88ab\u5206\u79bb\uff0c\u8fd9\u79cd\u914d\u7f6e\u66f4\u52a0\u65b9\u4fbf\uff0c\u6240\u4ee5\u5728 Creators Update \u4e2d\u6211\u4eec\u5c06\u7ee7\u7eed\u91c7\u7528\u8fd9\u79cd\u914d\u7f6e\u3002<\/p>\n<h3>\u6267\u884c\u5185\u5bb9\u7684\u56fe\u4f8b<\/h3>\n<p>PowerShell \u7684\u6267\u884c\u5185\u5bb9\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; command\r\n<\/code><\/pre>\n<p>\u8bcd\u888b\u6a21\u578b\uff08BoW\uff09\u7684\u6267\u884c\u5185\u5bb9\u3002<\/p>\n<pre class=\"post-pre\"><code>$ command\r\n<\/code><\/pre>\n<h2>\u5728\u4e2d\u6587\u4e2d\uff0c&#8221;BoW \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb&#8221;\u53ef\u4ee5\u7ffb\u8bd1\u4e3a &#8220;BoW\u7684\u5b89\u88c5&#8221;\u3002<\/h2>\n<h3>\u5b89\u88c5 BoW<\/h3>\n<p>\u4f7f\u7528\u952e\u76d8\u7ec4\u5408 [Windows] + [X] \u6253\u5f00\u83dc\u5355\uff0c\u9009\u62e9 [Windows PowerShell (\u7ba1\u7406\u5458)] \u5e76\u8f93\u5165\u4ee5\u4e0b\u4e24\u4e2a\u547d\u4ee4\u6765\u6dfb\u52a0\u6ce8\u518c\u8868\u4ee5\u542f\u7528\u5f00\u53d1\u8005\u6a21\u5f0f\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; New-ItemProperty -Path HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AppModelUnlock -Name AllowAllTrustedApps -PropertyType DWord -Value 1 -Force\r\n&gt; New-ItemProperty -Path HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AppModelUnlock -Name AllowDevelopmentWithoutDevLicense -PropertyType DWord -Value 1 -Force\r\n<\/code><\/pre>\n<p>\u542f\u7528 Windows Subsystem for Linux\uff08\u6d4b\u8bd5\u7248\uff09\uff0c\u5e76\u4f7f\u7528 Y \u91cd\u65b0\u542f\u52a8\u64cd\u4f5c\u7cfb\u7edf\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux\r\n\u3053\u306e\u64cd\u4f5c\u3092\u5b8c\u4e86\u3059\u308b\u305f\u3081\u306b\u3001\u4eca\u3059\u3050\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u304b?\r\n[Y] Yes  [N] No  [?] \u30d8\u30eb\u30d7 (\u65e2\u5b9a\u5024\u306f \"Y\"): Y\r\n<\/code><\/pre>\n<p>\u5728\u64cd\u4f5c\u7cfb\u7edf\u91cd\u65b0\u542f\u52a8\u540e\uff0c\u6309\u4e0b[Windows]\u952e + [X]\u952e\uff0c\u7136\u540e\u6253\u5f00[Windows PowerShell]\uff0c\u5f00\u59cb\u8fdb\u884cBoW\u7684\u5b89\u88c5\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; bash\r\n<\/code><\/pre>\n<p>\u7ee7\u7eed\u8fdb\u884c\u3002<\/p>\n<pre class=\"post-pre\"><code>-- \u30d9\u30fc\u30bf\u6a5f\u80fd --\r\n\u3053\u308c\u306b\u3088\u308a Windows \u306b Ubuntu \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002Ubuntu \u306f Canonical \u306b\u3088\u3063\u3066\u914d\u5e03\u3055\u308c\u308b\u88fd\u54c1\u3067\u3042\u308a\u3001\r\n\u6b21\u306e\u30b5\u30a4\u30c8\u306b\u793a\u3055\u308c\u308b\u6761\u4ef6\u306b\u57fa\u3065\u3044\u3066\u30e9\u30a4\u30bb\u30f3\u30b9\u3055\u308c\u3066\u3044\u307e\u3059\u3002\r\nhttps:\/\/aka.ms\/uowterms\r\n\r\n\u7d9a\u884c\u3059\u308b\u306b\u306f\u3001\"y\" \u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: y\r\n<\/code><\/pre>\n<p>\u6211\u5011\u9700\u8981\u7b49\u5f85\u5e7e\u5206\u9418\uff0c\u76f4\u5230\u8655\u7406\u5b8c\u6210\u3002<\/p>\n<pre class=\"post-pre\"><code>Windows \u30b9\u30c8\u30a2\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u3059... 100%\r\n\u30d5\u30a1\u30a4\u30eb \u30b7\u30b9\u30c6\u30e0\u3092\u5c55\u958b\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u51e6\u7406\u306b\u306f\u6570\u5206\u304b\u304b\u308a\u307e\u3059...\r\n<\/code><\/pre>\n<p>\u4ee5 y \u4f5c\u4e3a\u6761\u4ef6\u7ee7\u7eed\u6267\u884c\uff0c\u5e76\u5c06\u8bed\u8a00\u73af\u5883\u8bbe\u7f6e\u4e3a ja-JP\u3002<\/p>\n<pre class=\"post-pre\"><code>Ubuntu \u306e\u30ed\u30b1\u30fc\u30eb\u3092 Windows \u306e\u30ed\u30b1\u30fc\u30eb (ja-JP) \u3068\u4e00\u81f4\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u304b?\r\n\u65e2\u5b9a\u306e\u30ed\u30b1\u30fc\u30eb\u306f en_US \u3067\u3059\u3002\r\n\u7d9a\u884c\u3059\u308b\u306b\u306f\u3001\"y\" \u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: y\r\n<\/code><\/pre>\n<p>\u8f38\u5165BoW\u5e33\u865f\u548c\u5bc6\u78bc\u3002<\/p>\n<pre class=\"post-pre\"><code>\u65e2\u5b9a\u306e UNIX \u30e6\u30fc\u30b6\u30fc \u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30e6\u30fc\u30b6\u30fc\u540d\u306f\u3001Windows \u306e\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u4e00\u81f4\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\r\n\u8a73\u7d30: https:\/\/aka.ms\/wslusers \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\r\n\u65b0\u3057\u3044 UNIX \u30e6\u30fc\u30b6\u30fc\u540d\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: bowuser\r\n\u65b0\u3057\u3044 UNIX \u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: (\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b)\r\n\u65b0\u3057\u3044 UNIX \u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u518d\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: (\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u518d\u5165\u529b)\r\n<\/code><\/pre>\n<p>\u5f53\u5b89\u88c5\u5b8c\u6210\u5e76\u542f\u52a8 Bash \u540e\uff0c\u63d0\u793a\u7b26\u5c06\u53d8\u4e3a $\u3002<\/p>\n<pre class=\"post-pre\"><code>passwd: password updated successfully\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u6b63\u5e38\u306b\u7d42\u4e86\u3057\u307e\u3057\u305f\r\n\u74b0\u5883\u304c\u9593\u3082\u306a\u304f\u958b\u59cb\u3055\u308c\u307e\u3059...\r\n\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3067\u304d\u308b\u5834\u6240: https:\/\/aka.ms\/wsldocs\r\nTo run a command as administrator (user \"root\"), use \"sudo &lt;command&gt;\".\r\nSee \"man sudo_root\" for details.\r\n\r\nbowuser@win10cu:\/mnt\/c\/Users\/winuser$\r\n<\/code><\/pre>\n<h3>\u888b\u88c5\u5438\u5c18\u5668\u7684\u521d\u59cb\u8bbe\u7f6e<\/h3>\n<p>\u5c06Ubuntu\u8fdb\u884c\u65e5\u672c\u8bedRemix\uff0c\u5c06\u5b58\u50a8\u5e93\u7684URL\u66f4\u6539\u4e3ajp\u3002\uff08\u53ef\u4ee5\u6839\u636e\u4e2a\u4eba\u559c\u597d\u9009\u62e9\u5176\u4ed6\u9009\u9879\uff09<\/p>\n<pre class=\"post-pre\"><code>$ sudo sed -i -e 's\/archive\/jp.archive\/g' \/etc\/apt\/sources.list\r\n<\/code><\/pre>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cumask\u662f0000\uff0c\u6240\u4ee5\u5c06\u5176\u66f4\u6539\u4e3a0022\u3002<\/p>\n<pre class=\"post-pre\"><code>$ echo 'umask 022' &gt;&gt; ~\/.bashrc\r\n$ source ~\/.bashrc\r\n<\/code><\/pre>\n<p>Creators Update \u53ef\u4ee5\u5f9e BoW \u555f\u52d5 Windows \u5074\u7684\u61c9\u7528\u7a0b\u5f0f\uff0c\u4f46\u7531\u65bc\u5c07 Windows \u5074\u7684 PATH (\/mnt\/c\/&#8230;) \u50b3\u905e\u7d66 BoW \u53ef\u80fd\u6703\u7522\u751f\u4e00\u4e9b\u554f\u984c\uff0c\u56e0\u6b64\u5728BoW\u7aef\u5c07 \/mnt\/c\/&#8230; \u7684PATH\u6392\u9664\u3002<\/p>\n<pre class=\"post-pre\"><code>$ echo 'export PATH=\"\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin:\/usr\/games:\/usr\/local\/games\"' &gt;&gt; ~\/.bashrc\r\n$ source ~\/.bashrc\r\n<\/code><\/pre>\n<p>\u5982\u679c\u60a8\u4f7f\u7528 Visual Studio Code \u7684\u96c6\u6210\u7ec8\u7aef\uff0c\u5982\u4e0b\u6240\u8ff0\u7684\u6545\u969c\u6392\u9664\u6b65\u9aa4\uff0c\u65e5\u8bed\u8f93\u51fa\u53ef\u80fd\u4f1a\u51fa\u73b0\u504f\u5dee\uff0c\u5bfc\u81f4\u6df7\u4e71\u72b6\u6001\uff0c\u56e0\u6b64\u5efa\u8bae\u5c06\u533a\u57df\u8bbe\u7f6e\u66f4\u6539\u4e3a\u82f1\u8bed\u3002(\u5728 PowerShell \u6216 BoW \u7684\u63a7\u5236\u53f0\u4e0a\uff0c\u5e94\u8be5\u53ef\u4ee5\u987a\u5229\u4f7f\u7528\u65e5\u8bed\u3002)<\/p>\n<pre class=\"post-pre\"><code>$ sudo update-locale LANG=en_US.UTF-8\r\n$ source \/etc\/default\/locale\r\n<\/code><\/pre>\n<h3>\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u4f5c\u4e1a\u7684\u76ee\u5f55<\/h3>\n<p>\u6b63\u5982\u5fae\u8f6f\u7684\u4eba\u5458\u6240\u8b66\u544a\u7684\u90a3\u6837\uff0c\u5982\u679c\u5728Windows\u4e2d\u521b\u5efa\/\u7f16\u8f91\u4f4d\u4e8eBoW\u6587\u4ef6\u7cfb\u7edf\uff08%localappdata%\\lxss\uff09\u4e0b\u7684\u6587\u4ef6\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6587\u4ef6\u635f\u574f\u7684\u98ce\u9669\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u7684\u6587\u4ef6\u7cfb\u7edf\u4e0b\u521b\u5efa\u4e00\u4e2a\u5de5\u4f5c\u76ee\u5f55\uff08C:\\workspace\uff09\uff0c\u7136\u540e\u521b\u5efa\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff0c\u4ee5\u4fbf\u66f4\u65b9\u4fbf\u5730\u5904\u7406BoW\u3002<\/p>\n<pre class=\"post-pre\"><code>$ mkdir \/mnt\/c\/workspace\r\n$ ln -s \/mnt\/c\/workspace ~\/workspace\r\n<\/code><\/pre>\n<h2>Ruby \u7684\u5b89\u88c5<\/h2>\n<p>\u5c06\u5305\u88c5\u66f4\u65b0\u3002<\/p>\n<pre class=\"post-pre\"><code>$ sudo apt-get update\r\n$ sudo apt-get upgrade\r\n<\/code><\/pre>\n<p>\u5b89\u88c5\u6240\u9700\u7684\u8f6f\u4ef6\u5305\u3002<\/p>\n<pre class=\"post-pre\"><code>$ sudo apt-get install git nodejs build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxslt-dev libcurl4-openssl-dev libffi-dev sqlite3 libsqlite3-dev\r\n<\/code><\/pre>\n<p>\u5b89\u88c5 rbenv\u3002<\/p>\n<pre class=\"post-pre\"><code>$ git clone https:\/\/github.com\/rbenv\/rbenv.git ~\/.rbenv\r\n$ echo 'export PATH=\"$HOME\/.rbenv\/bin:$PATH\"' &gt;&gt; ~\/.bashrc\r\n$ echo 'eval \"$(rbenv init -)\"' &gt;&gt; ~\/.bashrc\r\n$ source ~\/.bashrc\r\n<\/code><\/pre>\n<p>\u5b89\u88c5 ruby-build\u3002<\/p>\n<pre class=\"post-pre\"><code>$ git clone https:\/\/github.com\/rbenv\/ruby-build.git ~\/.rbenv\/plugins\/ruby-build\r\n$ echo 'export PATH=\"$HOME\/.rbenv\/plugins\/ruby-build\/bin:$PATH\"' &gt;&gt; ~\/.bashrc\r\n$ source ~\/.bashrc\r\n<\/code><\/pre>\n<p>\u5b89\u88c5Ruby\u3002\u7b49\u5f85rbenv\u5b89\u88c5\u5b8c\u6210\u5927\u7ea615\u5206\u949f\u7684\u65f6\u95f4\u3002(\u4f8b\u5982\uff0cRuby 2.3.0)<\/p>\n<pre class=\"post-pre\"><code>$ rbenv install 2.3.0\r\n$ rbenv global 2.3.0\r\n$ ruby -v\r\nruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]\r\n<\/code><\/pre>\n<p>\u6392\u9664\u6587\u4ef6\u5e76\u5b89\u88c5Bundler\u3002<\/p>\n<pre class=\"post-pre\"><code>$ echo 'gem: --no-document' &gt;&gt; ~\/.gemrc\r\n$ gem install bundler\r\n<\/code><\/pre>\n<h2>\u8fdb\u884c PostgreSQL \u7684\u5b89\u88c5<\/h2>\n<p>\u5728BoW\u4e2d\uff0c\u53ea\u9700\u5b89\u88c5PostgreSQL\u5ba2\u6237\u7aef\uff0c\u5e76\u5c06\u5176\u4f5c\u4e3aPostgreSQL\u670d\u52a1\u5668\u76f4\u63a5\u5b89\u88c5\u5728Windows\u672c\u5730\u4e0a\u3002<\/p>\n<h3>\u5b89\u88c5PostgreSQL\u5ba2\u6237\u7aef<\/h3>\n<p>\u5b89\u88c5PostgreSQL\u5ba2\u6237\u7aef\u3002\uff08\u4ee5postgresql-client-9.5\u4e3a\u4f8b\uff09<\/p>\n<pre class=\"post-pre\"><code>$ sudo sh -c 'echo \"deb http:\/\/apt.postgresql.org\/pub\/repos\/apt\/ $(lsb_release -cs)-pgdg main\" &gt; \/etc\/apt\/sources.list.d\/pgdg.list'\r\n$ wget --quiet -O - https:\/\/www.postgresql.org\/media\/keys\/ACCC4CF8.asc | sudo apt-key add -\r\n$ sudo apt-get update\r\n$ sudo apt-get install postgresql-client-9.5 libpq-dev\r\n<\/code><\/pre>\n<h3>\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u5b89\u88c5PostgreSQL\u3002<\/h3>\n<p>\u7ed3\u675f BoW \uff0c\u7136\u540e\u8fd4\u56de\u5230 PowerShell \uff0c\u5e76\u4e0b\u8f7d PostgreSQL for Windows\uff08\u4f8b\u5982 postgresql-9.5.6-2\uff09\u3002<\/p>\n<pre class=\"post-pre\"><code>$ exit\r\n&gt; Start-BitsTransfer -Source http:\/\/get.enterprisedb.com\/postgresql\/postgresql-9.5.6-2-windows-x64.exe -Destination C:\\workspace\\postgresql-9.5.6-2-windows-x64.exe\r\n<\/code><\/pre>\n<p>\u4ee5\u6307\u5b9a\u7684\u5bc6\u7801\u548c\u672c\u5730\u8bed\u8a00\u73af\u5883\u5b89\u88c5PostgreSQL\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; C:\\workspace\\postgresql-9.5.6-2-windows-x64.exe --mode unattended --superpassword &lt;postgres \u30e6\u30fc\u30b6\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9&gt; --locale C\r\n<\/code><\/pre>\n<p>\u5f53\u8bbe\u7f6e\u8fdb\u5ea6\u6761\u5b8c\u6210\u540e\uff0c\u8fd4\u56de\u5230 BoW\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; bash\r\n<\/code><\/pre>\n<h3>PostgreSQL\u7684\u521d\u59cb\u8bbe\u7f6e<\/h3>\n<p>\u5982\u679c\u4ee5postgres\u7528\u6237\u8fdb\u884c\u8fde\u63a5\u6d4b\u8bd5\u6ca1\u6709\u95ee\u9898\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u00a5q\u9000\u51fa\u3002<\/p>\n<pre class=\"post-pre\"><code>$ psql -h localhost -U postgres\r\nPassword for user postgres: (postgres \u30e6\u30fc\u30b6\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b)\r\npsql (9.5.6)\r\nType \"help\" for help.\r\n\r\npostgres=# \\q\r\n<\/code><\/pre>\n<p>\u9ed8\u8ba4\u8bbe\u7f6e\u8fde\u63a5\u7684\u4e3b\u673a\u540d\u4e3alocalhost\u3002<\/p>\n<pre class=\"post-pre\"><code>$ echo 'export PGHOST=localhost' &gt;&gt; ~\/.bashrc\r\n$ source ~\/.bashrc\r\n<\/code><\/pre>\n<p>\u7528\u4e0eBoW\u540c\u540d\u7684\u7528\u6237\u521b\u5efa\u8d85\u7ea7\u7528\u6237\u3002<\/p>\n<pre class=\"post-pre\"><code>$ createuser $(whoami) -s -U postgres\r\nPassword: (postgres \u30e6\u30fc\u30b6\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b)\r\n<\/code><\/pre>\n<p>\u5c07\u9a57\u8b49\u65b9\u6cd5\u5f9emd5\u66f4\u6539\u70batrust\u3002<\/p>\n<pre class=\"post-pre\"><code>$ sed -i -e '\/^host\/s\/md5\/trust\/g' \/mnt\/c\/Program\\ Files\/PostgreSQL\/9.5\/data\/pg_hba.conf\r\n<\/code><\/pre>\n<h2>\u5b89\u88c5Rails<\/h2>\n<p>\u5b89\u88c5Rails\u5e76\u521b\u5efa\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<h3>\u5b89\u88c5Rails<\/h3>\n<p>\u6211\u4f1a\u5b89\u88c5Rails\u3002\u8bf7\u7b49\u5f85\u51e0\u5206\u949f\u76f4\u5230\u5b89\u88c5\u5b8c\u6210\u3002(\u4ee5Rails 4.2.3\u4e3a\u4f8b)<\/p>\n<pre class=\"post-pre\"><code>$ cd ~\/workspace\r\n$ gem install rails -v 4.2.3\r\n<\/code><\/pre>\n<h3>\u521b\u5efa\u5e94\u7528\u7a0b\u5e8f<\/h3>\n<p>\u5728\u6570\u636e\u5e93\u4e2d\u6307\u5b9a\u4f7f\u7528PostgreSQL\uff0c\u521b\u5efa\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u3002\uff08\u793a\u4f8b\u4e2d\u7684\u5e94\u7528\u7a0b\u5e8f\u540d\u4e3abowapp\uff09<\/p>\n<pre class=\"post-pre\"><code>$ rails _4.2.3_ new bowapp -d postgresql\r\n<\/code><\/pre>\n<p>\u5207\u6362\u5230\u521b\u5efa\u7684\u5e94\u7528\u7a0b\u5e8f\u7684\u76ee\u5f55\u3002<\/p>\n<pre class=\"post-pre\"><code>$ cd bowapp\r\n<\/code><\/pre>\n<p>\u4e0b\u9762\u662f\u4f7f\u7528\u811a\u624b\u67b6\u7684\u793a\u4f8b\u3002<\/p>\n<pre class=\"post-pre\"><code>$ rails generate scaffold surfboard model:string shaper:string company:string\r\n$ rake db:create db:migrate\r\n<\/code><\/pre>\n<h3>\u786e\u8ba4\u884c\u52a8<\/h3>\n<p>\u521b\u5efa\u5b8c\u8868\u540e\uff0c\u68c0\u67e5 URI \u5e76\u542f\u52a8 rails \u670d\u52a1\u5668\u3002<\/p>\n<pre class=\"post-pre\"><code>$ rake routes\r\n        Prefix Verb   URI Pattern                    Controller#Action\r\n    surfboards GET    \/surfboards(.:format)          surfboards#index\r\n               POST   \/surfboards(.:format)          surfboards#create\r\n new_surfboard GET    \/surfboards\/new(.:format)      surfboards#new\r\nedit_surfboard GET    \/surfboards\/:id\/edit(.:format) surfboards#edit\r\n     surfboard GET    \/surfboards\/:id(.:format)      surfboards#show\r\n               PATCH  \/surfboards\/:id(.:format)      surfboards#update\r\n               PUT    \/surfboards\/:id(.:format)      surfboards#update\r\n               DELETE \/surfboards\/:id(.:format)      surfboards#destroy\r\n$ rails s\r\n=&gt; Booting WEBrick\r\n=&gt; Rails 4.2.3 application starting in development on http:\/\/localhost:3000\r\n=&gt; Run `rails server -h` for more startup options\r\n=&gt; Ctrl-C to shutdown server\r\n[2017-04-09 22:08:17] INFO  WEBrick 1.3.1\r\n[2017-04-09 22:08:17] INFO  ruby 2.3.0 (2015-12-25) [x86_64-linux]\r\n[2017-04-09 22:08:17] INFO  WEBrick::HTTPServer#start: pid=1022 port=3000\r\n<\/code><\/pre>\n<p>\u6211\u4f1a\u4eceWindows\u4e0a\u7684\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee\u5e76\u8fdb\u884c\u64cd\u4f5c\u786e\u8ba4\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d4b2137434c4406cb6435\/100-0.jpeg\" alt=\"access_index.jpg\" \/><\/div>\n<p>\u968f\u610f\u5730\u6dfb\u52a0\u6570\u636e\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d4b2137434c4406cb6435\/102-0.jpeg\" alt=\"create_record.jpg\" \/><\/div>\n<p>\u901a\u8fc7\u6309\u4e0b [Ctrl] \u952e + [C] \u952e\u6765\u7ec8\u6b62 rails server\uff0c\u5e76\u901a\u8fc7 rails console \u6765\u67e5\u770b\u8868\u683c\u6570\u636e\u3002<\/p>\n<pre class=\"post-pre\"><code>$ rails c\r\nRunning via Spring preloader in process 330\r\nLoading development environment (Rails 4.2.3)\r\nirb(main):001:0&gt; Surfboard.all\r\n  Surfboard Load (1.2ms)  SELECT \"surfboards\".* FROM \"surfboards\"\r\n=&gt; #&lt;ActiveRecord::Relation [#&lt;Surfboard id: 1, model: \"Sci-Fi\", shaper: \"\u30c0\u30cb\u30a8\u30eb\u30fb\u30c8\u30e0\u30bd\u30f3\", company: \"Firewire Surfboards\", created_at: \"2017-04-09 13:24:41\", updated_at: \"2017-04-09 13:24:41\"&gt;]&gt;\r\n<\/code><\/pre>\n<p>\u6b64\u5916\uff0c\u60a8\u8fd8\u53ef\u4ee5\u901a\u8fc7PostgreSQL for Windows\u7684\u7ba1\u7406\u63a7\u5236\u53f0\u6765\u67e5\u770b\u8868\u6570\u636e\u3002<\/p>\n<p>[Windows] \u952e &gt; \u641c\u7d22 pgadmin &gt; \u542f\u52a8 [pgAdmin III]\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d4b2137434c4406cb6435\/107-0.jpeg\" alt=\"launch_pgadmin.jpg\" \/><\/div>\n<p>\u5728\u672c\u5730\u4e3b\u673a5432\u4e0a\uff0c\u4ee5\u53f3\u952e\u70b9\u51fbPostgreSQL 9.5\uff0c\u6253\u5f00\u8fde\u63a5\uff0c\u8f93\u5165postgres\u7528\u6237\u7684\u5bc6\u7801\uff0c\u70b9\u51fb\u786e\u5b9a\u8fde\u63a5\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d4b2137434c4406cb6435\/109-0.jpeg\" alt=\"connect_postgresql.jpg\" \/><\/div>\n<p>\u901a\u8fc7\u4ee5\u4e0b\u987a\u5e8f\u6253\u5f00\uff1a[PostgreSQL 9.5\uff08localhost:5432\uff09] &gt; [\u6570\u636e\u5e93] &gt; [&lt;\u5e94\u7528\u7a0b\u5e8f\u540d\u79f0&gt;_development] &gt; [\u6a21\u5f0f] &gt; [public] &gt; [\u8868] &gt; [&lt;\u8868\u540d\u79f0&gt;]\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d4b2137434c4406cb6435\/111-0.jpeg\" alt=\"view_table.jpg\" \/><\/div>\n<p>\u5f53\u4f60\u53f3\u952e\u70b9\u51fb [&lt;\u8868\u540d&gt;] &gt; [\u6570\u636e\u89c6\u56fe] &gt; [\u663e\u793a\u524d100\u884c]\uff0c\u4f60\u53ef\u4ee5\u6253\u5f00\u5e76\u786e\u8ba4\u6216\u7f16\u8f91\u4fdd\u5b58\u7684\u6570\u636e\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d4b2137434c4406cb6435\/113-0.jpeg\" alt=\"view_record.jpg\" \/><\/div>\n<h2>\u6545\u969c\u6392\u9664 (Guzhang paichu)<\/h2>\n<h3>\u5728\u6267\u884cgem\u6216\u8005Rails\u65f6\uff0c\u4f1a\u8f93\u51fa\u8b66\u544a\u4fe1\u606f\u3002<\/h3>\n<p>\u5728\u8fd0\u884cgem\u6216rails\u65f6\uff0c\u4f1a\u8f93\u51fa\u8b66\u544a\u4fe1\u606f\uff1a\u8b66\u544a\uff1a\u8def\u5f84\u4e2d\u5b58\u5728\u4e0d\u5b89\u5168\u7684\u53ef\u5199\u76ee\u5f55\/mnt\/c\uff0c\u6a21\u5f0f\u4e3a040777\u3002<\/p>\n<pre class=\"post-pre\"><code>$ gem install bundler\r\nFetching: bundler-1.14.6.gem (100%)\r\n\/home\/bowuser\/.rbenv\/rbenv.d\/exec\/gem-rehash\/rubygems_plugin.rb:6: warning: Insecure world writable dir \/mnt\/c in PATH, mode 040777\r\nSuccessfully installed bundler-1.14.6\r\n1 gem installed\r\n<\/code><\/pre>\n<p>\u5c3d\u7ba1 Anniversary Update \u4e5f\u51fa\u73b0\u4e86\u7c7b\u4f3c\u7684\u8b66\u544a\uff0c\u4e0d\u8fc7\u5b83\u4eec\u662f\u5173\u4e8e\u8def\u5f84\uff08BoW\u5185\uff09\/home\/&lt;\u7528\u6237\u540d&gt;\/.rbenv\/versions\u7684\u6743\u9650\u7684\u8b66\u544a\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u901a\u8fc7\u4f7f\u7528chmod\u547d\u4ee4\u6765\u4fee\u6539\u8be5\u8def\u5f84\u7684\u6743\u9650\u6765\u89e3\u51b3\u4e86\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n<p>\u7136\u800c\uff0c\u5728\u8fd9\u6b21\u4e2d\uff0c\u8b66\u544a\u4e0e\/mnt\/c\u8def\u5f84\uff08BoW\u4e4b\u5916\uff09\u7684\u6743\u9650\u6709\u5173\uff0c\u5728BoW\u7684\u9650\u5236\u4e0b\uff0c\u4f3c\u4e4e\u65e0\u6cd5\u66f4\u6539BoW\u4e4b\u5916\u8def\u5f84\u7684\u6743\u9650\u3002<\/p>\n<p>\u8fdb\u4e00\u6b65\u8c03\u67e5\u53d1\u73b0\uff0c\u5173\u4e8e \/mnt\/c \u7684\u6743\u9650\u8b66\u544a\u7684\u8f93\u51fa\u662f\u7531\u4e8e Creators Update \u7684 BoW \u5c06 Windows \u4fa7\u7684 PATH (\/mnt\/c\/&#8230;) \u4f20\u9012\u7ed9 BoW \u5bfc\u81f4\u7684\u3002\u56e0\u6b64\uff0c\u5982\u679c\u6ca1\u6709\u4f7f\u7528 BoW \u6765\u9891\u7e41\u4f7f\u7528 Windows \u5e94\u7528\u7a0b\u5e8f\u7684\u8981\u6c42\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ece BoW \u7684 PATH \u4e2d\u6392\u9664 \/mnt\/c\/&#8230; \u6765\u89e3\u51b3\u8be5\u95ee\u9898\u3002<\/p>\n<pre class=\"post-pre\"><code>$ vi ~\/.bashrc\r\n\r\n...\r\n\r\numask 022\r\nexport PATH=\"\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin:\/usr\/games:\/usr\/local\/games\"   &lt;&lt;&lt; rbenv \u306e\u8a2d\u5b9a\u306e\u4e0a\u306b\u8ffd\u8a18\r\nexport PATH=\"$HOME\/.rbenv\/bin:$PATH\"\r\neval \"$(rbenv init -)\"\r\nexport PATH=\"$HOME\/.rbenv\/plugins\/ruby-build\/bin:$PATH\"\r\nexport PGHOST=localhost\r\n<\/code><\/pre>\n<h3>Visual Studio Code \u7684\u7ec8\u7aef\u96c6\u6210\u4e2d\uff0c\u65e5\u8bed\u8f93\u51fa\u51fa\u73b0\u504f\u79fb\u7684\u95ee\u9898\u5c1a\u672a\u89e3\u51b3\u3002<\/h3>\n<p>\u6211\u5011\u539f\u672c\u4ee5\u70ba\u5728 Creators Update \u7684\u57fa\u790e\u4e0a\uff0c\u61c9\u8a72\u5c0d\u65e5\u8a9e\u9032\u884c\u4e86\u6539\u9032\uff0c\u4f46\u662f\u5982\u679c\u4f7f\u7528 Visual Studio Code \u7684\u6574\u5408\u7d42\u7aef\u6a5f\uff0c\u65e5\u8a9e\u7684\u8f38\u51fa\u53cd\u800c\u8b8a\u5f97\u66f4\u5dee\u4e86&#8230;<\/p>\n<p>\u4ee5\u4e0b\u662fls -la\u5728\u65e5\u8bed\u8bed\u8a00\u73af\u5883\u4e0b\u7684\u8f93\u51fa\u793a\u4f8b\uff0c\u4f46\u662f\u6bcf\u4e00\u884c\u5185\u5bb9\u90fd\u9010\u6e10\u5411\u4e0b\u504f\u79fb\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d4b2137434c4406cb6435\/125-0.jpeg\" alt=\"ls_ja.jpg\" \/><\/div>\n<p>\u5728\u5468\u5e74\u66f4\u65b0\u4e2d\u5e76\u6ca1\u6709\u9047\u5230\u8fd9\u6837\u7684\u95ee\u9898\uff0c\u4f46\u662f\u6211\u60f3\u8d77\u4e86\u4e4b\u524d\u5c06\u8bed\u8a00\u8bbe\u7f6e\u4e3a\u82f1\u8bed\u7684\u4e8b\u60c5\uff0c\u6240\u4ee5\u8fd9\u6b21\u6211\u4e5f\u5c1d\u8bd5\u5c06\u8bed\u8a00\u8bbe\u7f6e\u4e3a\u82f1\u8bed\u3002<\/p>\n<pre class=\"post-pre\"><code>$ sudo update-locale LANG=en_US.UTF-8\r\n$ source \/etc\/default\/locale\r\n<\/code><\/pre>\n<p>\u66f4\u6539\u533a\u57df\u8bbe\u7f6e\u540e\uff0c\u518d\u6b21\u786e\u8ba4 ls -la \u7684\u8f93\u51fa\u7ed3\u679c\uff0c\u6b64\u65f6\u5df2\u7ecf\u6b63\u5e38\u663e\u793a\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d4b2137434c4406cb6435\/129-0.jpeg\" alt=\"ls_en.jpg\" \/><\/div>\n<p>\u6211\u539f\u672c\u4ee5\u4e3a\u8fd9\u6837\u5c31\u89e3\u51b3\u4e86\uff0c\u4f46\u5b9e\u9645\u4e0a\uff0c\u4e0e\u5730\u57df\u8bbe\u7f6e\u5e76\u6ca1\u6709\u76f4\u63a5\u5173\u7cfb\uff0c\u53d1\u73b0\u8f93\u51fa\u7ed3\u679c\u4e2d\u5305\u542b\u65e5\u8bed\u65f6\u4f1a\u51fa\u73b0\u9519\u4f4d\u3002\u5728\u5730\u533a\u8bbe\u7f6e\u4e3a\u82f1\u8bed\u7684\u60c5\u51b5\u4e0b\uff0c\u6267\u884c echo \u3042 \uff0c\u4e0e\u6700\u521d\u7684\u95ee\u9898\u4e00\u6837\uff0c\u6bcf\u4e00\u884c\u90fd\u4f1a\u9010\u6e10\u9519\u4f4d&#8230;<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d4b2137434c4406cb6435\/131-0.jpeg\" alt=\"ls_en_echo.jpg\" \/><\/div>\n<p>\u9019\u6b21\u7684\u66f4\u65b0\u4e2d\uff0c\u6211\u5c0dVisual Studio Code\u7684\u6574\u5408\u7d42\u7aef\u6a5f\u7684\u4f7f\u7528\u4fbf\u5229\u6027\u548c\u6548\u80fd\u975e\u5e38\u6eff\u610f\uff0c\u6240\u4ee5\u5f9eAtom\u8f49\u4f86\u4f7f\u7528\uff0c\u4f46\u5982\u679c\u627e\u4e0d\u5230\u89e3\u6c7a\u8fa6\u6cd5\u7684\u8a71\uff0c\u6211\u53ef\u80fd\u6703\u5c07\u7d42\u7aef\u6a5f\u653e\u5728\u53e6\u4e00\u500b\u8996\u7a97\u88e1\uff08\u4f8b\u5982PowerShell\u6216BoW\u7684\u63a7\u5236\u53f0\uff09\uff0c\u6216\u8005\u6bcf\u6b21\u51fa\u73fe\u65e5\u8a9e\u8f38\u51fa\u932f\u4f4d\u6642\u90fd\u8981\u57f7\u884cclear\u547d\u4ee4&#8230;\u3002\u6211\u66ab\u6642\u6703\u518d\u89c0\u5bdf\u4e00\u4e0b&#8230;\u3002\u8aaa\u771f\u7684\uff0c\u5728\u69cb\u5efa\u7684\u6700\u5f8c\u968e\u6bb5\u624d\u767c\u73fe\u9019\u500b\u554f\u984c\uff0c\u8b93\u6211\u89ba\u5f97\u6709\u4e9b\u529b\u4e0d\u5f9e\u5fc3\u3002<\/p>\n<h3>\u7531\u4e8e\u592a\u591a\u7684\u8bd5\u9519\uff0c\u6240\u4ee5\u60f3\u8981\u521d\u59cb\u5316\u73af\u5883\u3002<\/h3>\n<p>\u5728\u5378\u8f7d BoW \u548c PostgreSQL for Windows \u4e4b\u524d\uff0c\u8bf7\u5148\u5173\u95ed PowerShell\u3001BoW \u548c PostgreSQL \u7684\u63a7\u5236\u53f0\uff0c\u5982\u679c\u5de5\u4f5c\u76ee\u5f55\u4e0d\u518d\u9700\u8981\uff0c\u5219\u5220\u9664\u5b83\u3002<\/p>\n<p>\u6309\u4e0b[Windows]\u952e + [X]\u952e &gt; \u6253\u5f00[Windows PowerShell (\u7ba1\u7406\u5458)]\uff0c\u7136\u540e\u5378\u8f7dBoW\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; lxrun \/uninstall \/full \/y\r\n<\/code><\/pre>\n<p>\u7136\u540e\uff0c\u60a8\u9700\u8981\u5378\u8f7dWindows\u4e0a\u7684PostgreSQL\u3002\u5982\u679c\u51fa\u73b0\u5f39\u7a97\uff0c\u8bf7\u70b9\u51fb[\u662f]\u6216[\u786e\u5b9a]\u7ee7\u7eed\u8fdb\u884c\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; C:\\Program` Files\\PostgreSQL\\9.5\\uninstall-postgresql.exe\r\n<\/code><\/pre>\n<p>\u5728\u5378\u8f7d\u5b8c\u6210\u4e4b\u540e\uff0c\u5220\u9664 C:\\Program Files\\PostgreSQL\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; Remove-Item -Path 'C:\\Program Files\\PostgreSQL' -Recurse -Force\r\n<\/code><\/pre>\n<p>\u5982\u679c\u4e0d\u9700\u8981\u4f5c\u4e1a\u76ee\u5f55\uff0c\u4e5f\u4f1a\u5c06\u5176\u5220\u9664\u3002<\/p>\n<pre class=\"post-pre\"><code>&gt; Remove-Item -Path C:\\workspace -Recurse -Force\r\n<\/code><\/pre>\n<h2>\u8bf7\u53c2\u8003<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Bash on Ubuntu on Windows \u3067 Rails\/PostgreSQL \u306e\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b [Anniversary Update \u7de8]<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Bash on Ubuntu on Windows &#8211; Installation Guide<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">install postgresql issue \u00b7 Issue #61 \u00b7 Microsoft\/BashOnWindows<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">How to run sshd as a windows service ? \u00b7 Issue #612 \u00b7 Microsoft\/BashOnWindows<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Do not change Linux files using Windows apps and tools<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">chmod doesn&#8217;t work? \u00b7 Issue #81 \u00b7 Microsoft\/BashOnWindows<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Bash on Ubuntu on Windows + VcXsrv + RubyMine \u3067Windows\u3067\u3082\u5feb\u9069\u306aRails\u958b\u767a\u74b0\u5883\u3092\u4f5c\u308d\u3046<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u4ece2016\u5e74\u5e95\u4f7f\u7528Bash on Ubuntu on Windows\u5728Windows\u4e0a\u642d\u5efa\u4e86Rails\/Po [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-42180","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728Windows\u4e0a\u4f7f\u7528Bash\u7684Ubuntu\u73af\u5883\u6765\u6784\u5efaRails\/PostgreSQL\u5f00\u53d1\u73af\u5883[\u521b\u4f5c\u8005\u66f4\u65b0\u6559\u7a0b] - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728windows\u4e0a\u4f7f\u7528bash\u7684ubuntu\u73af\u5883\u6765\u6784\u5efarails-postgresql\u5f00\u53d1\u73af\u5883\u521b\u4f5c\u8005\u66f4\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728Windows\u4e0a\u4f7f\u7528Bash\u7684Ubuntu\u73af\u5883\u6765\u6784\u5efaRails\/PostgreSQL\u5f00\u53d1\u73af\u5883[\u521b\u4f5c\u8005\u66f4\u65b0\u6559\u7a0b]\" \/>\n<meta property=\"og:description\" content=\"\u81ea\u4ece2016\u5e74\u5e95\u4f7f\u7528Bash on Ubuntu on Windows\u5728Windows\u4e0a\u642d\u5efa\u4e86Rails\/Po [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728windows\u4e0a\u4f7f\u7528bash\u7684ubuntu\u73af\u5883\u6765\u6784\u5efarails-postgresql\u5f00\u53d1\u73af\u5883\u521b\u4f5c\u8005\u66f4\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-04T17:20:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-29T11:45:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d4b2137434c4406cb6435\/100-0.jpeg\" \/>\n<meta name=\"author\" content=\"\u79d1, \u9896\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u79d1, \u9896\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4\/\",\"name\":\"\u5728Windows\u4e0a\u4f7f\u7528Bash\u7684Ubuntu\u73af\u5883\u6765\u6784\u5efaRails\/PostgreSQL\u5f00\u53d1\u73af\u5883[\u521b\u4f5c\u8005\u66f4\u65b0\u6559\u7a0b] - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-07-04T17:20:17+00:00\",\"dateModified\":\"2024-04-29T11:45:59+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728Windows\u4e0a\u4f7f\u7528Bash\u7684Ubuntu\u73af\u5883\u6765\u6784\u5efaRails\/PostgreSQL\u5f00\u53d1\u73af\u5883[\u521b\u4f5c\u8005\u66f4\u65b0\u6559\u7a0b]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e\",\"name\":\"\u79d1, \u9896\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u9896\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keying\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5728Windows\u4e0a\u4f7f\u7528Bash\u7684Ubuntu\u73af\u5883\u6765\u6784\u5efaRails\/PostgreSQL\u5f00\u53d1\u73af\u5883[\u521b\u4f5c\u8005\u66f4\u65b0\u6559\u7a0b] - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728windows\u4e0a\u4f7f\u7528bash\u7684ubuntu\u73af\u5883\u6765\u6784\u5efarails-postgresql\u5f00\u53d1\u73af\u5883\u521b\u4f5c\u8005\u66f4\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5728Windows\u4e0a\u4f7f\u7528Bash\u7684Ubuntu\u73af\u5883\u6765\u6784\u5efaRails\/PostgreSQL\u5f00\u53d1\u73af\u5883[\u521b\u4f5c\u8005\u66f4\u65b0\u6559\u7a0b]","og_description":"\u81ea\u4ece2016\u5e74\u5e95\u4f7f\u7528Bash on Ubuntu on Windows\u5728Windows\u4e0a\u642d\u5efa\u4e86Rails\/Po [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728windows\u4e0a\u4f7f\u7528bash\u7684ubuntu\u73af\u5883\u6765\u6784\u5efarails-postgresql\u5f00\u53d1\u73af\u5883\u521b\u4f5c\u8005\u66f4\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-07-04T17:20:17+00:00","article_modified_time":"2024-04-29T11:45:59+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d4b2137434c4406cb6435\/100-0.jpeg"}],"author":"\u79d1, \u9896","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u9896","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4\/","name":"\u5728Windows\u4e0a\u4f7f\u7528Bash\u7684Ubuntu\u73af\u5883\u6765\u6784\u5efaRails\/PostgreSQL\u5f00\u53d1\u73af\u5883[\u521b\u4f5c\u8005\u66f4\u65b0\u6559\u7a0b] - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-07-04T17:20:17+00:00","dateModified":"2024-04-29T11:45:59+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5728Windows\u4e0a\u4f7f\u7528Bash\u7684Ubuntu\u73af\u5883\u6765\u6784\u5efaRails\/PostgreSQL\u5f00\u53d1\u73af\u5883[\u521b\u4f5c\u8005\u66f4\u65b0\u6559\u7a0b]"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e","name":"\u79d1, \u9896","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g","caption":"\u79d1, \u9896"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keying\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8windows%e4%b8%8a%e4%bd%bf%e7%94%a8bash%e7%9a%84ubuntu%e7%8e%af%e5%a2%83%e6%9d%a5%e6%9e%84%e5%bb%barails-postgresql%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%88%9b%e4%bd%9c%e8%80%85%e6%9b%b4\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/42180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=42180"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/42180\/revisions"}],"predecessor-version":[{"id":87273,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/42180\/revisions\/87273"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=42180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=42180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=42180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}