目录
gitlab部署
安装所需得包
[root@localhost yum.repos.d]# dnf -y install epel-release git openssh-server openssh-clients postfix cronie
设置postfix开机自启
[root@localhost yum.repos.d]# systemctl enable postfix
Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service → /usr/lib/systemd/system/postfix.service.
安装gitlab
//由于版本原因要先卸载系统自带得policycoreutils包,还有安装他所依赖得policycoreutils-python
[root@localhost src]# rpm -e policycoreutils --nodeps
[root@localhost src]# rpm -ivh policycoreutils-python-2.5-34.el7.x86_64.rpm --nodeps
[root@localhost src]# rpm -ivh gitlab-ce-15.3.3-ce.0.el7.x86_64.rpm
warning: gitlab-ce-15.3.3-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.
_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __ \
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/
//修改配置文件
vim /etc/gitlab/gitlab.rb
external_url '192.168.124.138'
重启gitlab
[root@localhost src]# gitlab-ctl restart
[root@localhost src]# gitlab-ctl reconfigure
破解管理员密码
[root@localhost ~]# gitlab-rails console -e production
--------------------------------------------------------------------------------
Ruby: ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
GitLab: 15.3.3 (c629a47f87f) FOSS
GitLab Shell: 14.10.0
PostgreSQL: 13.6
------------------------------------------------------------[ booted in 18.40s ]
Loading production environment (Rails 6.1.6.1)
irb(main):001:0> user = User.where(id: 1).first
=> #<User id:1 @root>
irb(main):002:0> user.password = 'liuyang123!'
=> "liuyang123!"
irb(main):003:0> user.password_confirmation = 'liuyang123!'
=> "liuyang123!"
irb(main):004:0> user.save!
=> true
irb(main):005:0> exit
在浏览器中用服务器得ip访问,email默认为root,密码为自己刚刚设置得密码
主页图如下
菜单如下
管理页面
标签:__,部署,root,gitlab,main,rpm,localhost From: https://www.cnblogs.com/TQingS/p/16721380.html