网站首页 > 教程文章 正文
安装依赖:
yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel
下载git安装包:
wget https://www.kernel.org/pub/software/scm/git/git-2.9.0.tar.gz
解压安装:
tar -zxvf git-2.9.0.tar.gz cd git-2.9.0 make prefix=/usr/local all
编译时出现如下异常:
libgit.a(utf8.o): In function `reencode_string_iconv': /root/git-2.9.0/utf8.c:463: undefined reference to `libiconv' libgit.a(utf8.o): In function `reencode_string_len': /root/git-2.9.0/utf8.c:502: undefined reference to `libiconv_open' /root/git-2.9.0/utf8.c:521: undefined reference to `libiconv_close' /root/git-2.9.0/utf8.c:515: undefined reference to `libiconv_open' collect2: ld 返回 1 make: *** [git-credential-store] 错误 1
下载并安装libiconv
cd .. wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz tar -zxvf libiconv-1.14.tar.gz cd libiconv-1.14 ./configure --prefix=/usr/local/libiconv && make && make install
返回git在此编译安装
cd ../git-2.9.0 make clean ./configure --prefix=/usr/local --with-iconv=/usr/local/libiconv/ make install
查看安装是否正确及安装的版本:
# git --version git version 2.9.0
此时说明git已经安装成功
更新源,参考:https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/
vi /etc/yum.repos.d/gitlab-ce.repo
添加如下内容
[gitlab-ce] name=gitlab-ce baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6 repo_gpgcheck=0 gpgcheck=0 enabled=1 gpgkey=https://packages.gitlab.com/gpg.key
执行
sudo yum makecache sudo yum install gitlab-ce
安装成功后修改配置文件,修改访问url等
编辑/etc/gitlab/gitlab.rb,将其修改为你的ip和url如:
external_url "http://你的ip/gitlab"
修改后运行
sudo gitlab-ctl reconfigure sudo gitlab-ctl restart
参考:
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/configuration.md
最后通过:http://你的ip/gitlab,看能否正常运行。初次运行时需要重置root用户密码。
更多帮助信息见:
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
- 上一篇: 作为前端你必须要会的CICD_前端 cicd
- 下一篇: gitlab代码管理工具好用吗?怎么下载?
猜你喜欢
- 2025-10-08 从0到1,Docker安装中文版Gitlab服务端
- 2025-10-08 Centos下安装gitlab_centos下安装gcc
- 2025-10-08 私有化部署代码仓库 GitLab:从介绍到实践
- 2025-10-08 再见Github和码云!基于Linux安装私有化部署GitLab代码仓库
- 2025-10-08 gitlab代码管理工具好用吗?怎么下载?
- 2025-10-08 作为前端你必须要会的CICD_前端 cicd
- 2025-10-08 宝塔GitLab的安装踩坑_宝塔安装gitea
- 2025-10-08 CentOS安装部署GitLab服务器_centos如何安装git
- 2025-10-08 如何在CentOS7上搭建自己的GitLab仓库
- 2025-10-08 搭建gitlab自定义域名_gitlab定制
- 最近发表
- 标签列表
-
- location.href (44)
- document.ready (36)
- git checkout -b (34)
- 跃点数 (35)
- 阿里云镜像地址 (33)
- qt qmessagebox (36)
- mybatis plus page (35)
- vue @scroll (38)
- 堆栈区别 (33)
- 什么是容器 (33)
- sha1 md5 (33)
- navicat导出数据 (34)
- 阿里云acp考试 (33)
- 阿里云 nacos (34)
- redhat官网下载镜像 (36)
- srs服务器 (33)
- pico开发者 (33)
- https的端口号 (34)
- vscode更改主题 (35)
- 阿里云资源池 (34)
- os.path.join (33)
- redis aof rdb 区别 (33)
- 302跳转 (33)
- http method (35)
- js array splice (33)