https://about.gitlab.com/downloads/#centos7 国内镜像: 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/el7 repo_gpgcheck=0 gpgcheck=0 enabled=1 gpgkey=https://packages.gitlab.com/gpg.key sudo yum makecache sudo yum install gitlab-ce vi /etc/gitlab/gitlab.rb external_url 'http://localhost' 修改为自己的IP地址或域名 如external_url 'http://testgitlab' sudo gitlab-ctl reconfigure 在浏览器中访问http://testgitlab/,会自动跳转到root账户密码重置页面,输入新密码,登陆
Docker方式安装: docker pull gitlab/gitlab-ce docker run -d -p 443:443 -p 8088:8088 -p 222:22 --name gitlab --restart always -v /home/gitlab/config:/etc/gitlab -v /home/gitlab/logs:/var/log/gitlab -v /home/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce vi /home/gitlab/config/gitlab.rb external_url 'http://192.168.37.142:8088/' 宿主机端口和内部端口要一致,否则可能出现502错误 netstat -ntpl | grep 8088