CentOS安装Gitlab CE
System Version:CentOS release 6.7(Final)
GitLab Community Edition (CE)
1、进入以下链接,按操作手册进行安装
2、安装配置依赖项
sudo yum install curl openssh-server openssh-clients postfix cronie
sudo service postfix start
sudo chkconfig postfix on
sudo lokkit -s http -s ssh
备注:如已经安装过请主动飘过
3、添加Gitlab仓库,并安装Gitlab软件包
curl -sS http://packages.gitlab.cc/install/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
备注:rpm安装方式
curl -LJO https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-XXX.rpm
rpm -i gitlab-ce-XXX.rpm
4、配置和使用Gitlab
#sudo gitlab-ctl reconfigure
5、修改Gitlab主机地址和端口号
-------------------------------------------------------------
# cd /etc/gitlab/
# vim gitlab.rb
修改如下:
external_rul 'http://local' -> 'http://192.168.2.42'
-------------------------------------------------------------
修改Gitlab端口号,默认:80
# cd /var/opt/gitlab/nginx/conf
# vim gitlab-http.conf
修改如下:
server{
listen *:80 -> 12080;
server_name local -> 192.168.2.42;
}
-------------------------------------------------------------
6、启动Gitlab
# sudo gitlab-ctl start/stop/restart
7、登录Gitlab
浏览器访问http://192.168.2.42:12080
Username:root
Password:5iveL!fe
初次登录会要求修改密码
8、备注
亲测:执行sudo gitlab-ctl reconfig 会重新更改端口号为8
相关推荐
cxin 2020-11-06
synshitou 2020-10-21
Topbeyond 2020-08-21
happyfreeangel 2020-07-27
白开水 2020-07-19
无风的雨 2020-07-08
贤时间 2020-07-06
wishli 2020-06-28
小信 2020-06-21
leehbhs 2020-06-20
happyfreeangel 2020-06-18
83284950 2020-06-17
冯冯领队 2020-06-16
就是那个胖子 2020-06-14
83284950 2020-06-14
LiHansiyuan 2020-06-14
fcds00 2020-06-11
就是那个胖子 2020-06-11