您的位置:首页 > 运维架构 > Linux

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

2014-07-13 21:00 411 查看
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.

红帽今年一月份发布了SCL,它能安装更新版本的ruby,perl和python等等。gitlab,foreman需要的ruby193版本能够轻易的用scl安装.

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

第一步:在Rhel/Centos上添加SCL的软件仓库。

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

然后安装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

第二步:因为红帽还附带git version 1.7.1-3.el6_4.1,所以我们需要添加rpmforge软件仓库。

Enable the rpmforge extras

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

第三步:gitlab也需要redis数据库,在epel上有可用的源。

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

第四步:安装ruby193 and git httpd mysql-server然后开启服务。

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

第五步:添加git用户,并设置全局变量。

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

第六步:切换到git帐户,下载git仓库。

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

第七步:在 .bashrc 添加如下内容,以确保我们登陆的时候scl环境加载好了。

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

第八步:确保路径是对的。你可以执行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

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐