gistfile1.txt 一.gitlab安装,参考官方链接: https://about.gitlab.com/installation/#centos-7 1.安装 sudo yum install -y curl policycoreutils-python openssh-server sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cm
一.gitlab安装,参考官方链接: https://about.gitlab.com/installation/#centos-7
1.安装
sudo yum install -y curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ee
2.修改域名
参考官方链接:
https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
3.访问
在网页输入centos虚拟机的ip即可,端口默认80
192.168.161.120:80
4.修改端口号
gitlab默认是80端口,修改下面3个文件,可以很容易看到端口修改的地方,将port修改即可
vi /opt/gitlab/embedded/conf/nginx.conf
vi /var/opt/gitlab/gitlab-rails/etc/gitlab.yml
vi /var/opt/gitlab/nginx/conf/gitlab-http.conf
重启服务
gitlab-ctl restart
二.Gitlab 客户端使用
为了能使本地仓库的代码提交到gitlab上,我们还需要配置相应的域名和端口
vi /var/opt/gitlab/gitlab-rails/etc/gitlab.yml
====>将域名修改为ip
## Web server settings (note: host is the FQDN, do not include http://)
host: 192.168.161.120
port: 10010
https: false
