参考: http://www.21yunwei.com/archives/4351
1.首先安装准备环境:
yum install curl policycoreutils openssh-server openssh-clients
yum install policycoreutils-python -y
2.下载
gitlab包可以从https://packages.gitlab.com/gitlab/gitlab-ce 下载
3.安装
将安装包上传到服务器,使用root用户安装。
rpm -ivh gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
安装的时候遇到了问题,记录一下,解决方案:https://blog.youkuaiyun.com/qq_29307291/article/details/52170211
4.配置
修改文件: /etc/gitlab/gitlab.rb
external_url "http://git.test.com" 修改url为自己的服务器地址
默认端口为80,如果修改可以在当前文件中修改
# nginx['enable'] = true
# nginx['client_max_body_size'] = '250m'
# nginx['redirect_http_to_https'] = false
nginx['redirect_http_to_https_port'] = 10001 #修改的端口号
修改没有生效,又在nexus目录下修改
cd /var/opt/gitlab/nginx/conf
vim gitlab-http.conf
server {
listen *:80; --修改端口
5.启动
gitlab-ctl reconfigure --第一次启动和修改配置时才使用
如果不修改配置可以使用
gitlab-ctl start
gitlab-ctl stop
gitlab-ctl restart
gitlab默认用户名密码:
Username: root
Password: 5iveL!fe