How to upgrade Gitlab 5.4 to 6.0 on CentOS 6 or RHEL6

Last modified: [last-modified]

The upgrade instructions found on Gitlab’s official website are what I followed to upgrade my installation of Gitlab.

The only alterations I’ve made are to match my unique configuration from earlier articles on this website.

If you haven’t already upgrade your Gitlab to 5.4 before proceeding with these instructions. I never wrote a 5.2 -> 5.3 or a 5.3 -> 5.4 upgrade guide. The procedure was fairly straight forward and I just followed the official documents offered by Gitlab and referred to my earlier upgrade posts for 5.0 -> 5.1 and 5.1 -> 5.2.

1. Backup all of your Gitlab Data first. I ran these commands but ended up with an error. I run other separate backups so I wasn’t concerned. You may have better luck.


2. Switch back to root and install a missing dependency and shutdown Gitlab and then switch back to sa_gitlab


3. Download the latest code


4. Update Gitlab Shell


5. Update Gitlab


6. Backup your old configuration files


7. Create new configuration files


8. Update the init script


9. Start-up Gitlab 6!


That’s it!

6 thoughts on “How to upgrade Gitlab 5.4 to 6.0 on CentOS 6 or RHEL6

  1. getting weird error when starting?

    Starting the GitLab Unicorn web server…


    /etc/init.d/gitlab: line 131: script/web: No such file or directory


    Starting the GitLab Sidekiq event dispatcher…


    /etc/init.d/gitlab: line 139: script/background_jobs: No such file or directory


    GitLab is not running.


    line 131   RAILS_ENV=$RAILS_ENV script/web start


    line 139:   RAILS_ENV=$RAILS_ENV script/background_jobs start

    • I’m guessing you might have goofed up the app_root in the /etc/init.d/gitlab script. Check out line 23: app_root=”/data/apps/sa_gitlab/gitlab”

  2. I have followed the instructions above to upgrade to 6.0 and everything went smooth. Yet when I try to access gitlab on http it gives me error 503 as per below:
    Service Temporarily Unavailable
    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

    Apache/2.2.15 (CentOS) Server at gitlab.gzero.local Port 80 I have run the bundle exec rake gitlab:check RAILS_ENV=production and it all checks fine apart from the init script that I believe is an issue since the above script compares it against debian version and I am on CentOS. I thought I will upgrade to 6.1 just in case but teh issue remains teh same. Any thoughts would be appreciated. Thanks

    • Check your error log. Chances are it will tell you what’s wrong. I’m guessing Unicorn isn’t starting properly. I just ran into a similar problem going to the latest version of Gitlab.

      Error log is: /data/apps/sa_gitlab/gitlab/log/unicorn.stderr.log

  3. I had to revert to the previous snapshot to have gitlab running so i had no chance lookin gon the unicorn.stderr.log. However on another attempt what seems to have sorted it out is upgrading to ruby 2.0.0-p247

    Thanks for your help

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.