Gitlab的安装

在这里插入图片描述

开门见山
Gitlab拥有与github相似的功能。在本地服务器搭建gitlab后,可以将代码托管到服务器的仓库上。通过使用git小乌龟,

就可以实现代码的克隆和拉取。通过为不同人员分配账号密码,就可以让项目组成员合作开发新项目。

准备工作:安装VMware Workstation Pro虚拟机。下载镜像文件centos6或者centos7,6,和7的命令是不一样的,

建议下载centos7.比较新。然后安装。虚拟机的内存必须保证至少4G,低于2G无法安装gitlab。
一、安装gitlab
1. 请在代理环境下安装所需环境依赖组件

sudo yum install curl policycoreutils openssh-server openssh-clients

sudo systemctl enable sshd

sudo systemctl start sshd

sudo yum install postfix

sudo systemctl enable postfix

sudo systemctl start postfix

sudo firewall-cmd --permanent --add-service=http

sudo systemctl reload firewalld
2. 安装gitlab安装包
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

sudo yum install gitlab-ce
3.相关配置。即在external_url填上自己服务器的ip
vim /etc/gitlab/gitlab.rb
4.配置端口号和server_name
cd /var/opt/gitlab/nginx/conf

vim gitlab-http.conf

在这里插入图片描述

5.重启服务以便应用以上配置
sudo gitlab-ctl reconfigure
6.临时关闭防火墙
systemctl stop firewalld
7.禁止开机启动
systemctl disable firewalld
8.测试访问
在浏览器输入服务器的ip加端口即可访问。如172.169.1.211:1100。
默认的账号和密码为:root和5iveL!fe。

至此,gitlab安装成功。后面我们将介绍如何用gitlab创建项目,分配用户组。
以及如何使用乌龟克隆项目,提交项目。

谢谢观看,如有不足,敬请指教

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值