Gitlab 5.2 on RHEL/Centos 6.4 with SCL / Software Collection outdated

Redhat release software collection January this year. It’s kind of cool as it lets you install newer versions of ruby perl python etc. Gitlab requires version ruby193 which is very easy to install with scl. This install guide is based on the original gitlab install guide which can be found here “https://github.com/gitlabhq/gitlab-recipes” and shows you howto make gitlab work with SCL instead of RVM.

Step 1. Add the SCL repo to your Rhel/Centos installation

http://people.redhat.com/bkabrda/scl_ruby193.repo

Make sure you are also subscribed to the rhel6-server optional channel. Then install the Development tools

Step 2. As rhel still ships with git version 1.7.1-3.el6_4.1 we also need to add the rpm forge package

Enable the rpmforge extras

Step 3. Gitlab also needs redis which is available on epel.

Step 4. Lets install ruby193 and git httpd mysql-server and start all the servies

Step 5. Add the user git and set the git globals

Step 6. su to the git user to clone the git repos

Step 7. Extend your .bashrc to have the following content which will load our scl environment for us when we login

Step 8. Make sure the paths are right. You can test this by executing env.

Step 9. Logout and login again as user gitlab. If everything went fine you should be able to do this

Step 10. As git cd into the git-shell dir and checkout version 1.4

Step 11. Copy the file config.yml.example to config.yml and and replace the hostname localhost with your hostname

Step 12. Install gitshell

Step 13. IMPORTANT. Do this still as the git user! checkout gitlab 5.2

Step 14. Lets configure Gitlab and install the gems

Step 15. Configure Gitlab
Copy the example GitLab config and edit the necessary fields.

Step 16. Copy the puma.rb config and configure it. Change the bind parameter so that it reads: bind ‘tcp://127.0.0.1:9292’

Step 17. Confugre Mysql and change the user and password in the database.yml file

Step 18. Create a Mysql User

Step 19. Check if you can login as the gitlab user

Step 20. Secure MySQL by entering a root password and say “Yes” to all questions with the next command

Step 21. Add this as your apache config in /etc/httpd/conf.d/gitlab.conf

Step 22. From the gitlab dir execute

Step 23. If everything went fine you see:

Step 24. Get the init script. As we use SCL instead of RVM we need to change some path variables

Step 25. If you want you can now configure the mail part. Open /etc/mail/sendmail.mc and add or modify the following lines

Step 26. Restart sendmail

Step 27. forward all email to a centrail mail address

Step 28. Your done. Start up your server

5 thoughts on “Gitlab 5.2 on RHEL/Centos 6.4 with SCL / Software Collection outdated

  • I’m trying to follow the directions, but it appears that, with Ruby 1.9.3 installed things are not happy when I try to run ‘[git@gitlab gitlab]$ bundle install –deployment –without development test postgres
    [git@gitlab gitlab]$ bundle exec rake gitlab:setup RAILS_ENV=production’

    Did I miss an obvious step or is there a recovery process?

    TIA

    • Hi Gerry,

      You can ignore the warnings. The checks are not made to run against SCL thats why their not happy. Please note that for gitshell you also need to install json. Check out the documentation on gitlab 6.0. I am also running gitlab enterprise 6.0 this way and its gitlab approved.

      Laurent

Leave a Reply

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

*


Hit Counter provided by laptop reviews