1:安装部署gitlab服务器
注意:虚拟机内存
下载gitlab镜像
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.9.9-ce.0.el7.x86_64.rpm
安装时会报错,需要安装policycoreutils-python
yum install -y policycoreutils-python
再次安装
rpm -ivh gitlab-ce-11.9.9-ce.0.el7.x86_64.rpm
修改gitlab配置文件指定服务器ip和自定义端口:(默认是8080端口)
vim /etc/gitlab/gitlab.rb
13 external_url 'http://localhost'
重置并启动Gitlab
gitlab-ctl reconfigure (时间会久一点点)
gitlab-ctl restartgitlab-ctl status | wc -l
浏览器访问http://172.25.65.15
注意防火墙要关闭
设置密码(不少于八位)
redhatredhatredhat
注册登陆
行过ssh-key认证
物理机: ssh-keygen
ssh-copy-id server1
cat .ssh/id_rsa.pub
创建项目demo
2:编译安装git
安装编译环境
yum install gcc
yum install gcc-c++
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker
下载源码
wget https://www.kernel.org/pub/software/scm/git/git-2.15.1.tar.gz
解压文件
[root@server1 ~]# ls
2019 gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
anaconda-ks.cfg gitlab-ce-9.4.3-ce.0.el7.x86_64.rpm
git-2.15.1.tar.gz
[root@server1 ~]# tar zxvf git-2.15.1.tar.gz
[root@server1 ~]# cd git-2.15.1/
[root@server1 git-2.15.1]# ls
编译 安装
[root@server1 git-2.15.1]# ./configure --prefix=/usr/local/git-2.15.1 && make install