码迷,mamicode.com
首页 > 其他好文 > 详细

gitlab 安装

时间:2016-09-26 11:01:24      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:

GitLab的安装方式

GitLab的两种安装方法:

  • 编译安装

    • 优点:可定制性强。数据库既可以选择MySQL,也可以选择PostgreSQL;服务器既可以选择Apache,也可以选择Nginx。

    • 缺点:国外的源不稳定,被墙时,依赖软件包难以下载。配置流程繁琐、复杂,容易出现各种各样的问题。依赖关系多,不容易管理,卸载GitLab相对麻烦。

  • 通过rpm包安装

    • 优点:安装过程简单,安装速度快。采用rpm包安装方式,安装的软件包便于管理。

    • 缺点:数据库默认采用PostgreSQL,服务器默认采用Nginx,不容易定制。

由于公司只配备了一台阿里云服务器,并且没有分配任何的域名。该服务器上需要运行版本控制软件、bug管理软件、知识库等多套程序,只能采用ip的方式访问。原先采用GitLab+Apache+MySQL编译安装的方式,并且将GitLab配置为可通过xxx.xx.xxx.xx/gitlab的形式访问,由于bug管理软件(禅道)也运行于Apache之上,两套软件之间彼此有互斥的影响,找不到解决方法。同时,GitLab的注册需要邮箱验证,由于网上提供的配置方法都是基于域名的,在阿里云上多次进行配置都无法正常使用。

因此,只能放弃编译安装的方式,而采取rpm包的方式重新进行安装。

安装GitLab CE Omnibus包

sudo yum install curl policycoreutils openssh-server openssh-clients
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld

2. Add the GitLab package server and install the package

 

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce

If you are not comfortable installing the repository through a piped script, you can find the entire script here and select and download the package manually and install using

curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-XXX.rpm/download
rpm -i gitlab-ce-XXX.rpm

 

3. Configure and start GitLab

 

sudo gitlab-ctl reconfigure
    1. 登录GitLab

      Username: root 
      Password: 5iveL!fe

 

配置文件 cat /etc/gitlab/gitlab.rb

 

[root@git gitlab]# grep -v "#" gitlab.rb | sed ‘/^$/d‘
external_url ‘http://git.cinyi.com‘
gitlab_rails[‘gitlab_email_from‘] = ‘fengjian1585@163.com‘
gitlab_rails[‘backup_path‘] = "/data/gitlab/backups"
gitlab_rails[‘smtp_enable‘] = true
gitlab_rails[‘smtp_address‘] = "smtp.163.com"
gitlab_rails[‘smtp_port‘] = 25
gitlab_rails[‘smtp_user_name‘] = "fengjian1585@163.com"
gitlab_rails[‘smtp_password‘] = "123456"
gitlab_rails[‘smtp_domain‘] = "163.com"
gitlab_rails[‘smtp_authentication‘] = "login"
gitlab_rails[‘smtp_enable_starttls_auto‘] = true
user[‘git_user_name‘] = "Git_Senyint_Admin"
user[‘git_user_email‘] = "fengjian1585@163.com"

 

gitlab 安装

标签:

原文地址:http://www.cnblogs.com/fengjian2016/p/5908180.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!