centos7 使用 omnibus包安裝方式,安裝 gitlab7.4
1: gitlab是一個開源的軟件,類似於github.com那樣的git代碼管理倉庫;
官網 https://about.gitlab.com/
下載資源 :https://about.gitlab.com/downloads/archives/
安裝指南 :https://about.gitlab.com/downloads/
詳細說明:https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
2:安裝
#cent7 對應的安裝包 rpm #這里是官方的下載資源,是amazome的雲服務器,速度很慢,建議用國外的vps下載下,然后再用迅雷vip離線下載,然后下載到自己服務器上 curl -O https://downloads-packages.s3.amazonaws.com/centos-7.0.1406/gitlab-7.4.3_omnibus.5.1.0.ci-1.el7.x86_64.rpm #安裝對應的 openssh服務 yum install openssh-server #設置開機啟動 systemctl enable sshd #啟動sshd服務 systemctl start sshd 安裝對應的 postfix服務同樣設置開機啟動和啟動服務 yum install postfix systemctl enable postfix systemctl start postfix #使用rpm 源安裝,gitlab omnibus安裝包 rpm -i gitlab-7.4.3_omnibus.5.1.0.ci-1.el7.x86_64.rpm #安裝完成之后會出現complete,並提示你配置gitlab #安裝完成之后,配置gitlab gitlab-ctl reconfigure #設置服務器的防火牆允許http,和ssh服務 firewall-cmd --permanent --add-service=http #重新啟動防火牆 systemctl reload firewalld #給gitlab服務綁定域名 vim /etc/gitlab/gitlab.rb #填寫你指定的綁定域名和端口,默認是80端口 external_url 'http://www.git.com:8078' #重新啟動一下服務 gitlab-ctl restart #瀏覽器,打開綁定的域名及端口,訪問 #默認的用戶名是 root,密碼是 5iveL!fe 登陸成功之后,會修改密碼,至少8位
3: 在啟動成功之后
#執行gitlab-ctl status 查看狀態 [root@cocoaPro ~]# gitlab-ctl status run: logrotate: (pid 4177) 2536s; run: log: (pid 3528) 2959s run: nginx: (pid 4181) 2535s; run: log: (pid 3514) 2961s run: postgresql: (pid 4186) 2535s; run: log: (pid 3428) 2974s run: redis: (pid 4195) 2534s; run: log: (pid 3351) 2981s run: sidekiq: (pid 5445) 1795s; run: log: (pid 3503) 2962s run: unicorn: (pid 5538) 1764s; run: log: (pid 3481) 2963s
可以看出gitlab的框架是 nginx+postgresql+redis+sidekiq+unicorn
所以如果你的服務器有 apache httpd的服務,要避免二者都占用80端口的沖突
還有 gitlab在修改配置綁定域名和端口之后,要執行一下 gitlab-ctl reconfigure 重新配置一下gitlab服務,使之生效
最后分享一下我迅雷離線下載的資源 離線下載