10.x之后开始依赖policycoreutils-python,我以前在使用9.x时尚未依赖该项 升级时会提示 rpm -Uvh gitlab-ce-10.1.0-ce.0.el7.x86_64.rpm...node
[root@linux-node1 ~]# yum -y install policycoreutils openssh-server openssh-clients postfix policycoreutils-python
[root@linux-node1 ~]# systemctl enable postfix && systemctl start postfix
centos 6系统的下载地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6 centos 7系统的下载地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
[root@linux-node1 ~]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.2.3-ce.0.el7.x86_64.rpm [root@linux-node1 ~]# rpm -ivf gitlab-ce-11.2.3-ce.0.el7.x86_64.rpm
[root@linux-node1 ~]# vim /etc/gitlab/gitlab.rb
external_url 'http://192.168.1.80' unicorn['port'] = 8890
[root@linux-node1 ~]# gitlab-ctl reconfigure #从新配置
[root@linux-node1 ~]# gitlab-ctl stop
[root@linux-node1 ~]# gitlab-ctl start
[root@linux-node1 ~]# gitlab-ctl restart
获取/修改超级管理员root的密码python
a、 切换目录:cd /opt/gitlab/binlinux
b、执行 :sudo gitlab-rails console production 命令 开始初始化密码git
c、在irb(main):001:0> 后面经过 u=User.where(id:1).first 来查找与切换帐号(User.all 能够查看全部用户)vim
d、经过u.password='12345678'设置密码为12345678(这里的密码看本身喜欢):centos
e、经过u.password_confirmation='12345678' 再次确认密码服务器
f、经过 u.save!进行保存(切记切记 后面的 !)ssh
g、若是看到上面截图中的true ,恭喜你已经成功了,执行 exit 退出当前设置流程便可。gitlab
h、回到gitlab ,能够经过 root/12345678 这一超级管理员帐号登陆了post
修改GitLab页面连接
vim /var/opt/gitlab/gitlab-rails/etc/gitlab.yml