{"id":28647,"date":"2023-02-11T09:13:37","date_gmt":"2022-08-24T00:05:44","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82\/"},"modified":"2025-08-12T09:20:43","modified_gmt":"2025-08-12T01:20:43","slug":"%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82\/","title":{"rendered":"\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4"},"content":{"rendered":"<h1>\u9996\u5148\u56e0\u4e3a\u5728AmazonLinux2\u4e0a\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u65f6\u9047\u5230\u4e86\u5404\u79cd\u9519\u8bef\uff0c\u6240\u4ee5\u6211\u628a\u5b83\u5199\u4e0b\u6765\u4f5c\u4e3a\u542f\u793a\u5f55\u3002<\/p>\n<h1>\u7ffb\u8bd1\uff1a\u73af\u5883\u64cd\u4f5c\u7cfb\u7edf\uff1aAmazonLinux2<br \/>\nRuby\u7248\u672c\uff1aruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]<br \/>\nRails\u7248\u672c\uff1aRails 5.0.0<br \/>\n\u6570\u636e\u5e93\uff1aMariadb<\/p>\n<h1>\u64cd\u4f5c\u6b65\u9aa4\u5047\u8bbe\u672c\u6b21\u5f00\u53d1\u9884\u8ba1\u5728AWS\uff08cloud9\uff09\u4e0a\u4f7f\u7528AmazonLinux2\u8fdb\u884c\u3002\u540c\u65f6\uff0c\u6211\u4eec\u5047\u8bbe\u5df2\u7ecf\u521b\u5efa\u4e86AWS\u7684\u73af\u5883\u3002<\/p>\n<h6>\u68c0\u67e5Ruby\u3001Rails\u7684\u7248\u672c\uff08\u7531\u4e8e\u5728AWS\u4e0a\u5df2\u8bbe\u7f6e\u4e86\u73af\u5883\uff09\u3002<\/p>\n<pre class=\"post-pre\"><code>$ ruby -v\r\nruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]\r\n\r\n$ rails -v\r\nRails 5.0.0\r\n<\/code><\/pre>\n<h6>\u5b89\u88c5Gem\uff08bundler\uff09\u6765\u7ba1\u7406Ruby\u7684Gem\u5e93\u3002<\/p>\n<pre class=\"post-pre\"><code>$ gem install bundler\r\nFetching bundler-2.1.4.gem\r\nSuccessfully installed bundler-2.1.4\r\nParsing documentation for bundler-2.1.4\r\nInstalling ri documentation for bundler-2.1.4\r\nDone installing documentation for bundler after 3 seconds\r\n1 gem installed\r\n<\/code><\/pre>\n<h6>\u5b89\u88c5\u7528\u4e8e\u4f7f\u7528Marinadb\u7684\u5fc5\u8981\u8f6f\u4ef6\u5305\u3002\u5b89\u88c5DB\u670d\u52a1\u5668<\/p>\n<pre class=\"post-pre\"><code>$ sudo yum install mariadb-server\r\nLoaded plugins: extras_suggestions, langpacks, priorities, update-motd\r\namzn2-core                                                                                                                                                               | 3.7 kB  00:00:00     \r\n220 packages excluded due to repository priority protections\r\nResolving Dependencies\r\n--&gt; Running transaction check\r\n---&gt; Package mariadb-server.x86_64 3:10.2.10-2.amzn2.0.3 will be installed\r\n--&gt; Processing Dependency: mariadb-tokudb-engine(x86-64) = 3:10.2.10-2.amzn2.0.3 for package: 3:mariadb-server-10.2.10-2.amzn2.0.3.x86_64\r\n--&gt; Processing Dependency: mariadb-server-utils(x86-64) = 3:10.2.10-2.amzn2.0.3 for package: 3:mariadb-server-10.2.10-2.amzn2.0.3.x86_64\r\n--&gt; Processing Dependency: mariadb-rocksdb-engine(x86-64) = 3:10.2.10-2.amzn2.0.3 for package: 3:mariadb-server-10.2.10-2.amzn2.0.3.x86_64\r\n--&gt; Processing Dependency: mariadb-gssapi-server(x86-64) = 3:10.2.10-2.amzn2.0.3 for package: 3:mariadb-server-10.2.10-2.amzn2.0.3.x86_64\r\n--&gt; Processing Dependency: mariadb-errmsg(x86-64) = 3:10.2.10-2.amzn2.0.3 for package: 3:mariadb-server-10.2.10-2.amzn2.0.3.x86_64\r\n--&gt; Processing Dependency: mariadb-cracklib-password-check(x86-64) = 3:10.2.10-2.amzn2.0.3 for package: 3:mariadb-server-10.2.10-2.amzn2.0.3.x86_64\r\n--&gt; Processing Dependency: mariadb-backup(x86-64) = 3:10.2.10-2.amzn2.0.3 for package: 3:mariadb-server-10.2.10-2.amzn2.0.3.x86_64\r\n--&gt; Running transaction check\r\n---&gt; Package mariadb-backup.x86_64 3:10.2.10-2.amzn2.0.3 will be installed\r\n---&gt; Package mariadb-cracklib-password-check.x86_64 3:10.2.10-2.amzn2.0.3 will be installed\r\n---&gt; Package mariadb-errmsg.x86_64 3:10.2.10-2.amzn2.0.3 will be installed\r\n---&gt; Package mariadb-gssapi-server.x86_64 3:10.2.10-2.amzn2.0.3 will be installed\r\n---&gt; Package mariadb-rocksdb-engine.x86_64 3:10.2.10-2.amzn2.0.3 will be installed\r\n---&gt; Package mariadb-server-utils.x86_64 3:10.2.10-2.amzn2.0.3 will be installed\r\n--&gt; Processing Dependency: perl(DBI) for package: 3:mariadb-server-utils-10.2.10-2.amzn2.0.3.x86_64\r\n--&gt; Processing Dependency: perl(DBI) for package: 3:mariadb-server-utils-10.2.10-2.amzn2.0.3.x86_64\r\n--&gt; Processing Dependency: perl(DBD::mysql) for package: 3:mariadb-server-utils-10.2.10-2.amzn2.0.3.x86_64\r\n---&gt; Package mariadb-tokudb-engine.x86_64 3:10.2.10-2.amzn2.0.3 will be installed\r\n--&gt; Processing Dependency: libjemalloc.so.1()(64bit) for package: 3:mariadb-tokudb-engine-10.2.10-2.amzn2.0.3.x86_64\r\n--&gt; Running transaction check\r\n---&gt; Package jemalloc.x86_64 0:3.6.0-1.amzn2.0.1 will be installed\r\n---&gt; Package perl-DBD-MySQL.x86_64 0:4.023-6.amzn2 will be installed\r\n---&gt; Package perl-DBI.x86_64 0:1.627-4.amzn2.0.2 will be installed\r\n--&gt; Processing Dependency: perl(RPC::PlServer) &gt;= 0.2001 for package: perl-DBI-1.627-4.amzn2.0.2.x86_64\r\n--&gt; Processing Dependency: perl(RPC::PlClient) &gt;= 0.2000 for package: perl-DBI-1.627-4.amzn2.0.2.x86_64\r\n--&gt; Running transaction check\r\n---&gt; Package perl-PlRPC.noarch 0:0.2020-14.amzn2 will be installed\r\n--&gt; Processing Dependency: perl(Net::Daemon) &gt;= 0.13 for package: perl-PlRPC-0.2020-14.amzn2.noarch\r\n--&gt; Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.amzn2.noarch\r\n--&gt; Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.amzn2.noarch\r\n--&gt; Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.amzn2.noarch\r\n--&gt; Running transaction check\r\n---&gt; Package perl-IO-Compress.noarch 0:2.061-2.amzn2 will be installed\r\n--&gt; Processing Dependency: perl(Compress::Raw::Zlib) &gt;= 2.061 for package: perl-IO-Compress-2.061-2.amzn2.noarch\r\n--&gt; Processing Dependency: perl(Compress::Raw::Bzip2) &gt;= 2.061 for package: perl-IO-Compress-2.061-2.amzn2.noarch\r\n---&gt; Package perl-Net-Daemon.noarch 0:0.48-5.amzn2 will be installed\r\n--&gt; Running transaction check\r\n---&gt; Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.amzn2.0.2 will be installed\r\n---&gt; Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.amzn2.0.2 will be installed\r\n--&gt; Finished Dependency Resolution\r\n\r\nDependencies Resolved\r\n\r\n================================================================================================================================================================================================\r\n Package                                               Arch                         Version                                      Repository                                                Size\r\n================================================================================================================================================================================================\r\nInstalling:\r\n mariadb-server                                        x86_64                       3:10.2.10-2.amzn2.0.3                        amzn2extra-lamp-mariadb10.2-php7.2                        17 M\r\nInstalling for dependencies:\r\n jemalloc                                              x86_64                       3.6.0-1.amzn2.0.1                            amzn2extra-lamp-mariadb10.2-php7.2                       109 k\r\n mariadb-backup                                        x86_64                       3:10.2.10-2.amzn2.0.3                        amzn2extra-lamp-mariadb10.2-php7.2                       5.9 M\r\n mariadb-cracklib-password-check                       x86_64                       3:10.2.10-2.amzn2.0.3                        amzn2extra-lamp-mariadb10.2-php7.2                        36 k\r\n mariadb-errmsg                                        x86_64                       3:10.2.10-2.amzn2.0.3                        amzn2extra-lamp-mariadb10.2-php7.2                       221 k\r\n mariadb-gssapi-server                                 x86_64                       3:10.2.10-2.amzn2.0.3                        amzn2extra-lamp-mariadb10.2-php7.2                        39 k\r\n mariadb-rocksdb-engine                                x86_64                       3:10.2.10-2.amzn2.0.3                        amzn2extra-lamp-mariadb10.2-php7.2                       4.0 M\r\n mariadb-server-utils                                  x86_64                       3:10.2.10-2.amzn2.0.3                        amzn2extra-lamp-mariadb10.2-php7.2                       1.6 M\r\n mariadb-tokudb-engine                                 x86_64                       3:10.2.10-2.amzn2.0.3                        amzn2extra-lamp-mariadb10.2-php7.2                       818 k\r\n perl-Compress-Raw-Bzip2                               x86_64                       2.061-3.amzn2.0.2                            amzn2-core                                                32 k\r\n perl-Compress-Raw-Zlib                                x86_64                       1:2.061-4.amzn2.0.2                          amzn2-core                                                58 k\r\n perl-DBD-MySQL                                        x86_64                       4.023-6.amzn2                                amzn2-core                                               141 k\r\n perl-DBI                                              x86_64                       1.627-4.amzn2.0.2                            amzn2-core                                               804 k\r\n perl-IO-Compress                                      noarch                       2.061-2.amzn2                                amzn2-core                                               260 k\r\n perl-Net-Daemon                                       noarch                       0.48-5.amzn2                                 amzn2-core                                                51 k\r\n perl-PlRPC                                            noarch                       0.2020-14.amzn2                              amzn2-core                                                36 k\r\n\r\nTransaction Summary\r\n================================================================================================================================================================================================\r\nInstall  1 Package (+15 Dependent packages)\r\n\r\nTotal download size: 31 M\r\nInstalled size: 136 M\r\nIs this ok [y\/d\/N]: y\r\nDownloading packages:\r\n(1\/16): jemalloc-3.6.0-1.amzn2.0.1.x86_64.rpm                                                                                                                            | 109 kB  00:00:00     \r\n(2\/16): mariadb-cracklib-password-check-10.2.10-2.amzn2.0.3.x86_64.rpm                                                                                                   |  36 kB  00:00:00     \r\n(3\/16): mariadb-errmsg-10.2.10-2.amzn2.0.3.x86_64.rpm                                                                                                                    | 221 kB  00:00:00     \r\n(4\/16): mariadb-backup-10.2.10-2.amzn2.0.3.x86_64.rpm                                                                                                                    | 5.9 MB  00:00:00     \r\n(5\/16): mariadb-gssapi-server-10.2.10-2.amzn2.0.3.x86_64.rpm                                                                                                             |  39 kB  00:00:00     \r\n(6\/16): mariadb-rocksdb-engine-10.2.10-2.amzn2.0.3.x86_64.rpm                                                                                                            | 4.0 MB  00:00:00     \r\n(7\/16): mariadb-server-utils-10.2.10-2.amzn2.0.3.x86_64.rpm                                                                                                              | 1.6 MB  00:00:00     \r\n(8\/16): mariadb-tokudb-engine-10.2.10-2.amzn2.0.3.x86_64.rpm                                                                                                             | 818 kB  00:00:00     \r\n(9\/16): mariadb-server-10.2.10-2.amzn2.0.3.x86_64.rpm                                                                                                                    |  17 MB  00:00:00     \r\n(10\/16): perl-Compress-Raw-Bzip2-2.061-3.amzn2.0.2.x86_64.rpm                                                                                                            |  32 kB  00:00:00     \r\n(11\/16): perl-Compress-Raw-Zlib-2.061-4.amzn2.0.2.x86_64.rpm                                                                                                             |  58 kB  00:00:00     \r\n(12\/16): perl-DBD-MySQL-4.023-6.amzn2.x86_64.rpm                                                                                                                         | 141 kB  00:00:00     \r\n(13\/16): perl-IO-Compress-2.061-2.amzn2.noarch.rpm                                                                                                                       | 260 kB  00:00:00     \r\n(14\/16): perl-Net-Daemon-0.48-5.amzn2.noarch.rpm                                                                                                                         |  51 kB  00:00:00     \r\n(15\/16): perl-PlRPC-0.2020-14.amzn2.noarch.rpm                                                                                                                           |  36 kB  00:00:00     \r\n(16\/16): perl-DBI-1.627-4.amzn2.0.2.x86_64.rpm                                                                                                                           | 804 kB  00:00:00     \r\n------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\r\nTotal                                                                                                                                                            32 MB\/s |  31 MB  00:00:00     \r\nRunning transaction check\r\nRunning transaction test\r\nTransaction test succeeded\r\nRunning transaction\r\n  Installing : 3:mariadb-errmsg-10.2.10-2.amzn2.0.3.x86_64                                                                                                                                 1\/16 \r\n  Installing : jemalloc-3.6.0-1.amzn2.0.1.x86_64                                                                                                                                           2\/16 \r\n  Installing : perl-Compress-Raw-Bzip2-2.061-3.amzn2.0.2.x86_64                                                                                                                            3\/16 \r\n  Installing : perl-Net-Daemon-0.48-5.amzn2.noarch                                                                                                                                         4\/16 \r\n  Installing : 1:perl-Compress-Raw-Zlib-2.061-4.amzn2.0.2.x86_64                                                                                                                           5\/16 \r\n  Installing : perl-IO-Compress-2.061-2.amzn2.noarch                                                                                                                                       6\/16 \r\n  Installing : perl-PlRPC-0.2020-14.amzn2.noarch                                                                                                                                           7\/16 \r\n  Installing : perl-DBI-1.627-4.amzn2.0.2.x86_64                                                                                                                                           8\/16 \r\n  Installing : perl-DBD-MySQL-4.023-6.amzn2.x86_64                                                                                                                                         9\/16 \r\n  Installing : 3:mariadb-tokudb-engine-10.2.10-2.amzn2.0.3.x86_64                                                                                                                         10\/16 \r\n  Installing : 3:mariadb-rocksdb-engine-10.2.10-2.amzn2.0.3.x86_64                                                                                                                        11\/16 \r\n  Installing : 3:mariadb-backup-10.2.10-2.amzn2.0.3.x86_64                                                                                                                                12\/16 \r\n  Installing : 3:mariadb-cracklib-password-check-10.2.10-2.amzn2.0.3.x86_64                                                                                                               13\/16 \r\n  Installing : 3:mariadb-gssapi-server-10.2.10-2.amzn2.0.3.x86_64                                                                                                                         14\/16 \r\n  Installing : 3:mariadb-server-10.2.10-2.amzn2.0.3.x86_64                                                                                                                                15\/16 \r\n  Installing : 3:mariadb-server-utils-10.2.10-2.amzn2.0.3.x86_64                                                                                                                          16\/16 \r\n  Verifying  : 1:perl-Compress-Raw-Zlib-2.061-4.amzn2.0.2.x86_64                                                                                                                           1\/16 \r\n  Verifying  : 3:mariadb-tokudb-engine-10.2.10-2.amzn2.0.3.x86_64                                                                                                                          2\/16 \r\n  Verifying  : perl-Net-Daemon-0.48-5.amzn2.noarch                                                                                                                                         3\/16 \r\n  Verifying  : 3:mariadb-rocksdb-engine-10.2.10-2.amzn2.0.3.x86_64                                                                                                                         4\/16 \r\n  Verifying  : perl-DBD-MySQL-4.023-6.amzn2.x86_64                                                                                                                                         5\/16 \r\n  Verifying  : 3:mariadb-backup-10.2.10-2.amzn2.0.3.x86_64                                                                                                                                 6\/16 \r\n  Verifying  : 3:mariadb-server-utils-10.2.10-2.amzn2.0.3.x86_64                                                                                                                           7\/16 \r\n  Verifying  : 3:mariadb-cracklib-password-check-10.2.10-2.amzn2.0.3.x86_64                                                                                                                8\/16 \r\n  Verifying  : perl-IO-Compress-2.061-2.amzn2.noarch                                                                                                                                       9\/16 \r\n  Verifying  : 3:mariadb-gssapi-server-10.2.10-2.amzn2.0.3.x86_64                                                                                                                         10\/16 \r\n  Verifying  : perl-Compress-Raw-Bzip2-2.061-3.amzn2.0.2.x86_64                                                                                                                           11\/16 \r\n  Verifying  : jemalloc-3.6.0-1.amzn2.0.1.x86_64                                                                                                                                          12\/16 \r\n  Verifying  : perl-DBI-1.627-4.amzn2.0.2.x86_64                                                                                                                                          13\/16 \r\n  Verifying  : perl-PlRPC-0.2020-14.amzn2.noarch                                                                                                                                          14\/16 \r\n  Verifying  : 3:mariadb-errmsg-10.2.10-2.amzn2.0.3.x86_64                                                                                                                                15\/16 \r\n  Verifying  : 3:mariadb-server-10.2.10-2.amzn2.0.3.x86_64                                                                                                                                16\/16 \r\n\r\nInstalled:\r\n  mariadb-server.x86_64 3:10.2.10-2.amzn2.0.3                                                                                                                                                   \r\n\r\nDependency Installed:\r\n  jemalloc.x86_64 0:3.6.0-1.amzn2.0.1                        mariadb-backup.x86_64 3:10.2.10-2.amzn2.0.3                 mariadb-cracklib-password-check.x86_64 3:10.2.10-2.amzn2.0.3         \r\n  mariadb-errmsg.x86_64 3:10.2.10-2.amzn2.0.3                mariadb-gssapi-server.x86_64 3:10.2.10-2.amzn2.0.3          mariadb-rocksdb-engine.x86_64 3:10.2.10-2.amzn2.0.3                  \r\n  mariadb-server-utils.x86_64 3:10.2.10-2.amzn2.0.3          mariadb-tokudb-engine.x86_64 3:10.2.10-2.amzn2.0.3          perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.amzn2.0.2                   \r\n  perl-Compress-Raw-Zlib.x86_64 1:2.061-4.amzn2.0.2          perl-DBD-MySQL.x86_64 0:4.023-6.amzn2                       perl-DBI.x86_64 0:1.627-4.amzn2.0.2                                  \r\n  perl-IO-Compress.noarch 0:2.061-2.amzn2                    perl-Net-Daemon.noarch 0:0.48-5.amzn2                       perl-PlRPC.noarch 0:0.2020-14.amzn2                                  \r\n\r\nComplete!\r\n<\/code><\/pre>\n<p>\u5b89\u88c5DB\u5ba2\u6237\u7aef<\/p>\n<pre class=\"post-pre\"><code>$ sudo yum install mariadb-devel\r\nLoaded plugins: extras_suggestions, langpacks, priorities, update-motd\r\n220 packages excluded due to repository priority protections\r\nResolving Dependencies\r\n--&gt; Running transaction check\r\n---&gt; Package mariadb-devel.x86_64 3:10.2.10-2.amzn2.0.3 will be installed\r\n--&gt; Finished Dependency Resolution\r\n\r\nDependencies Resolved\r\n\r\n================================================================================================================================================================================================\r\n Package                                 Arch                             Version                                            Repository                                                    Size\r\n================================================================================================================================================================================================\r\nInstalling:\r\n mariadb-devel                           x86_64                           3:10.2.10-2.amzn2.0.3                              amzn2extra-lamp-mariadb10.2-php7.2                           1.0 M\r\n\r\nTransaction Summary\r\n================================================================================================================================================================================================\r\nInstall  1 Package\r\n\r\nTotal download size: 1.0 M\r\nInstalled size: 4.5 M\r\nIs this ok [y\/d\/N]: y\r\nDownloading packages:\r\nmariadb-devel-10.2.10-2.amzn2.0.3.x86_64.rpm                                                                                                                             | 1.0 MB  00:00:00     \r\nRunning transaction check\r\nRunning transaction test\r\nTransaction test succeeded\r\nRunning transaction\r\n  Installing : 3:mariadb-devel-10.2.10-2.amzn2.0.3.x86_64                                                                                                                                   1\/1 \r\n  Verifying  : 3:mariadb-devel-10.2.10-2.amzn2.0.3.x86_64                                                                                                                                   1\/1 \r\n\r\nInstalled:\r\n  mariadb-devel.x86_64 3:10.2.10-2.amzn2.0.3                                                                                                                                                    \r\n\r\nComplete!\r\n<\/code><\/pre>\n<h6>\u542f\u52a8\u6570\u636e\u5e93\u670d\u52a1\u5668<\/p>\n<pre class=\"post-pre\"><code>$ sudo systemctl start mariadb\r\n<\/code><\/pre>\n<h6>\u786e\u8ba4\u670d\u52a1\u5668\u7684\u542f\u52a8\u72b6\u6001<\/p>\n<pre class=\"post-pre\"><code>$ sudo systemctl status mariadb\r\n\u25cf mariadb.service - MariaDB 10.2 database server\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/mariadb.service; disabled; vendor preset: disabled)\r\n   Active: active (running) since Thu 2020-12-03 15:35:26 UTC; 8s ago\r\n  Process: 860 ExecStartPost=\/usr\/libexec\/mysql-check-upgrade (code=exited, status=0\/SUCCESS)\r\n  Process: 638 ExecStartPre=\/usr\/libexec\/mysql-prepare-db-dir %n (code=exited, status=0\/SUCCESS)\r\n  Process: 582 ExecStartPre=\/usr\/libexec\/mysql-check-socket (code=exited, status=0\/SUCCESS)\r\n Main PID: 778 (mysqld)\r\n   Status: \"Taking your SQL requests now...\"\r\n    Tasks: 45\r\n   Memory: 169.8M\r\n   CGroup: \/system.slice\/mariadb.service\r\n           \u2514\u2500778 \/usr\/libexec\/mysqld --basedir=\/usr\r\n\r\nDec 03 15:35:25 ip-172-31-19-99.us-east-2.compute.internal mysql-prepare-db-dir[638]: MySQL manual for more instructions.\r\nDec 03 15:35:25 ip-172-31-19-99.us-east-2.compute.internal mysql-prepare-db-dir[638]: Please report any problems at http:\/\/mariadb.org\/jira\r\nDec 03 15:35:25 ip-172-31-19-99.us-east-2.compute.internal mysql-prepare-db-dir[638]: The latest information about MariaDB is available at http:\/\/mariadb.org\/.\r\nDec 03 15:35:25 ip-172-31-19-99.us-east-2.compute.internal mysql-prepare-db-dir[638]: You can find additional information about the MySQL part at:\r\nDec 03 15:35:25 ip-172-31-19-99.us-east-2.compute.internal mysql-prepare-db-dir[638]: http:\/\/dev.mysql.com\r\nDec 03 15:35:25 ip-172-31-19-99.us-east-2.compute.internal mysql-prepare-db-dir[638]: Consider joining MariaDB's strong and vibrant community:\r\nDec 03 15:35:25 ip-172-31-19-99.us-east-2.compute.internal mysql-prepare-db-dir[638]: https:\/\/mariadb.org\/get-involved\/\r\nDec 03 15:35:26 ip-172-31-19-99.us-east-2.compute.internal mysqld[778]: 2020-12-03 15:35:26 140397484732224 [Note] \/usr\/libexec\/mysqld (mysqld 10.2.10-MariaDB) starting as process 778 ...\r\nDec 03 15:35:26 ip-172-31-19-99.us-east-2.compute.internal mysqld[778]: 2020-12-03 15:35:26 140397484732224 [Warning] Changed limits: max_open_files: 1024  max_connections: 151  ta...ache: 431\r\nDec 03 15:35:26 ip-172-31-19-99.us-east-2.compute.internal systemd[1]: Started MariaDB 10.2 database server.\r\nHint: Some lines were ellipsized, use -l to show in full.\r\n<\/code><\/pre>\n<h6>\u8bbe\u7f6e\u5728\u64cd\u4f5c\u7cfb\u7edf\u542f\u52a8\u65f6\u81ea\u52a8\u542f\u52a8<\/p>\n<pre class=\"post-pre\"><code>$ sudo systemctl enable mariadb\r\nCreated symlink from \/etc\/systemd\/system\/multi-user.target.wants\/mariadb.service to \/usr\/lib\/systemd\/system\/mariadb.service.\r\n<\/code><\/pre>\n<h6>\u521b\u5efa\u65b0\u5e94\u7528<br \/>\n\u6211\u5011\u73fe\u5728\u5728\u9019\u88e1\u5275\u5efa\u4e00\u500b\u65b0\u7684\u61c9\u7528\u7a0b\u5e8f\u3002\u9019\u6b21\u6211\u5011\u6703\u6307\u5b9amysql\u4f5c\u70ba\u6578\u64da\u5eab\uff0c\u6240\u4ee5\u8f38\u5165\u4e0b\u9762\u7684\u547d\u4ee4\u3002\u4ee5&#8221;shift-management&#8221;\u4f5c\u70ba\u61c9\u7528\u7a0b\u5e8f\u540d\u7a31\u70ba\u4f8b\u3002<\/p>\n<pre class=\"post-pre\"><code>$ rails new shift-management -d mysql\r\n      create  \r\n      create  README.md\r\n      create  Rakefile\r\n      create  config.ru\r\n      create  .gitignore\r\n      create  Gemfile\r\n      create  app\r\n      create  app\/assets\/config\/manifest.js\r\n      create  app\/assets\/javascripts\/application.js\r\n      create  app\/assets\/javascripts\/cable.js\r\n      create  app\/assets\/stylesheets\/application.css\r\n      create  app\/channels\/application_cable\/channel.rb\r\n      create  app\/channels\/application_cable\/connection.rb\r\n      create  app\/controllers\/application_controller.rb\r\n      create  app\/helpers\/application_helper.rb\r\n      create  app\/jobs\/application_job.rb\r\n      create  app\/mailers\/application_mailer.rb\r\n      create  app\/models\/application_record.rb\r\n      create  app\/views\/layouts\/application.html.erb\r\n      create  app\/views\/layouts\/mailer.html.erb\r\n      create  app\/views\/layouts\/mailer.text.erb\r\n      create  app\/assets\/images\/.keep\r\n      create  app\/assets\/javascripts\/channels\r\n      create  app\/assets\/javascripts\/channels\/.keep\r\n      create  app\/controllers\/concerns\/.keep\r\n      create  app\/models\/concerns\/.keep\r\n      create  bin\r\n      create  bin\/bundle\r\n      create  bin\/rails\r\n      create  bin\/rake\r\n      create  bin\/setup\r\n      create  bin\/update\r\n      create  config\r\n      create  config\/routes.rb\r\n      create  config\/application.rb\r\n      create  config\/environment.rb\r\n      create  config\/secrets.yml\r\n      create  config\/cable.yml\r\n      create  config\/puma.rb\r\n      create  config\/spring.rb\r\n      create  config\/environments\r\n      create  config\/environments\/development.rb\r\n      create  config\/environments\/production.rb\r\n      create  config\/environments\/test.rb\r\n      create  config\/initializers\r\n      create  config\/initializers\/application_controller_renderer.rb\r\n      create  config\/initializers\/assets.rb\r\n      create  config\/initializers\/backtrace_silencers.rb\r\n      create  config\/initializers\/cookies_serializer.rb\r\n      create  config\/initializers\/cors.rb\r\n      create  config\/initializers\/filter_parameter_logging.rb\r\n      create  config\/initializers\/inflections.rb\r\n      create  config\/initializers\/mime_types.rb\r\n      create  config\/initializers\/new_framework_defaults.rb\r\n      create  config\/initializers\/session_store.rb\r\n      create  config\/initializers\/wrap_parameters.rb\r\n      create  config\/locales\r\n      create  config\/locales\/en.yml\r\n      create  config\/boot.rb\r\n      create  config\/database.yml\r\n      create  db\r\n      create  db\/seeds.rb\r\n      create  lib\r\n      create  lib\/tasks\r\n      create  lib\/tasks\/.keep\r\n      create  lib\/assets\r\n      create  lib\/assets\/.keep\r\n      create  log\r\n      create  log\/.keep\r\n      create  public\r\n      create  public\/404.html\r\n      create  public\/422.html\r\n      create  public\/500.html\r\n      create  public\/apple-touch-icon-precomposed.png\r\n      create  public\/apple-touch-icon.png\r\n      create  public\/favicon.ico\r\n      create  public\/robots.txt\r\n      create  test\/fixtures\r\n      create  test\/fixtures\/.keep\r\n      create  test\/fixtures\/files\r\n      create  test\/fixtures\/files\/.keep\r\n      create  test\/controllers\r\n      create  test\/controllers\/.keep\r\n      create  test\/mailers\r\n      create  test\/mailers\/.keep\r\n      create  test\/models\r\n      create  test\/models\/.keep\r\n      create  test\/helpers\r\n      create  test\/helpers\/.keep\r\n      create  test\/integration\r\n      create  test\/integration\/.keep\r\n      create  test\/test_helper.rb\r\n      create  tmp\r\n      create  tmp\/.keep\r\n      create  tmp\/cache\r\n      create  tmp\/cache\/assets\r\n      create  vendor\/assets\/javascripts\r\n      create  vendor\/assets\/javascripts\/.keep\r\n      create  vendor\/assets\/stylesheets\r\n      create  vendor\/assets\/stylesheets\/.keep\r\n      remove  config\/initializers\/cors.rb\r\n         run  bundle install\r\n[DEPRECATED] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env` (called at \/home\/ec2-user\/.rvm\/gems\/ruby-2.6.3\/gems\/railties-5.0.0\/lib\/rails\/generators\/app_base.rb:374)\r\nThe dependency tzinfo-data (&gt;= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.\r\nFetching gem metadata from https:\/\/rubygems.org\/............\r\nFetching gem metadata from https:\/\/rubygems.org\/.\r\nResolving dependencies....\r\nFetching rake 13.0.1\r\nInstalling rake 13.0.1\r\nUsing concurrent-ruby 1.1.7\r\nFetching i18n 1.8.5\r\nInstalling i18n 1.8.5\r\nFetching minitest 5.14.2\r\nInstalling minitest 5.14.2\r\nUsing thread_safe 0.3.6\r\nFetching tzinfo 1.2.8\r\nInstalling tzinfo 1.2.8\r\nFetching activesupport 5.0.7.2\r\nInstalling activesupport 5.0.7.2\r\nUsing builder 3.2.4\r\nUsing erubis 2.7.0\r\nUsing mini_portile2 2.4.0\r\nUsing nokogiri 1.10.10\r\nUsing rails-dom-testing 2.0.3\r\nUsing crass 1.0.6\r\nFetching loofah 2.8.0\r\nInstalling loofah 2.8.0\r\nUsing rails-html-sanitizer 1.3.0\r\nFetching actionview 5.0.7.2\r\nInstalling actionview 5.0.7.2\r\nUsing rack 2.2.3\r\nUsing rack-test 0.6.3\r\nFetching actionpack 5.0.7.2\r\nInstalling actionpack 5.0.7.2\r\nFetching nio4r 2.5.4\r\nInstalling nio4r 2.5.4 with native extensions\r\nUsing websocket-extensions 0.1.5\r\nUsing websocket-driver 0.6.5\r\nFetching actioncable 5.0.7.2\r\nInstalling actioncable 5.0.7.2\r\nUsing globalid 0.4.2\r\nFetching activejob 5.0.7.2\r\nInstalling activejob 5.0.7.2\r\nUsing mini_mime 1.0.2\r\nUsing mail 2.7.1\r\nFetching actionmailer 5.0.7.2\r\nInstalling actionmailer 5.0.7.2\r\nFetching activemodel 5.0.7.2\r\nInstalling activemodel 5.0.7.2\r\nUsing arel 7.1.4\r\nFetching activerecord 5.0.7.2\r\nInstalling activerecord 5.0.7.2\r\nFetching bindex 0.8.1\r\nInstalling bindex 0.8.1 with native extensions\r\nUsing bundler 2.1.4\r\nFetching byebug 11.1.3\r\nInstalling byebug 11.1.3 with native extensions\r\nFetching coffee-script-source 1.12.2\r\nInstalling coffee-script-source 1.12.2\r\nFetching execjs 2.7.0\r\nInstalling execjs 2.7.0\r\nFetching coffee-script 2.4.1\r\nInstalling coffee-script 2.4.1\r\nUsing method_source 1.0.0\r\nUsing thor 1.0.1\r\nFetching railties 5.0.7.2\r\nInstalling railties 5.0.7.2\r\nFetching coffee-rails 4.2.2\r\nInstalling coffee-rails 4.2.2\r\nFetching ffi 1.13.1\r\nInstalling ffi 1.13.1 with native extensions\r\nFetching jbuilder 2.10.1\r\nInstalling jbuilder 2.10.1\r\nFetching jquery-rails 4.4.0\r\nInstalling jquery-rails 4.4.0\r\nFetching rb-fsevent 0.10.4\r\nInstalling rb-fsevent 0.10.4\r\nFetching rb-inotify 0.10.1\r\nInstalling rb-inotify 0.10.1\r\nFetching listen 3.0.8\r\nInstalling listen 3.0.8\r\nFetching mysql2 0.4.10\r\nInstalling mysql2 0.4.10 with native extensions\r\nFetching puma 3.12.6\r\nInstalling puma 3.12.6 with native extensions\r\nFetching sprockets 3.7.2\r\nInstalling sprockets 3.7.2\r\nUsing sprockets-rails 3.2.2\r\nFetching rails 5.0.7.2\r\nInstalling rails 5.0.7.2\r\nFetching sass-listen 4.0.0\r\nInstalling sass-listen 4.0.0\r\nFetching sass 3.7.4\r\nInstalling sass 3.7.4\r\nFetching tilt 2.0.10\r\nInstalling tilt 2.0.10\r\nFetching sass-rails 5.0.7\r\nInstalling sass-rails 5.0.7\r\nFetching spring 2.1.1\r\nInstalling spring 2.1.1\r\nFetching spring-watcher-listen 2.0.1\r\nInstalling spring-watcher-listen 2.0.1\r\nFetching turbolinks-source 5.2.0\r\nInstalling turbolinks-source 5.2.0\r\nFetching turbolinks 5.2.1\r\nInstalling turbolinks 5.2.1\r\nFetching uglifier 4.2.0\r\nInstalling uglifier 4.2.0\r\nFetching web-console 3.7.0\r\nInstalling web-console 3.7.0\r\nBundle complete! 15 Gemfile dependencies, 62 gems now installed.\r\nUse `bundle info [gemname]` to see where a bundled gem is installed.\r\nPost-install message from i18n:\r\n\r\nHEADS UP! i18n 1.1 changed fallbacks to exclude default locale.\r\nBut that may break your application.\r\n\r\nIf you are upgrading your Rails application from an older version of Rails:\r\n\r\nPlease check your Rails app for 'config.i18n.fallbacks = true'.\r\nIf you're using I18n (&gt;= 1.1.0) and Rails (&lt; 5.2.2), this should be\r\n'config.i18n.fallbacks = [I18n.default_locale]'.\r\nIf not, fallbacks will be broken in your app by I18n 1.1.x.\r\n\r\nIf you are starting a NEW Rails application, you can ignore this notice.\r\n\r\nFor more info see:\r\nhttps:\/\/github.com\/svenfuchs\/i18n\/releases\/tag\/v1.1.0\r\n\r\nPost-install message from sass:\r\n\r\nRuby Sass has reached end-of-life and should no longer be used.\r\n\r\n* If you use Sass as a command-line tool, we recommend using Dart Sass, the new\r\n  primary implementation: https:\/\/sass-lang.com\/install\r\n\r\n* If you use Sass as a plug-in for a Ruby web framework, we recommend using the\r\n  sassc gem: https:\/\/github.com\/sass\/sassc-ruby#readme\r\n\r\n* For more details, please refer to the Sass blog:\r\n  https:\/\/sass-lang.com\/blog\/posts\/7828841\r\n\r\n         run  bundle exec spring binstub --all\r\n* bin\/rake: Spring inserted\r\n* bin\/rails: Spring inserted\r\n<\/code><\/pre>\n<h6>\u521b\u5efa\u6570\u636e\u5e93<\/p>\n<pre class=\"post-pre\"><code>$ rake db:create\r\nThe dependency tzinfo-data (&gt;= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.\r\nCreated database 'shift-management_development'\r\nCreated database 'shift-management_test'\r\n<\/code><\/pre>\n<p>\u8fd9\u6b21\u5c31\u5230\u8fd9\u91cc\u5427\u3002<\/p>\n<h1>\u5e38\u89c1\u9519\u8bef\u5728\u4f7f\u7528Rails\u521b\u5efa\u65b0\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u5982\u679c\u5728\u5b89\u88c5mysql2\u65f6\u9047\u5230\u9519\u8bef\uff0c\u53ef\u4ee5\u91c7\u53d6\u4ee5\u4e0b\u89e3\u51b3\u529e\u6cd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148\u56e0\u4e3a\u5728AmazonLinux2\u4e0a\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u65f6\u9047\u5230\u4e86\u5404\u79cd\u9519\u8bef\uff0c\u6240\u4ee5\u6211\u628a\u5b83\u5199\u4e0b\u6765\u4f5c\u4e3a\u542f\u793a\u5f55\u3002  [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-28647","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"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>\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4\u7684\u6280\u672f\u6587\u7ae0\" \/>\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\/\u3010amazonlinux2\u3011\u521b\u5efa\u65b0\u7684rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake-dbcreate\u547d\u4ee4\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u3010amazonlinux2\u3011\u521b\u5efa\u65b0\u7684rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake-dbcreate\u547d\u4ee4\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-24T00:05:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-12T01:20:43+00:00\" \/>\n<meta name=\"author\" content=\"\u6e05, \u626c\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u626c\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \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\/%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82\/\",\"name\":\"\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-08-24T00:05:44+00:00\",\"dateModified\":\"2025-08-12T01:20:43+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461\"},\"description\":\"\u5173\u4e8e\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4\"}]},{\"@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\/cb5556d2501da73d864cac945e8d9461\",\"name\":\"\u6e05, \u626c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u626c\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyang\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4 - Blog - Silicon Cloud","description":"\u5173\u4e8e\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4\u7684\u6280\u672f\u6587\u7ae0","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\/\u3010amazonlinux2\u3011\u521b\u5efa\u65b0\u7684rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake-dbcreate\u547d\u4ee4\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4","og_description":"\u5173\u4e8e\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u3010amazonlinux2\u3011\u521b\u5efa\u65b0\u7684rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake-dbcreate\u547d\u4ee4\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-08-24T00:05:44+00:00","article_modified_time":"2025-08-12T01:20:43+00:00","author":"\u6e05, \u626c","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u626c","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82\/","name":"\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-08-24T00:05:44+00:00","dateModified":"2025-08-12T01:20:43+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461"},"description":"\u5173\u4e8e\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010AmazonLinux2\u3011\u521b\u5efa\u65b0\u7684Rails\u5e94\u7528\u7a0b\u5e8f\u76f4\u5230\u8fd0\u884crake db:create\u547d\u4ee4"}]},{"@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\/cb5556d2501da73d864cac945e8d9461","name":"\u6e05, \u626c","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g","caption":"\u6e05, \u626c"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyang\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90amazonlinux2%e3%80%91%e5%88%9b%e5%bb%ba%e6%96%b0%e7%9a%84rails%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9b%b4%e5%88%b0%e8%bf%90%e8%a1%8crake-dbcreate%e5%91%bd%e4%bb%a4%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/28647","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\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=28647"}],"version-history":[{"count":3,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/28647\/revisions"}],"predecessor-version":[{"id":111362,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/28647\/revisions\/111362"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=28647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=28647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=28647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}