Gitlab安装及使用

官方的安装文档,参考https://about.gitlab.com/installation/#centos-7

防火墙中打开HTTP和SSH的通道

sudo yum install -y curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld

使用postfix发送通知邮件

sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix

添加gitlab仓库并安装到服务器

curl -sS http://packages.gitlab.cc/install/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce

启动GitLab

sudo gitlab-ctl reconfigure

使用浏览器访问GitLab

浏览器输入服务器的公网ip,首次访问GitLab,系统会让你重新设置管理员的密码,设置成功后会返回登录界面.默认的管理员账号是root,如果你想更改默认管理员账号,请输入上面设置的新密码登录系统后修改帐号名

Attention:

Gitlab 分为 社区版 (gitlab-ce) 与 企业版 (gitlab-ee),社区版免费,企业版收费,两个版本的区别参考官方文档:gitlab-ce VS gitlab-ee;官方网站安装文档默认是针对 gitlab-ee 进行说明的,为了避免不必要的麻烦请直接安装 gitlab-ce 版本。

posted @ 2018-08-03 16:23  Mr.peter  阅读(218)  评论(0编辑  收藏  举报