`
chenhua_1984
  • 浏览: 1234945 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

centos7 安装gitlab

阅读更多

第一步 yum安装依赖

sudo yum install curl policycoreutils openssh-server openssh-clients
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix

# 根据环境运行
# sudo firewall-cmd --permanent --add-service=http
# sudo systemctl reload firewalld

PS: 我在安装的时候发现,缺少firewalld服务, 为了与官方的要求一致,我又通过yum安装了 firewalld服务

sudo yum install firewalld
sudo systemctl start firewalld
firewall-cmd --permanent --add-service
sudo systemctl reload firewalld

第二步 下载安装gitlab package

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce

如果脚本无法运行, 可以直接下载下来

curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-0.el7.x86_64.rpm/download
rpm -i gitlab-ce-XXX.rpm

第三步 配置gitlab

sudo gitlab-ctl reconfigure

第四步 启动

sudo gitlab-ctl start

PS: centos7 防火墙 允许80端口

sudo firewall-cmd --permanent --zone=public --add-port=80/tcp

访问:http://xxx.xxx.xxx.xxx
会提示你管理员账号密码重置
管理员用户名默认为 root


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics