当前位置:   article > 正文

Gitlab(1):安装和配置_service[gitaly] action nothing (skipped due to act

service[gitaly] action nothing (skipped due to action :nothing)

一、安装Gitlab目的

Gitlab是一款项目管理,多人协同工作的管理工具,可以极大提高项目编码的开发。而且分支管理清晰,对于整体项目的清晰开发具有极大的帮助。

二、Linux下的安装

1.环境:

阿里云:Centos7.4

2.下载

(1)位置

CentOS7下载网址

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

CentOS6下载网址

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/

(2)使用wget下载11.0.6版本

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.0.6-ce.0.el7.x86_64.rpm

3.安装

(1)添加依赖

  1. //10.x以后开始依赖policycoreutils-python
  2. yum install -y curl openssh-server openssh-clients postfix cronie policycoreutils-python

(2)设置postfix开机自启,并启动,postfix支持gitlab发信功能

  1. systemctl start postfix
  2. systemctl enable postfix

(3)安装gitlab,进入下载目录

  1. [root@hadoop02 software]# rpm -ivh gitlab-ce-11.0.6-ce.0.el7.x86_64.rpm
  2. warning: gitlab-ce-11.0.6-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
  3. Preparing... ################################# [100%]
  4. Updating / installing...
  5. 1:gitlab-ce-11.0.6-ce.0.el7 ################################# [100%]
  6. It looks like GitLab has not been configured yet; skipping the upgrade script.
  7. *. *.
  8. *** ***
  9. ***** *****
  10. .****** *******
  11. ******** ********
  12. ,,,,,,,,,***********,,,,,,,,,
  13. ,,,,,,,,,,,*********,,,,,,,,,,,
  14. .,,,,,,,,,,,*******,,,,,,,,,,,,
  15. ,,,,,,,,,*****,,,,,,,,,.
  16. ,,,,,,,****,,,,,,
  17. .,,,***,,,,
  18. ,*,.
  19. _______ __ __ __
  20. / ____(_) /_/ / ____ _/ /_
  21. / / __/ / __/ / / __ `/ __ \
  22. / /_/ / / /_/ /___/ /_/ / /_/ /
  23. \____/_/\__/_____/\__,_/_.___/
  24. Thank you for installing GitLab!
  25. GitLab was unable to detect a valid hostname for your instance.
  26. Please configure a URL for your GitLab instance by setting `external_url`
  27. configuration in /etc/gitlab/gitlab.rb file.
  28. Then, you can start your GitLab instance by running the following command:
  29. sudo gitlab-ctl reconfigure
  30. For a comprehensive list of configuration options please see the Omnibus GitLab readme
  31. https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

注意可能会报错:

  1. [root@hadoop softwares]# rpm -ivh gitlab-ce-11.0.6-ce.0.el7.x86_64.rpm 
  2. warning: gitlab-ce-11.0.6-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
  3. error: Failed dependencies:
  4.         policycoreutils-python is needed by gitlab-ce-11.0.6-ce.0.el7.x86_64

原因:纯净Linux缺少依赖,所以安装:

yum install policycoreutils-python

4.配置/etc/gitlab/gitlab.rb

  1. vim /etc/gitlab/gitlab.rb
  2. 修改,注意不需要添加端口
  3. external_url 'http://ip'

5.重置并启动GitLab

(1)重置配置,并安装数据库,初始化信息,时间较长【需要运行一段时间】

  1. gitlab-ctl reconfigure
  2. 结果:
  3. ...
  4. action touch (skipped due to only_if)
  5. * service[postgres-exporter] action nothing (skipped due to action :nothing)
  6. * template[/var/opt/gitlab/postgres-exporter/queries.yaml] action create (up to date)
  7. Recipe: gitlab::deprecate-skip-auto-migrations
  8. * file[/etc/gitlab/skip-auto-reconfigure] action create (skipped due to only_if)
  9. * ruby_block[skip-auto-migrations deprecation] action run (skipped due to only_if)
  10. Running handlers:
  11. Running handlers complete
  12. Chef Client finished, 2/553 resources updated in 01 minutes 39 seconds
  13. gitlab Reconfigured!

(2)启动

  1. gitlab-ctl restart
  2. 结果
  3. [root@hadoop ~]# gitlab-ctl restart
  4. /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:684: warning: Insecure world writable dir /opt/modules in PATH, mode 040777
  5. ok: run: alertmanager: (pid 22871) 0s
  6. ok: run: gitaly: (pid 22878) 1s
  7. ok: run: gitlab-monitor: (pid 22890) 0s
  8. ok: run: gitlab-workhorse: (pid 22893) 0s
  9. ok: run: logrotate: (pid 22901) 0s
  10. ok: run: nginx: (pid 22907) 0s
  11. ok: run: node-exporter: (pid 22913) 0s
  12. ok: run: postgres-exporter: (pid 22917) 0s
  13. ok: run: postgresql: (pid 22926) 0s
  14. ok: run: prometheus: (pid 22929) 0s
  15. ok: run: redis: (pid 22939) 0s
  16. ok: run: redis-exporter: (pid 22943) 0s
  17. ok: run: sidekiq: (pid 22950) 0s
  18. ok: run: unicorn: (pid 23002) 0s

6.访问 GitLab页面

(1)访问

http://ip

(2)确认root用户密码

确认密码,输入密码

 

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/461237
推荐阅读
相关标签
  

闽ICP备14008679号