[root@gitlabdev ~]#dnf install -y curl policycoreutils openssh-server perl
[root@gitlabdev ~]#systemctl enable sshd
[root@gitlabdev ~]#systemctl start sshd
[root@gitlabdev ~]#systemctl status firewalld
[root@gitlabdev ~]#firewall-cmd --permanent --add-service=http
[root@gitlabdev ~]#firewall-cmd --permanent --add-service=https
[root@gitlabdev ~]#systemctl reload firewalld
[root@gitlabdev ~]#dnf install postfix
[root@gitlabdev ~]#systemctl enable postfix
[root@gitlabdev ~]#systemctl start postfix
[root@gitlabdev ~]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-14.0.4-ce.0.el8.x86_64.rpm
可以根据自己的系统选择不同的安装版本
清华园下载链接:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum
[root@gitlabdev ~]#rpm -Uvh gitlab-ce-14.0.4-ce.0.el8.x86_64.rpm
[root@gitlabdev ~]# vim /etc/gitlab/gitlab.rb
修改内容:external_url
后改为自己的http://ip:端口;
unicorn[‘port‘] = 28080 修改 unicorn[‘port‘] 端口;
!注意,两个端口不能一样
自动配置,并安装数据库,初始化信息,如下所示(第一次使用配置时间较长)
[root@gitlabdev ~]#gitlab-ctl reconfigure
=====================================================================================
至此系统已经启动,可在网页输入系统的IP+端口即可进入登录,初次登录要求修改root管理员密码;
在浏览器中输入 http://ip:端口/ ,然后 change password: ,并使用root用户登录 即可 (后续动作根据提示操作)
如操作太快,没有记住密码,可参看我的另一篇博客进行修改密码
修改密码链接:https://www.cnblogs.com/cndevops/p/14973118.html
=====================================================================================
[root@gitlabdev ~]#gitlab-ctl start
[root@gitlabdev ~]#gitlab-ctl reconfigure
[root@gitlabdev ~]#gitlab-ctl stop
原文:https://www.cnblogs.com/cndevops/p/14990716.html