19-[信创]-Kylin麒麟系统安装GitLab-信创_初始化

安装依赖

yum -y install openssh-server openssh-clients postfix cronie curl

下载rpm包

[root@gitlab data]# wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/8/gitlab-ce-15.4.2-ce.0.el8.x86_64.rpm/download.rpm

(其他版本的下载链接 https://packages.gitlab.com/gitlab/gitlab-ce ,注意需要下载el8版本的。)安装

[root@gitlab data]# rpm -ivh gitlab-ce-15.4.2-ce.0.el8.x86_64.rpm
warning: gitlab-ce-15.4.2-ce.0.el8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID f27eab47: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:gitlab-ce-15.4.2-ce.0.el8        ################################# [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

Help us improve the installation experience, let us know how we did with a 1 minute survey:
https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=omnibus&release=15-4

[root@gitlab data]#
vim /etc/gitlab/gitlab.rb
#修改ip
external_url 'http://192.168.1.40'


#最后加上邮箱
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.163.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "fqc0112@163.com"
gitlab_rails['smtp_password'] = "授权码"
gitlab_rails['smtp_domain'] = "163.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true
gitlab_rails['smtp_pool'] = false

user['git_user_email'] = "fqc0112@163.com"

gitlab_rails['gitlab_email_from'] = 'fqc0112@163.com'

gitlab_rails['smtp_openssl_verify_mode'] = 'none'

初始化

[root@gitlab data]# gitlab-ctl reconfigure

获取密码

[root@gitlab data]# cat /etc/gitlab/initial_root_password  | awk '/^Password/ {print $2}'
zqT2LFKzOqpbZSjgzc2IbHpk/+7Pm/LlAG0ikYC2O9o=