部署gitlab,模拟开发流程。
一、Git基本配置了解
1.配置使用者信息
git config --global user.name changyx
git config --global user.email 12345678@qq.com
2.local,global,system三种级别
local当前项目有效(工作目录/.git/config)
global(全局级别)当前用户有效(用户目录/.gitconfig)
system所有用户有效(git目录/etc/gitconfig)
3.删除使用者信息
git config --unset user.name
git config --unset user.email
默认删除local下的,如果需要删除指定级别下的则添加具体参数
二、Git安装部署
机器内存大于等于4G
关闭防火墙、禁用SELinux
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
[root@localhost ~]# sed -i ‘/^SELINUX=/c SELINUX=disabled’ /etc/selinux/config
[root@localhost ~]# setenforce 0
** 安装常用包**
[root@localhost ~]# yum install -y curl policycoreutils-python openssh-server postfix wget
[root@localhost ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
[root@localhost ~]# yum install git-all
[root@localhost ~]# git init
安装gitlab
[root@localhost ~]# yum install http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.0.0-ce.0.el7.x86_64.rpm -y
[root@