1.安装gitlab yum源,为一会儿yum install 做准备
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
2.安装gitlab:
sudo EXTERNAL_URL="http://gitlab.zipeiyi.corp" yum install -y gitlab-ce
3.安装完成之后有提示:
*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.
_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ \`/ __ \
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/
Thank you for installing GitLab!
GitLab should be available at http://gitlab.zipeiyi.corp
注意:这里提示我使用http://gitlab.zipeiyi.corp
这个域名访问,但是现在我还没有做好域名映射,所以先修改为通过使用ip访问
修改方式见文章后方
4.寻找安装位置
rpm -ql gitlab-ce
发现安装目录在/opt/gitlab
5.修改访问url
1.配置文件位置
cd /opt/gitlab/embedded/service/gitlab-rails/config
vim gitlab.yml
2.在这个文本内搜索你的访问url,之前安装的时候我们设定的是http://gitlab.zipeiyi.corp
修改前
## GitLab settings
gitlab:
## Web server settings (note: host is the FQDN, do not include http://)
host: gitlab.zipeiyi.corp
port: 80
https: false
修改后
## GitLab settings
gitlab:
## Web server settings (note: host is the FQDN, do not include http://)
host: 10.1.13.1
port: 80
https: false
6.访问gitlab 界面:
http://10.1.13.1
7. gitlab 重启
# Start all GitLab components
sudo gitlab-ctl start
# Stop all GitLab components
sudo gitlab-ctl stop
# Restart all GitLab components
sudo gitlab-ctl restart
网友评论