系统版本:CentOS-7-x86_64-DVD-2009
gitlab版本:gitlab-ce-14.8.4
关闭防火墙并取消开机自启动
systemctl stop firewalld & systemctl disable firewalld
关闭SELinux(强制访问控制安全政策)并重启系统
vi /etc/sysconfig/selinux
将SELINUX改为disable
Roboot
安装gitlab及依赖
rpm -ivh net-tools-2.0-0.25.20131004git.el7.x86_64.rpm
rpm -ivh openssh-clients-7.4p1-21.el7.x86_64.rpm
rpm -ivh openssh-server-7.4p1-21.el7.x86_64.rpm
rpm -ivh libcurl-7.29.0-59.el7.x86_64.rpm
rpm -ivh libcgroup-0.41-21.el7.x86_64.rpm
rpm -ivh audit-libs-python-2.8.5-4.el7.x86_64.rpm
rpm -ivh checkpolicy-2.5-8.el7.x86_64.rpm
rpm -ivh libsemanage-python-2.5-14.el7.x86_64.rpm
rpm -ivh policycoreutils-2.5-34.el7.x86_64.rpm
rpm -ivh postfix-2.10.1-9.el7.x86_64.rpm
rpm -ivh python-IPy-0.75-6.el7.noarch.rpm
rpm -ivh setools-libs-3.3.8-4.el7.x86_64.rpm
rpm -ivh policycoreutils-python-2.5-34.el7.x86_64.rpm
rpm -ivh gitlab-ce-14.8.4-ce.0.el7.x86_64.rpm
配置服务器ip
vi /etc/gitlab/gitlab.rb
将external_url 'http://gitlab.example.com’地址修改成服务器的ip
加载配置并重启gitlab
gitlab-ctl reconfigure
gitlab-ctl restart
修改用户密码
gitlab-rails console -e production
user = User.where(id: 1).first # user就代表root用户
user=User.where(email:‘jenkins@domian.com’).first # 重置其他用户密码用此语句,修改用户邮箱查询
user.password = ‘secret_pass’ # 修改密码
user.password_confirmation = ‘secret_pass’ # 确认密码
user.save! # 保存密码
exit # 退出控制台
注意事项
1、添加远程仓库地址时需要先把原有的地址删除:
git remote rm origin
2、汉化
由于是个人使用,所以不需要修改其他东西,后面的配置再慢慢学习吧。
资源下载来这里:https://download.csdn.net/download/weixin_42744142/84995338
不需要积分即可下载