学海无涯
go,go,go

gitlab的安装

安装依赖
yum install -y curl policycoreutils-python openssh-server

上传安装包执行命令安装
rpm -ivh gitlab-ce-11.8.10-ce.0.el6.x86_64.rpm
[root@centos7 tools]# rpm -ivh gitlab-ce-11.8.10-ce.0.el6.x86_64.rpm 
warning: gitlab-ce-11.8.10-ce.0.el6.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:gitlab-ce-11.8.10-ce.0.el6       ################################# [100%]
It looks like GitLab has not been configured yet; skipping the upgrade script.

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


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

Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
  sudo gitlab-ctl reconfigure

For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

修改访问地址为自己的ip
执行修改命令
sed -ri 's@http://gitlab.example.com@http://192.168.2.130@g' /etc/gitlab/gitlab.rb

重新加载配置
gitlab-ctl reconfigure


查看gitlab服务运行状态命令
gitlab-ctl status
[root@centos7 tools]# gitlab-ctl status
run: alertmanager: (pid 16806) 102s; run: log: (pid 16544) 140s
run: gitaly: (pid 16661) 107s; run: log: (pid 15713) 272s
run: gitlab-monitor: (pid 16712) 106s; run: log: (pid 16354) 160s
run: gitlab-workhorse: (pid 16679) 107s; run: log: (pid 16210) 183s
run: logrotate: (pid 16260) 173s; run: log: (pid 16283) 170s
run: nginx: (pid 16228) 179s; run: log: (pid 16250) 176s
run: node-exporter: (pid 16692) 106s; run: log: (pid 16330) 166s
run: postgres-exporter: (pid 16860) 102s; run: log: (pid 16588) 134s
run: postgresql: (pid 15860) 264s; run: log: (pid 15877) 260s
run: prometheus: (pid 16734) 105s; run: log: (pid 16497) 146s
run: redis: (pid 15644) 281s; run: log: (pid 15662) 278s
run: redis-exporter: (pid 16722) 105s; run: log: (pid 16455) 152s
run: sidekiq: (pid 16153) 191s; run: log: (pid 16175) 188s
run: unicorn: (pid 16101) 197s; run: log: (pid 16127) 196s
汉化
汉化之前做备份
mkdir -p /app/bak

备份
[root@centos7 opt]#  cp -r /opt/gitlab/embedded/service/gitlab-rails/* /app/bak/

上传汉化包并解压
tar -xf gitlab-11-8-stable-zh.tar.gz

对gitlab做汉化
[root@centos7 tools]#  \cp -rf gitlab-11-8-stable-zh/* /opt/gitlab/embedded/service/gitlab-rails/
cp: cannot overwrite non-directory ‘/opt/gitlab/embedded/service/gitlab-rails/log’ with directory ‘gitlab-11-8-stable-zh/log’
cp: cannot overwrite non-directory ‘/opt/gitlab/embedded/service/gitlab-rails/tmp’ with directory ‘gitlab-11-8-stable-zh/tmp’

重新配置gitlab
gitlab-ctl reconfigure

重启gitlab
gitlab-ctl restart
赞(0) 打赏
未经允许不得转载:YYQ运维技术博客_运维的工作学习之路 » gitlab的安装
分享到: 更多 (0)

相关推荐

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

运维devops

联系我们关于本博客

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏