linux 设置git ip,centos7安装gitlab并更改端口IP地址
1、在防火墻里開放http跟ssh端口
yum install curl openssh-server openssh-clients postfix cronie -y ?
service postfix start ?
chkconfig postfix on ?
systemctl enable postfix
firewall-cmd --add-service=http --permanent
firewall-cmd --add-service=ssh --permanent
firewall-cmd --reload
2、添加gitlab倉庫,并安裝
curl -sS http://packages.gitlab.com.cn/install/gitlab-ce/script.rpm.sh | sudo bash
yum install gitlab-ce
3、啟動gitlab
gitlab-ctl reconfigure
在瀏覽器地址欄輸入IP地址,出現(xiàn)下圖表示啟動成功
4、修改密碼后登陸
登陸后簡單創(chuàng)建一個項目,發(fā)現(xiàn)地址不是我們的ip地址和端口是80
5、修改配置文件
vim /etc/gitlab/gitlab.rb
修改下圖這一行代碼為? http://ip地址:8888
同時修改nginx['listen_port'] = 8888,可以在命令行模式通過/listen_port查找
6、重啟
gitlab-ctl reconfigure ?
gitlab-ctl restart
7、配置防火墻,添加下面語句
配置完成后重啟防火墻,并在地址欄測試
service iptables restart
總結
以上是生活随笔為你收集整理的linux 设置git ip,centos7安装gitlab并更改端口IP地址的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 广轻室内设计实习笫几年
- 下一篇: 全屋家居设计一线品牌有哪些啊?太子是吗?