gitlab部署
目录
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,密码为自己刚刚设置得密码
主页图如下
菜单如下
管理页面
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~