Gitlab
1、Gitlab(本地化)安装
#安装ssh,安装命令:
$ yum install -y curl policycoreutils-pythonopenssh-server
#将SSH服务设置成开机自启动,安装命令:
$ systemctl enable sshd
#启动SSH服务,安装命令:
$ systemctl start sshd
#开启防火墙,安装命令:
$ service firewalld start
#添加http服务到firewalld,pemmanent表示永久生效,若不加--permanent系统下次启动后就会失效。
$ firewall-cmd --permanent --add-service=http
#重启防火墙,安装命令:
$ systemctl reload firewalld
#接下来,安装Postfix以发送通知邮件,安装命令:
$ yum install postfix
#将postfix服务设置成开机自启动,安装命令:
$ systemctl enable postfix
#启动postfix,安装命令:
$ systemctl start postfix
#下载gitlab镜像:
$ wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ee/yum/el7/gitlab-ee-12.7.0-ee.0.el7.x86_64.rpm
#安装gitlab 安装命令:
$ rpm -i gitlab-ee-12.7.0-ee.0.el7.x86_64.rpm
#*************************************************************************************
#如果提示错误:依赖检测失败: policycoreutils-python 被 gitlab-ee-12.7.0-ee.0.el7.x86_64.rpm
#需要安装qu依赖
$ yum install policycoreutils-python
#重新安装gitlab 安装命令:
$ rpm -i gitlab-ee-12.7.0-ee.0.el7.x86_64.rpm
#*************************************************************************************
#修改gitlab配置文件指定服务器ip和自定义端口:
$ vim /etc/gitlab/gitlab.rb
#(按i编辑模式,修改添加下面内容)
#******************************************************************************
external_url 'http://localhost:8899'
unicorn['port'] = 9099
#******************************************************************************
#(添加上述内容后,按Esc键,输入:wq!回车即可保存退出vim)
#刷新配置GitLab
$ gitlab-ctl reconfigure
#重置并启动GitLab
$ gitlab-ctl restart
启动需等待数分钟在进行访问,如果没有域名,直接输入服务器ip和指定端口进行访问,然后出现设置密码界面
http://localhost:8899/users/sign_in
-
参考
https://jingyan.baidu.com/article/e52e36153d340040c70c5156.html -
坑
1、搭建git 服务器出现 Error executing actioncreate
on resource ‘user[GitLab user and group]’
https://blog.csdn.net/BigData_Mining/article/details/87801964
2、踩坑指南
http://www.moheqionglin.com/site/blogs/76/detail.html
3、使用指南
https://blog.csdn.net/justlpf/article/details/80681853
4、gitlab如何创建项目和添加成员
https://blog.csdn.net/xiasohuai/article/details/87440239
搭建git服务器端
https://blog.csdn.net/w252064/article/details/82691343 -
资源下载
清华大学开源软件镜像站
https://mirrors.tuna.tsinghua.edu.cn/