參考:http://www.javashuo.com/article/p-ssstonyj-dr.htmlhtml
http://www.javashuo.com/article/p-vcxtjknp-cs.htmlgit
gitlab安裝
指定版本gitlab10.7.3安裝
1、環境準備
操做系統:CentOS Linux release 7.3.1611 (Core)
gitlab版本: gitlab-ce-10.7.3-ce.0.el7.x86_64.rpm
2、安裝前準備
1. 安裝依賴軟件
yum -y install policycoreutils openssh-server openssh-clients postfixcentos
2.設置postfix開機自啓,並啓動,postfix支持gitlab發信功能
systemctl enable postfix && systemctl start postfix服務器
3、Gitlab安裝及配置
一、下載鏡像:
清華大學開源軟件鏡像站
centos 6系統的下載地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
centos 7系統的下載地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.7.3-ce.0.el7.x86_64.rpm
二、安裝
yum install -y gitlab-ce-10.7.3-ce.0.el7.x86_64.rpm
ssh
延伸:卸載gitlab編輯器
查看安裝包名稱
yum list install gitlab*
卸載gitlab
yum remove gitlab-ce.x86_64gitlab
查找gitlab殘餘文件post
find / -name gitlaburl
刪除殘餘文件(rm,謹慎使用)操作系統
三、修改配置文件gitlab.rb
external_url 'http://gitlab.example.com'
grep -n '^'[a-Z] /etc/gitlab/gitlab.rb
13:external_url 'http://172.16.8.200'
user["username"]="gitlab"
user["group"]="gitlab"
執行配置gitlab ,使得修改生效。
gitlab-ctl reconfigure
中止gitlab服務
gitlab-ctl stop
四、中文補丁
查看版本
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
10.7.3
yum -y install git # 已經安裝git不用再安裝了。
克隆獲取漢化版本庫
git clone https://gitlab.com/xhang/gitlab.git
查看該漢化補丁的版本
cat gitlab/VERSION
10.2.3
cd /root/gitlab/
git diff v10.0.0 v10.0.0-zh >/tmp/10.0.0-zh.diff
yum install patch -y
patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < /tmp/10.0.0-zh.diff
啓動gitlab
gitlab-ctl start
從新配置gitlab
gitlab-ctl reconfigure
五、訪問 GitLab頁面
若是沒有域名,直接輸入服務器ip和指定端口進行訪問
初始帳戶: root 密碼: 5iveL!fe
第一次登陸修改密碼
若是出現502,解決辦法以下:
https://docs.gitlab.com/omnibus/settings/unicorn.html
設置/etc/gitlab/gitlab.rb。
unicorn['worker_processes'] = 3
unicorn['worker_timeout'] = 60
運行sudo gitlab-ctl reconfigure以使更改生效。
worker_processes爲了使網頁編輯器正常工做,最低要求是2。
gitlab使用教程
http://www.javashuo.com/article/p-bdcjrhoz-dm.html
————————————————————————————
win7和gitlab創建鏈接
http://www.javashuo.com/article/p-xbtdnwrw-et.html
ssh-keygen -t rsa -C 'XXXXX@qq.com'
gitlab 倉庫存放地址
默認存放在:/var/opt/gitlab/git-data
修改默認倉庫地址
https://blog.whsir.com/post-1490.html
gitlab啓用https過程
https://blog.csdn.net/yan7895566/article/details/79310171
http://dos2unix.cn/link/389