CentOS 7.4 安装部署 Gitlab 11.1.4 环境

7 篇文章 0 订阅

1、安装及配置依赖项:
    a)yum install curl policycoreutils-python openssh-server openssh-clients postfix

 

 
  1. [root@izuf6j9tjuw2zd5wodwiztz ~]# yum install curl policycoreutils-python openssh-server openssh-clients postfix
  2. Loaded plugins: fastestmirror
  3. Loading mirror speeds from cached hostfile
  4. Package curl-7.29.0-46.el7.x86_64 already installed and latest version
  5. Package 2:postfix-2.10.1-6.el7.x86_64 already installed and latest version
  6. Resolving Dependencies
  7. --> Running transaction check
  8. ---> Package policycoreutils-python.x86_64 0:2.5-22.el7 will be installed
  9. --> Processing Dependency: setools-libs >= 3.3.8-2 for package: policycoreutils-python-2.5-22.el7.x86_64
  10. --> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-22.el7.x86_64
  11. --> Running transaction check
  12. ---> Package audit-libs-python.x86_64 0:2.8.1-3.el7 will be installed
  13. ---> Package setools-libs.x86_64 0:3.3.8-2.el7 will be installed
  14. --> Finished Dependency Resolution
  15.  
  16. Dependencies Resolved
  17.  
  18. ===========================================================================================================================================================================
  19. Package Arch Version Repository Size
  20. ===========================================================================================================================================================================
  21. Installing:
  22. policycoreutils-python x86_64 2.5-22.el7 base 454 k
  23. Installing for dependencies:
  24. audit-libs-python x86_64 2.8.1-3.el7 base 75 k
  25. setools-libs x86_64 3.3.8-2.el7 base 619 k
  26.  
  27. Transaction Summary
  28. ===========================================================================================================================================================================
  29. Install 1 Package (+6 Dependent packages)
  30.  
  31. Total download size: 1.6 M
  32. Installed size: 5.3 M
  33. Is this ok [y/d/N]: y
  34. Downloading packages:
  35. (1/7): audit-libs-python-2.8.1-3.el7.x86_64.rpm | 75 kB 00:00:00
  36. (7/7): setools-libs-3.3.8-2.el7.x86_64.rpm | 619 kB 00:00:00
  37. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  38. Total 9.8 MB/s | 1.6 MB 00:00:00
  39. Running transaction check
  40. Running transaction test
  41. Transaction test succeeded
  42. Running transaction
  43. Installing : checkpolicy-2.5-6.el7.x86_64 1/7
  44. Installing : audit-libs-python-2.8.1-3.el7.x86_64 2/7
  45. Installing : python-IPy-0.75-6.el7.noarch 3/7
  46. Installing : libsemanage-python-2.5-11.el7.x86_64 5/7
  47. Verifying : audit-libs-python-2.8.1-3.el7.x86_64 6/7
  48. Verifying : checkpolicy-2.5-6.el7.x86_64 7/7
  49.  
  50. Installed:
  51. policycoreutils-python.x86_64 0:2.5-22.el7
  52.  
  53. Dependency Installed:
  54. audit-libs-python.x86_64 0:2.8.1-3.el7 checkpolicy.x86_64 0:2.5-6.el7 libcgroup.x86_64 0:0.41-15.el7 libsemanage-python.x86_64 0:2.5-11.el7
  55. python-IPy.noarch 0:0.75-6.el7 setools-libs.x86_64 0:3.3.8-2.el7
  56.  
  57. Complete!

    b)编辑Postfix配置文件(/etc/postfix/main.cf)中的参数“inet_protocols = all” 为 “inet_protocols = ipv4” 保存退出

 
  1. # Enable IPv4, and IPv6 if supported
  2. inet_protocols = ipv4

    c)systemctl enable postfix && systemctl start postfix

 
  1. [root@izuf6j9tjuw2zd5wodwiztz ~]# systemctl enable postfix && systemctl start postfix

2、下载Gitlab程序

 
  1. [root@izuf6j9tjuw2zd5wodwiztz ~]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.1.4-ce.0.el7.x86_64.rpm
  2. --2018-08-20 15:29:43-- https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.1.4-ce.0.el7.x86_64.rpm
  3. Resolving mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.8.193, 2402:f000:1:408:8100::1
  4. Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.8.193|:443... connected.
  5. HTTP request sent, awaiting response... 200 OK
  6. Length: 441423852 (421M) [application/x-redhat-package-manager]
  7. Saving to: ‘gitlab-ce-11.1.4-ce.0.el7.x86_64.rpm’
  8.  
  9. 100%[=================================================================================================================================>] 441,423,852 23.9MB/s in 17s
  10.  
  11. 2018-08-20 15:30:02 (25.0 MB/s) - ‘gitlab-ce-11.1.4-ce.0.el7.x86_64.rpm’ saved [441423852/441423852]
  12.  
  13. [root@izuf6j9tjuw2zd5wodwiztz ~]# ll
  14. total 431084
  15. -rw-r--r-- 1 root root 441423852 Aug 1 05:41 gitlab-ce-11.1.4-ce.0.el7.x86_64.rpm

3、安装Gitlab程序:rpm -ivh gitlab-ce-11.1.4-ce.0.el7.x86_64.rpm

 
  1. [root@izuf6j9tjuw2zd5wodwiztz ~]# rpm -ivh gitlab-ce-11.1.4-ce.0.el7.x86_64.rpm
  2. warning: gitlab-ce-11.1.4-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.1.4-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. / ____(_) /_/ / ____ _/ /_
  25. / / __/ / __/ / / __ `/ __ \
  26. / /_/ / / /_/ /___/ /_/ / /_/ /
  27. \____/_/\__/_____/\__,_/_.___/
  28.  
  29.  
  30. Thank you for installing GitLab!
  31. GitLab was unable to detect a valid hostname for your instance.
  32. Please configure a URL for your GitLab instance by setting `external_url`
  33. configuration in /etc/gitlab/gitlab.rb file.
  34. Then, you can start your GitLab instance by running the following command:
  35. sudo gitlab-ctl reconfigure
  36.  
  37. For a comprehensive list of configuration options please see the Omnibus GitLab readme
  38. https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

4、编辑Gitlab配置文件(/etc/gitlab/gitlab.rb)定义访问地址参数external_url

 
  1. ## GitLab URL
  2. ##! URL on which GitLab will be reachable.
  3. ##! For more details on configuring external_url see:
  4. ##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
  5. external_url 'http://gitlab.ityww.cn'

5、重载Gitlab配置文件:gitlab-ctl reconfigure

 
  1. Running handlers:
  2. Running handlers complete
  3. Chef Client finished, 429/613 resources updated in 02 minutes 35 seconds
  4. gitlab Reconfigured!
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值