由于自己的阿里云服务器太渣渣了,所以在这里一直卡主了。看了一下阿里云的服务监控。内存已经爆满了,不得不去花钱升级了一下配置。现在是1CPU and 2GB内存。
继续执行,还是报错了。
1 2 3 4
Running handlers: There was an error running gitlab-ctl reconfigure:
execute[semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp] (gitlab::selinux line 20) had an error: Errno::ENOMEM: execute[Guard resource] (dynamically defined) had an error: Errno::ENOMEM: Cannot allocate memory - fork(2)
[root@iZ94tq694y3Z swapfile]# mkdir /swapfile [root@iZ94tq694y3Z swapfile]# cd /swapfile [root@iZ94tq694y3Z swapfile]# dd if=/dev/zero of=swap bs=1024 count=2000000 2000000+0 records in 2000000+0 records out 2048000000 bytes (2.0 GB) copied, 12.8547 s, 159 MB/s [root@iZ94tq694y3Z swapfile]# mkswap -f swap Setting up swapspace version 1, size = 1999996 KiB no label, UUID=da70ea74-4bac-484a-9c14-2c20e265c267 [root@iZ94tq694y3Z swapfile]# swapon swap swapon: /swapfile/swap: insecure permissions 0644, 0600 suggested. [root@iZ94tq694y3Z swapfile]# free -h total used free shared buffers cached Mem: 1.8G 1.7G 68M 52M 1.2M 85M -/+ buffers/cache: 1.6G 155M Swap: 1.9G 0B 1.9G
再重新执行gitlab-ctl reconfigure成功
1 2 3 4
Running handlers: Running handlers complete Chef Client finished, 35/743 resources updated in 01 minutes 31 seconds gitlab Reconfigured!
继续配置:gitlab-rails console production
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
[root@iZ94tq694y3Z swapfile]# gitlab-rails console production DEPRECATION WARNING: Passing the environment's name as a regular argument is deprecated and will be removed in the next Rails version. Please, use the -e option instead. (called from require at bin/rails:4) -------------------------------------------------------------------------------- GitLab: 12.3.5 (2417d5becc7) GitLab Shell: 10.0.0 PostgreSQL: 10.9 -------------------------------------------------------------------------------- Loading production environment (Rails 5.2.3) irb(main):001:0> irb(main):002:0> user = User.where(id:1).first => #<User id:1 @root> irb(main):003:0> 'chg''xxxxxx' => "xxxxxx" irb(main):004:0> user.save! Enqueued ActionMailer::DeliveryJob (Job ID: c9f8831f-25c1-429c-bc3a-073a2a1e5fb8) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", #<GlobalID:0x00007fa89b887368 @uri=#<URI::GID gid://gitlab/User/1>> => true irb(main):005:0>