gitlab安装、汉化、完全卸载

作者: 分类: php 时间: 2018-01-18 评论: 暂无评论

[官方版]

sudo yum install -y curl policycoreutils-python openssh-server cronie
sudo lokkit -s http -s ssh
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
sudo EXTERNAL_URL="http://xx.xx.xx.xx" yum -y install gitlab-ee
sudo gitlab-ctl reconfigure 
sudo gitlab-ctl start

此方法可以更新到最新个人版10.3.3,但是汉化补丁8.8.5还没更新到最新版,所以推荐用第二种,安装指定版本
[清华大学源]

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-8.8.5-ce.1.el6.x86_64.rpm
rpm -ivh gitlab-ce-8.8.5-ce.1.el6.x86_64.rpm

[docker版本]

https://hub.docker.com/r/denghui/gitlab-ce-zh/

先安装docker..自行百度

docker pull twang2218/gitlab-ce-zh  #可能是阿里云的公共gitlab 仓库找到的镜像,忘了
docker run  --detach --restart=always  --publish 10443:443 --publish 8080:80 --publish 10022:22 --name gitlab --volume /home/gitlab/etc:/etc/gitlab --volume /home/gitlab/log:/var/log/gitlab --volume /home/gitlab/data:/var/opt/gitlab twang2218/gitlab-ce-zh
需要进入docker修改external_url 

[修改配置文件]

vim /etc/gitlab/gitlab.rb  #修改完配置需要执行 gitlab-ctl reconfigure 

external_url 'http://localhost'修改成 external_url 'http://你的gitLabIP'

sudo gitlab-ctl reconfigure

[安装最新版git]
地址 http://vocp.cn/git/17.html
[查看本地gitlab版本]

cat /opt/gitlab/embedded/service/gitlab-rails/VERSION 或者rpm -q gitlab-ee

[安装补丁]

cd ~
git clone https://gitlab.com/larryli/gitlab.git
cd  gitlab
git fetch
git branch -a
git checkout -b 8-8-stable remotes/origin/8-8-stable
git checkout -b 8-8-zh remotes/origin/8-8-zh
git diff 8-8-stable 8-8-zh > /tmp/8.8.diff
cd /opt/gitlab/embedded/service/gitlab-rails
git apply /tmp/8.8.diff  

[卸载]

sudo gitlab-ctl stop
sudo gitlab-ctl uninstall
sudo gitlab-ctl cleanse
sudo rm -rf /opt/gitlab
rpm -e gitlab-ce

[520错误]
1.内存至少要2g,太小安装完成后会返回502。可以设置下虚拟内存。
2.gitlab-ctl tail 查看错误 网上查找是权限不够问题

   chmod -R o+x /var/opt/gitlab/gitlab-rails/sockets
标签: none

订阅本站(RSS)