Skip to content

Instantly share code, notes, and snippets.

@wake
Last active December 15, 2015 18:49
Show Gist options
  • Save wake/5307021 to your computer and use it in GitHub Desktop.
Save wake/5307021 to your computer and use it in GitHub Desktop.
CentOS GitLab Installation FAQ

CentOS GitLab Installation FAQ


make: *** [doc/capi/.timestamp] Killed

There are several way but I can't promise which one will work:

  • Upgrade server memory or remove /tmp/ruby/ruby-1.9.3-p392 and redownload & re-make. Command make may be interrupted (killed) by out of memory reason. Take this as an option if you have always received make killed message after tried all other suggestions on a low memory (less than 1G) server.
  • Another suggestion: here.
  • Upgrade doxygen. (as following)

Remove doxygen

sudo yum remove doxygen

Download & install last version manually

mkdir /tmp/doxygen && cd /tmp/doxygen
svn co https://doxygen.svn.sourceforge.net/svnroot/doxygen/trunk doxygen-svn
cd doxygen-svn
./configure
make
sudo make install

sudo: gem: command not found

Use sudo -i instead of sudo, -i acquires the root user's environment, or you can use an old way solution as below

mv /usr/bin/sudo /usr/bin/sudo.ori
vi /usr/bin/sudo
#!/bin/bash
/usr/bin/sudo.ori env PATH=$PATH "$@"

Ref:sudo: gem: command not found

yaml.rb error, it seems your ruby installation is missing psych

wget http://mirror01.idc.hinet.net/EPEL/6/i386/epel-release-6-8.noarch.rpm
rpm -iUvh epel-release-6-8.noarch.rpm

Then

yum install libyaml-devel -y

Recompile ruby.

Can't locate Time/HiRes.pm in @INC

yum install perl-Time-HiRes -y

sudo: bundle: command not found

Use absolute path to execute bundle:

whereis bundle
sudo -u gitlab -H /real/path/to/bundle ....

/usr/bin/env: ruby: No such file or directory, Could not locate Gemfile

Solution A

vi /etc/profile.d/ruby.sh

Add below:

export PATH=$PATH:/usr/local/bin:/usr/local/lib

Solution B

Sudo needs -i option to make /usr/bin/env: ruby executing correctly, but it will also change the current working directory to gitlab's home and make Could not locate Gemfile error.

But the old way solution works well:

sudo -u gitlab -H env PATH=$PATH /usr/local/bin/bundle exec rake gitlab:setup RAILS_ENV=production

Ref:Stay at same working directory when changing to sudo

Error connecting to Redis on localhost

service redis start

upstream prematurely closed connection while reading response header from upstream

vi /home/gitlab/gitlab/config/unicorn.rb
# nuke workers after 30 seconds (60 is the default)
timeout 120

About sidekiq

When you run GitLab on a low memory server (like me), sidekig is possible to take 1~2 mins to start after service gitlab start or /etc/init.d/gitlab executed. Otherwise, if you get error log sidekiq memory allocate error, try to flush (or restart) redis, it may give a chance.

About unicorn

As same as sidekiq, unicorn will always crush with error message like reaped #<Process::Status: pid 1997 SIGKILL (signal 9)> worker=1 even set timeout to 300 in unicorn.rb already if you deploy on a low memory server, I get out from crashing hell finally after upgrade vps (DigitalOcean) memory from 512 to 1024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment