gitlab安装rpm方式

##  安装依赖

yum -y install policycoreutils openssh-server openssh-clients postfix

yum -y install policycoreutils-python

# 设置ssh开机自启并启动

systemctl enable sshd && sudo systemctl start sshd

systemctl status sshd  # 查看ssh服务

# 设置postfix开机自启并启动(有发信功能)

systemctl enable postfix && systemctl start postfix

# 下载gitlab rpm安装包并安装

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm

rpm -ivh gitlab-ce-15.2.2-ce.0.el7.x86_64.rpm

# 修改gitlab配置

vim /etc/gitlab/gitlab.rb

## 加入如下

# gitlab访问地址,可以写域名。如果端口不写的话默认为80端口

external_url 'http://主机ip(172.16.137.187)+端口(81)'

# 让配置生效

gitlab-ctl reconfigure

# 重新加载配置启动gitlab

gitlab-ctl reconfigure

gitlab-ctl restart

# 登录控制台修改初始密码

# 进入控制台

gitlab-rails console -e production

# 查询id为1的用户,id为1的用户是超级管理员

user = User.where(id:1).first

# 修改密码为lqz123456

user.password='#Ab123456'

# 保存

user.save!

# 退出

exit

# 登录gitla

http://gitlab地址

#账号 root 密码  #Ab123456

# 报错502,其中问题解决

puma['port'] = 8181  # 使用一个未使用的端口

猜你喜欢

转载自blog.csdn.net/love_THL/article/details/127431077
今日推荐