Linux(centos7)搭建gitlab
- 2019 年 10 月 6 日
- 筆記
Linux(centos7)搭建gitlab
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_37618797/article/details/91350289
1.下载gitlab的安装包
官网:
https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-10.8.2-ce.0.el7.x86_64.rpm

网盘:https://pan.baidu.com/s/1V9ntuFsfZA5e0cnqje_8Og 提取码:jeb8
2.利用文件上传工具将安装包上传到linux
3.进入到安装包所在目录,执行以下命令
1.yum install -y curl policycoreutils-python openssh-server cronie
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-12.3.0-ce.0.el7.x86_64.rpm/download.rpm
2.rpm -ivh /opt/gitlab-ce-10.8.2-ce.0.el7.x86_64.rpm
rpm -ivh /data/ gitlab-ce-12.3.0-ce.0.el7.x86_64.rpm
(3.lokkit -s http -s ssh
- 若报-bash: lokkit: 未找到命令,则执行 yum install lokkit
- 如报ERROR: FirewallD is active, please use firewall-cmd.,则执行systemctl stop firewalld) 以上是iptables防火墙
service stop iptables sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld
4.yum install postfix
5.service postfix start
6.chkconfig postfix on
(curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash sudo EXTERNAL_URL="http://gitlab.example.com" yum -y install gitlab-ce)以上是yum 安装
8.gitlab-ctl reconfigure(这个过程时间比较长)
9.gitlab-ctl start
10.浏览器访问ip地址 http://192.168.131.130

11.设置root的密码
12.登录

13.进入gitlab主页

gitlab服务操作
初始化配置gitlab
- gitlab-ctl reconfigure
启动gitlab
- gitlab-ctl start
停止gitlab
- gitlab-ctl stop