centos安装gitlab
2017-08-31 15:46
441 查看
原文地址:https://segmentfault.com/a/1190000002722631
centosx64安装使用rpm包方式安装gitlab
1.安装依赖软件
yum -y install policycoreutils openssh-server openssh-clients postfix
2.启动服务
service postfix start
3.下载yum源并安装
centos6:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/
centos7:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-9.2.2-ce.0.el6.x86_64.rpm
rpm -i gitlab-ce-9.2.2-ce.0.el6.x86_64.rpm
4.修改gitlab配置文件指定服务器ip和自定义端口(也可以不修改):
vim /etc/gitlab/gitlab.rb
修改external_url 'http://git.exp.com' 为external_url 'http://本机ip:端口'
5.重置并启动GitLab
gitlab-ctl reconfigure
gitlab-ctl restart
6.访问http://git.exp.com
(第一次登录修改密码)初始账户: root 密码: 5iveL!fe
1、关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
注意事项:
管理员用户:创建项目,添加成员,普通程序员:编写代码并pull,push
1.在安装gitlab的过程中,gitlab会自动创建一个git用户(若存在则删除重新创建)
2.gitlab存储的实际目录/var/opt/gitlab/git-data/repositories
3.gitlab克隆代码的地址
管理员:git@192.168.100.70:gitrep/ssp-parent.git
普通用户:http://192.168.100.70:9999/gitrep/ssp-parent.git
gitlab集成安装了nginx并监听80重定向到9999端口(/var/opt/gitlab/git-data/repositories)
gitrep在gitlab中叫做group或者命名空间,在linux中对应gitrep目录
ssp-parent是gitlab组中具体某个项目名字,在linux中对应ssp-parent.git目录
4.gitlab管理员创建的用户账号密码是用来访问gitlab网页的,唯一性全靠邮箱
5.使用root用户手动创建
cd /var/opt/gitlab/git-data/repositories
mkdir -p gitrep/ssp-parent.git
chown -hR git:git gitrep //修改目录的权限为git组git用户所有
cd gitrep/ssp-parent.git
git init --bare
centosx64安装使用rpm包方式安装gitlab
1.安装依赖软件
yum -y install policycoreutils openssh-server openssh-clients postfix
2.启动服务
service postfix start
3.下载yum源并安装
centos6:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/
centos7:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-9.2.2-ce.0.el6.x86_64.rpm
rpm -i gitlab-ce-9.2.2-ce.0.el6.x86_64.rpm
4.修改gitlab配置文件指定服务器ip和自定义端口(也可以不修改):
vim /etc/gitlab/gitlab.rb
修改external_url 'http://git.exp.com' 为external_url 'http://本机ip:端口'
5.重置并启动GitLab
gitlab-ctl reconfigure
gitlab-ctl restart
6.访问http://git.exp.com
(第一次登录修改密码)初始账户: root 密码: 5iveL!fe
1、关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
注意事项:
管理员用户:创建项目,添加成员,普通程序员:编写代码并pull,push
1.在安装gitlab的过程中,gitlab会自动创建一个git用户(若存在则删除重新创建)
2.gitlab存储的实际目录/var/opt/gitlab/git-data/repositories
3.gitlab克隆代码的地址
管理员:git@192.168.100.70:gitrep/ssp-parent.git
普通用户:http://192.168.100.70:9999/gitrep/ssp-parent.git
gitlab集成安装了nginx并监听80重定向到9999端口(/var/opt/gitlab/git-data/repositories)
gitrep在gitlab中叫做group或者命名空间,在linux中对应gitrep目录
ssp-parent是gitlab组中具体某个项目名字,在linux中对应ssp-parent.git目录
4.gitlab管理员创建的用户账号密码是用来访问gitlab网页的,唯一性全靠邮箱
5.使用root用户手动创建
cd /var/opt/gitlab/git-data/repositories
mkdir -p gitrep/ssp-parent.git
chown -hR git:git gitrep //修改目录的权限为git组git用户所有
cd gitrep/ssp-parent.git
git init --bare
相关文章推荐
- gitlab安装(基于centos6.5)
- centos单机安装nginx、gitlab、nexus、mysql共存
- CentOS 7.2安装gitlab-ce
- CentOS下安装Gitlab
- CentOS下一键安装GitLab
- Centos7.4下Gitlab服务器安装及端口修改
- 版本管理 GitLab 的安装及管理 (CentOS 7)
- centos7 gitlab 9.1.0 安装以及汉化
- CentOS 7安装gitlab-ee企业版
- centOS6.5安装gitLab服务器
- CentOS服务器上搭建Gitlab安装步骤、中文汉化详细步骤、日常管理以及异常故障排查
- 阿里云Centos6 Linux安装gitlab 步骤。
- Gitlab完美安装【CentOS6.5安装gitlab-6.9.2】
- GitLab在CentOS7下LNMP环境的安装使用
- 在CentOS上安装GITLAB
- 在Centos上安装gitlab
- CentOS 7 安装 Gitlab
- 阿里云centOS6.8下安装gitlab CE
- 在CentOS7.1上安装Gitlab碰到的问题及解决方法
- Centos7 jenkins + gitlab 的安装