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