参考: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