centos7 Gitlab搭建
centos7 Gitlab搭建
1.安装依赖包
yum install -y curl policycoreutils-pythonopenssh-server
出现以下 证明成功
2.将SSH服务设置成开机自启动
systemctl enable sshd
3.启动SSH服务
systemctl start sshd
4.添加http服务到firewalld,pemmanent表示永久生效,若不加--permanent系统下次启动后就会失效
systemctl start firewalld
firewall-cmd --permanent --add-service=http
5.添加gitlab镜像
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
6.安装gitlab
rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
出现以下错误 缺少gitlab的依赖项
7.再次输入命令
yum install policycoreutils-python
rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
出现 以下证明成功
8.修改gitlab配置文件指定服务器ip和自定义端口:
vim /etc/gitlab/gitlab.rb
9.重置并启动GitLab
执行:
gitlab-ctl reconfigure
要等一会
然后输入
gitlab-ctl restart
10.访问
注意如果是虚拟机 内存要大于2G
初始账户: root 密码:5iveL!fe
首次登陆需要重置密码
选择 想要的操作
小鬼 快点过来抱了~