以前有 SVN 作版本控管,現在則流行使用 Git。

那如果要多人使用,需要用到像 GitHub Bitbucket

但如果不要用線上的,就可以使用  GitLab 自己架設。

GitLab CE 是一個 Open Source

Code, test, and deploy together

怎麼安裝

這裡裝到的版本是  GitLab 8.7.5

安裝相關套件

# on centos6
yum install curl openssh-server openssh-clients postfix cronie -y

# on centos7
yum install curl policycoreutils openssh-server openssh-clients -y

ps : 如果你會需要用到 mail alert 功能,就要架設 mail server,如 postfix

新增 gitlab 的 yum repo

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

安裝 gitlab

yum install gitlab-ce -y

設定 gitlab,編輯 /etc/gitlab/gitlab.rb

external_url 'http://git.ssorc.tw:8888'

# 或
external_url 'http://1.1.1.1:8888'

套用且重啟動 gitlab

gitlab-ctl reconfigure

檢查狀態

lsof -i :8888
gitlab-ctl status

ps: 防火牆要打開 8888 port

瀏覽 http://git.ssorc.tw:8888

第一次登入時需要修改管理者 root 帳號的密碼

其它

# 重啟指令
gitlab-ctl restart 

# Gitlab 存放版本庫的路徑
/var/opt/gitlab/git-data/repositories/

 

Related posts 相關文章
最近要小心 GitHub 上的 POC 庫,可能是惡意程式
More...
下載 GitHub 上某個目錄
More...
這裡有 POC 可用,隨時有更新
More...
gitlab 出現 cannot unblock ldap blocked users 問題
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。