-
git官网 about.gitlab.com
-
点击 Install GitLab
-
选择具体的系统
-
运行命令
sudo yum install -y curl policycoreutils-python openssh-server cronie sudo lokkit -s http -s ssh (打开防火墙的ssh和http) sudo yum install postfix sudo service postfix start sudo chkconfig postfix on (安装postfix发送通知邮件。如果你想使用另一个解决方案来发送电子邮件,请跳过这一步,配置外部SMTP服务器后gitlab已安装。ps:我不会跳过)
-
安装git
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash (添加gitlab封装库) sudo yum -y install gitlab-ee (安装gitlab包) sudo gitlab-ctl reconfigure (配置并启动gitlab)
注意:如果遇到问题:No more mirrors to try.(没有镜像,)
要是一开始就没有镜像,需要换yum源 ,要是开始下载了提示这个 就是说明网络不好,再多次执行 sudo yum -y install gitlab-ee )
-
启动不成功
关闭资源 释放内存sudo gitlab-ctl stop unicorn sudo gitlab-ctl stop sidekiq
-
修改配置
修改 /etc/gitlab/gitlab.rb 把 /etc/gitlab/gitlab.rb的external_url属性修改成你的ip external_url "https:192.168.0.100"(ps:本人虚拟机ip是192.168.0.100)
-
配置生效
sudo gitlab-ctl reconfigure
-
重启服务
sudo gitlab-ctl restart
-
测试
访问external_url 的属性(本人:192.168.0.100)
ps:说一下 sudo sudo命令就是让你已管理员(可以理解为root)的身份执行后边的命令
网友评论