1 sudo yum install curl policycoreutils openssh-server openssh-clients 2 sudo systemctl enable sshd 3 sudo systemctl start sshd 4 sudo yum install postfix 5 sudo systemctl enable postfix 6 sudo systemctl start postfix 7 sudo firewall-cmd --permanent --add-service=http 8 curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash 9 sudo yum install gitlab-ce 10 11 mkdir -p /data/git-data 12 cp /etc/gitlab/gitlab.rb /etc/gitlab/gitlab.rb.bak 13 vi /etc/gitlab/gitlab.rb 14 修改 15 git_data_dirs({ 16 "default" => { 17 "path" => "/data/git-data" 18 } 19 }) 20 21 gitlab-ctl reconfigure
创建成功后,gitlab-ctl start 启动,会在指定的/data/git-data/下生成repository目录,里面存放代码信息
汉化步骤:
查看当前安装的gitlab-sever版本
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
下载汉化补丁:
git clone https://gitlab.com/xhang/gitlab.git
查看补丁版本:
cat gitlab/VERSION
将补丁覆盖到gitlab配置目录:
gitlab-ctl stop cp -rf /data/tools/gitlab/* /opt/gitlab/embedded/service/gitlab-rails/
删除/opt/gitlab/embedded/service/gitlab-rails/下的tmp和log软链接,重新编译生成
gitlab-ctl reconfigure
gitlab-ctl start