本文共 3182 字,大约阅读时间需要 10 分钟。
https://blog.whsir.com/post-3081.htmlhttps://blog.51cto.com/lansgg/1760578http://www.showerlee.com/archives/1285https://www.cnblogs.com/weifeng1463/p/7714492.htmlssh key导入步骤2中生成的密钥文件内容
Gitlab11.0增加了两个强大的工具Auto DevOps和License Management,具体细节查看Gitlab11.0官方公告:
本文以Centos7.5为例安装Gitlab新版本11.0并汉化
1、添加gitlab源(我这里使用了清华大学的源)
vi /etc/yum.repos.d/gitlab-ce.repo[gitlab-ce]name=gitlab-cebaseurl=gpgcheck=0enabled=12、安装gitlabyum -y install openssh-server cronie git wget patch gitlab-ce-11.0.13、初始化gitlabgrep -n "^[a-Z]" /etc/gitlab/gitlab.rbexternal_url ''gitlab-ctl reconfigure4、查看服务gitlab-ctl status5、重启、停止或启动服务gitlab-ctl restart/stop/start安装完成,可以通过浏览器访问IP测试(如访问不了,请检查iptables、selinux),首次访问需要设置密码,默认帐号为root
gitlab汉化
Gitlab中文社区版地址:
1、克隆版本库
cd /usr/local/src/git clone cd /usr/local/src/git clone 2、获取当前Gitlab版本gitlab_version=$(cat /opt/gitlab/embedded/service/gitlab-rails/VERSION)gitlab_version=$(cat /opt/gitlab/embedded/service/gitlab-rails/VERSION)3、比较汉化标签和原标签,导出patch用的diff文件cd /tmp/gitlabgit clone https://gitlab.com/xhang/gitlab.git -b v10.0.2-zh cd gitlabgit diff v11.0.3 v11.0.3-zh > /tmp/11.0.3-zh.diff
cd /usr/local/src/gitlab
git diff v${gitlab_version} v${gitlab_version}-zh > ../${gitlab_version}-zh.diffFile to patch:
6、然后启动gitlabgitlab-ctl start
此时访问http://IP就是中文页面了(启动后马上打开页面可能会显示502,稍等几秒刷新就好了)7.GitLab常用命令
sudo gitlab-ctl start # 启动所有 gitlab 组件;sudo gitlab-ctl stop # 停止所有 gitlab 组件;sudo gitlab-ctl restart # 重启所有 gitlab 组件;sudo gitlab-ctl status # 查看服务状态;sudo gitlab-ctl reconfigure # 启动服务;sudo vim /etc/gitlab/gitlab.rb # 修改默认的配置文件;gitlab-rake gitlab:check SANITIZE=true --trace # 检查gitlab;sudo gitlab-ctl tail # 查看日志;8.安装git程序,因为系统自带版本太低
[root@vm1 ~]# mkdir /opt/src /opt/soft[root@vm1 src]# pwd/opt/src[root@vm1 src]# lsgit-2.6.2.tar.xz[root@vm1 src]# tar xf git-2.6.2.tar.xz [root@vm1 src]# cd git-2.6.2[root@vm1 git-2.6.2]# ./configure --prefix=/opt/soft/git --with-curl --with-expat[root@vm1 git-2.6.2]# make && make install[root@vm1 git-2.6.2]# echo 'export PATH=/opt/soft/git/bin:$PATH' >> /etc/profile [root@vm1 git-2.6.2]# source /etc/profile [root@vm1 git-2.6.2]# git --versiongit version 2.6.29.git 错误: Unable to find remote helper for 'https'解决方法
是因为 /usr/libexec/git-core/ 路径没在 PATH 环境变量中PATH=$PATH:/usr/libexec/git-core转载于:https://blog.51cto.com/szgb17/2314514