gitlab再CentOS 7.1 上面的安装

gitlab 在CENTOS 7 上的安装


# 建立yum 源
[root@localhost ~]# vi /etc/yum.repos.d/gitlab-ce.repo

[root@localhost ~]# cat  /etc/yum.repos.d/gitlab-ce.repo
[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key

# 添加git用户,其实这个可以不做,用root即可,有点画蛇添足的感觉

[root@localhost ~]# useradd git
[root@localhost ~]# su - git
[git@localhost ~]$ pwd
/home/git
[git@localhost ~]$ sudo yum makecache

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for git:
Sorry, try again.
[sudo] password for git:
Sorry, try again.
[sudo] password for git:
sudo2 次错误密码尝试

[git@localhost ~]$ exit
登出


[root@localhost ~]# passwd git
更改用户 git 的密码 。
新的 密码:
无效的密码: 密码少于 8 个字符
重新输入新的 密码:
passwd:所有的身份验证令牌已经成功更新。
[root@localhost ~]# su - git
上一次登录:三 322 16:13:16 CST 2017pts/1 上
[git@localhost ~]$ sudo yum makecache
[sudo] password for git:
git 不在 sudoers 文件中。此事将被报告。

[git@localhost ~]$ exit
登出
您在 /var/spool/mail/root 中有新邮件
[root@localhost ~]# vi /etc/sudoers
[root@localhost ~]# su - git

[git@localhost ~]$ sudo yum makecache
[sudo] password for git:
已加载插件:fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with Subscription Management. You can use subscription-manager to register.
base                                                                                                                                           | 3.6 kB  00:00:00
extras                                                                                                                                         | 3.4 kB  00:00:00
gitlab-ce                                                                                                                                      | 2.9 kB  00:00:00
updates                                                                                                                                        | 3.4 kB  00:00:00
(1/15): base/x86_64/group_gz                                                                                                                   | 155 kB  00:00:01
(2/15): base/x86_64/primary_db                                                                                                                 | 5.6 MB  00:01:11
(3/15): extras/x86_64/prestodelta                                                                                                              | 117 kB  00:00:03
(4/15): extras/x86_64/primary_db                                                                                                               | 139 kB  00:00:01
(5/15): extras/x86_64/filelists_db                                                                                                             | 596 kB  00:00:10
(6/15): extras/x86_64/other_db                                                                                                                 | 545 kB  00:00:09
(7/15): base/x86_64/filelists_db                                                                                                               | 6.6 MB  00:01:36
(8/15): base/x86_64/other_db                                                                                                                   | 2.4 MB  00:00:29
(9/15): gitlab-ce/primary_db                                                                                                                   | 1.3 MB  00:00:20
(10/15): gitlab-ce/other_db                                                                                                                    |  14 kB  00:00:00
(11/15): updates/x86_64/prestodelta                                                                                                            | 430 kB  00:00:05
(12/15): updates/x86_64/filelists_db                                                                                                           | 2.2 MB  00:00:23
(13/15): updates/x86_64/primary_db                                                                                                             | 3.8 MB  00:00:38
updates/x86_64/other_db        FAILED                                          ======-                                              ]  73 kB/s |  35 MB  00:31:24 ETA
http://mirrors.163.com/centos/7/updates/x86_64/repodata/8e368904558f0e2e727def3f0e0a3184ca377905a56c132f4dce6f16827e6b20-other.sqlite.bz2: [Errno 12] Timeout on http://mirrors.163.com/centos/7/updates/x86_64/repodata/8e368904558f0e2e727def3f0e0a3184ca377905a56c132f4dce6f16827e6b20-other.sqlite.bz2: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
正在尝试其它镜像。
(14/15): updates/x86_64/other_db                                                                                                               |  44 MB  00:07:46
(15/15): gitlab-ce/filelists_db                                                                                                                | 102 MB  00:14:04
Loading mirror speeds from cached hostfile
元数据缓存已建立

## 通过yum安装

[git@localhost ~]$ sudo yum install gitlab-ce
[sudo] password for git:
已加载插件:fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with Subscription Management. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
正在解决依赖关系
--> 正在检查事务
---> 软件包 gitlab-ce.x86_64.0.8.17.4-ce.0.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

======================================================================================================================================================================
 Package                                架构                                版本                                         源                                      大小
======================================================================================================================================================================
正在安装:
 gitlab-ce                              x86_64                              8.17.4-ce.0.el7                              gitlab-ce                              258 M

事务概要
======================================================================================================================================================================
安装  1 软件包

总下载量:258 M
安装大小:797 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for gitlab-ce
gitlab-ce-8.17.4-ce.0.el7.x86_ FAILED                                          =============================                        ]  105 B/s | 152 MB 292:33:17 ETA
http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-8.17.4-ce.0.el7.x86_64.rpm: [Errno 12] Timeout on http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-8.17.4-ce.0.el7.x86_64.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
正在尝试其它镜像。
gitlab-ce-8.17.4-ce.0.el7.x86_64.rpm                                                                                                           | 258 MB  00:09:14
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : gitlab-ce-8.17.4-ce.0.el7.x86_64                                                                                                                  1/1


       *.                  *.
      ***                 ***
     *****               *****
    .******             *******
    ********            ********
   ,,,,,,,,,***********,,,,,,,,,
  ,,,,,,,,,,,*********,,,,,,,,,,,
  .,,,,,,,,,,,*******,,,,,,,,,,,,
      ,,,,,,,,,*****,,,,,,,,,.
         ,,,,,,,****,,,,,,
            .,,,***,,,,
                ,*,.

     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ `/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/


gitlab: Thank you for installing GitLab!
gitlab: To configure and start GitLab, RUN THE FOLLOWING COMMAND:

sudo gitlab-ctl reconfigure

gitlab: GitLab should be reachable at http://bogon
gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
gitlab: And running reconfigure again.
gitlab:
gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme
gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
gitlab:

gitlab: GitLab now ships with a newer version of PostgreSQL (9.6.1), and will be used
gitlab: as the default in the next major release. To upgrade, RUN THE FOLLOWING COMMANDS:

sudo gitlab-ctl pg-upgrade

gitlab: For more details, please see:
gitlab: https://docs.gitlab.com/omnibus/settings/database.html#upgrade-packaged-postgresql-server
gitlab:
It looks like GitLab has not been configured yet; skipping the upgrade script.
  验证中      : gitlab-ce-8.17.4-ce.0.el7.x86_64                                                                                                                  1/1

已安装:
  gitlab-ce.x86_64 0:8.17.4-ce.0.el7

完毕!

## 安装遇到故障了,原因正是因为使用了git用户按照,因为gitlab默认要简历的用户是git,组也是git,已经有重名的用户了就回报错,需要修正下配置文件里面的默认用户名

#user['username'] = "gitlab"
#user['group'] = "gitlab"

[git@localhost ~]$ sudo vi  /etc/gitlab/gitlab.rb
[sudo] password for git:
[git@localhost ~]$ sudo gitlab-ctl reconfigure
Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
  - package (0.0.0)
  - runit (0.14.2)
  - gitlab (0.0.1)
Installing Cookbook Gems:

Running handlers:
Running handlers complete
Chef Client finished, 230/340 resources updated in 02 minutes 31 seconds
gitlab Reconfigured!
[git@localhost ~]$ cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
8.17.4

[git@localhost ~]$ mkdir zhc_convert
[git@localhost ~]$ mv zhc_convert zhs_convert
[git@localhost ~]$ cd zhs_convert/
[git@localhost zhs_convert]$ git clone https://gitlab.com/larryli/gitlab.git
正克隆到 'gitlab'...
remote: Counting objects: 261883, done.
remote: Compressing objects: 100% (54254/54254), done.
接收对象中: 100% (261883/261883), 121.93 MiB | 148.00 KiB/s, done.
remote: Total 261883 (delta 204218), reused 261832 (delta 204179)
处理 delta 中: 100% (204218/204218), done.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

贤时间

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值