Installation gitlab-ce-15.7.2 on Redhat 8.4

一、Installation gitlab-ce-15.7.2 on Redhat 8.4

地址

下载

###
mkdir cd /opt/software && cd /opt/software

### 
wget https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/8/gitlab-ce-15.7.2-ce.0.el8.x86_64.rpm/download.rpm -O gitlab-ce-15.7.2-ce.0.el8.x86_64.rpm

###
dnf localinstall -y /opt/software/gitlab-ce-15.7.2-ce.0.el8.x86_64.rpm

 

配置文件

###
[root@xyz ~]# cp /etc/gitlab/gitlab.rb /etc/gitlab/gitlab.rb.bak
[root@xyz ~]# grep -n '^[a-Z]' /etc/gitlab/gitlab.rb 

32:external_url 'http://gitlab.iyuyi.xyz'    ## 访问路径

85:gitlab_rails['smtp_enable'] = true
86:gitlab_rails['smtp_address'] = "smtp.163.com"
87:gitlab_rails['smtp_port'] = 465
88:gitlab_rails['smtp_user_name'] = "iyuyixzy@163.com"
89:gitlab_rails['smtp_password'] = "HOOEVRLOJJYXGTMAQ"   ## 你的授权密码
90:gitlab_rails['smtp_domain'] = "163.com"
91:gitlab_rails['smtp_authentication'] = "login"
92:gitlab_rails['smtp_enable_starttls_auto'] = true
93:gitlab_rails['smtp_tls'] = true

105:gitlab_rails['gitlab_email_enabled'] = true
109:gitlab_rails['gitlab_email_from'] = 'iyuyixyz@163.com'   ## 配置发件人
110:gitlab_rails['gitlab_email_display_name'] = 'gitlab-iyuyixyz'

2014:prometheus['enable'] = false           ## 关闭插件
2015:prometheus['monitor_kubernetes'] = false
2097:alertmanager['enable'] = false
2120:node_exporter['enable'] = false
2144:redis_exporter['enable'] = false
2167:postgres_exporter['enable'] = false
2238:prometheus_monitoring['enable'] = false
2245:grafana['enable'] = false

 

启动

### 启动后可以查看用户和密码
[root@xyz ~]# gitlab-ctl reconfigure
.....
Running handlers:
[2023-03-14T16:29:28+08:00] INFO: Running report handlers
Running handlers complete
[2023-03-14T16:29:29+08:00] INFO: Report handlers complete
Infra Phase complete, 423/1070 resources updated in 06 minutes 40 seconds

Notes:
Default admin account has been configured with following details:
Username: root
Password: You didn t opt-in to print initial root password to STDOUT.
Password stored to /etc/gitlab/initial_root_password. This file will be cleaned up in first reconfigure run after 24 hours.

NOTE: Because these credentials might be present in your log files in plain text, it is highly recommended to reset the password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.

gitlab Reconfigured!

###
[root@xyz ~]# gitlab-ctl status
run: gitaly: (pid 4848) 826s; run: log: (pid 3043) 1174s
run: gitlab-kas: (pid 4487) 835s; run: log: (pid 3312) 1142s
run: gitlab-workhorse: (pid 4502) 835s; run: log: (pid 3485) 942s
run: logrotate: (pid 2969) 1200s; run: log: (pid 2978) 1196s
run: nginx: (pid 3507) 935s; run: log: (pid 3517) 933s
run: postgresql: (pid 3101) 1157s; run: log: (pid 3189) 1153s
run: puma: (pid 3419) 969s; run: log: (pid 3427) 966s
run: redis: (pid 3005) 1189s; run: log: (pid 3014) 1186s
run: sidekiq: (pid 3436) 958s; run: log: (pid 3447) 954s

###
gitlab-ctl start
gitlab-ctl stop
gitlab-ctl restart

### 日志
gitlab-ctl tail

 

配置域名解析,即可访问成功

###
C:\Windows\System32\drivers\etc\hosts
10.0.1.72 gitlab.iyuyi.xyz

###
cat > /etc/hosts << EOF
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
172.12.1.3 Base
172.12.1.4 db
172.12.1.35 docker
172.12.1.35 manage
172.12.1.71 web01
172.12.1.72 web02 gitlab.iyuyi.xyz
EOF

 

查看用户和密码

 

 

posted @ 2023-03-14 17:01  娇小赤雅  阅读(83)  评论(0编辑  收藏  举报