最简教程

### . 安装Git
安装Git服务,命令如下:
```Shell
$ yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel
$ yum install git
```
### . 创建仓库
```
git init --bare doc.git
```
### . 克隆仓库
```shell
$ git clone root@47.75.116.238:/root/git/doc/doc.git/ #密码为ECS登录密码
```

Git 服务器搭建

# 创建一个git用户组和用户,用来运行git服务: ——可省略
$ groupadd git
$ useradd git -g git # 同:adduser git -g:指定用户所属的群组。
$ userdel -rf git #删除用户
useradd git
 

GitLab:

1、配置yum源

vim /etc/yum.repos.d/gitlab-ce.repo

复制以下内容:

[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
Repo_gpgcheck=0
Enabled=1
Gpgkey=https://packages.gitlab.com/gpg.key

2、更新本地yum缓存

sudo yum makecache

3、安装GitLab社区版

sudo yum intall gitlab-ce        #自动安装最新版
sudo yum install gitlab-ce-x.x.x #安装指定版本

GitLab常用命令:

sudo gitlab-ctl start    # 启动所有 gitlab 组件;
sudo gitlab-ctl stop # 停止所有 gitlab 组件;
sudo gitlab-ctl restart # 重启所有 gitlab 组件;
sudo gitlab-ctl status # 查看服务状态;
sudo gitlab-ctl reconfigure # 启动服务;
sudo vim /etc/gitlab/gitlab.rb # 修改默认的配置文件;
gitlab-rake gitlab:check SANITIZE=true --trace # 检查gitlab;
sudo gitlab-ctl tail # 查看日志;


ECS之Git服务器搭建的更多相关文章

  1. 基于阿里云服务器的git服务器搭建

    使用阿里云Ubuntu 12.0.4 64位操作系统做git服务器. 首先git服务器有两种访问方式可以选择:http方式和ssh的方式,http方式更容易使用. 1.http方式的git服务器搭建以 ...

  2. CentOS 6.5下Git服务器搭建

    1 . Git服务器搭建 1. 环境部署 系统环境:服务器端:CentOS 6.5 ,ip:192.168.56.1 客户端:CentOS 6.5 ,ip:192.168.56.101 软件版本:服务 ...

  3. 【转】Windows平台下Git服务器搭建

    Windows平台下Git服务器搭建 Posted on 2015-05-18 21:29 阿祥当码农 阅读(7637) 评论(0) 编辑 收藏 该文章转自:http://www.codeceo.co ...

  4. Git系列(1) Windows下Git服务器搭建

    作为对前两天Git服务器搭建的一个整理,我想分别从服务端和客户端两个角度来记录下整个搭建过程,为了达到目标,我们需要哪些操作. (一)服务端软件和账号的安装配置 我们这里只需要两个软件git和ssh, ...

  5. Windows下Git服务器搭建[转]

    Windows下Git服务器搭建   作为对前两天Git服务器搭建的一个整理,我想分别从服务端和客户端两个角度来记录下整个搭建过程,为了达到目标,我们需要哪些操作. (一)服务端软件和账号的安装配置 ...

  6. git服务器搭建全程

    为了后续安装能正常进行,我们先来安装一些相关依赖库和编译工具 [root@VM_95_113_centos ~]# yum install curl-devel expat-devel gettext ...

  7. Windows平台下Git服务器搭建--------gitblit

    Windows(server)平台下Git服务器搭建 第一步:下载Java,安装,配置环境变量. 第二步:下载Gitblit.下载地址:http://www.gitblit.com/ 第三步:解压缩下 ...

  8. 使用gitolite进行git服务器搭建

    使用gitolite进行git服务器搭建 https://blog.csdn.net/pan0755/article/details/78460941 使用gitolite搭建,然后需要有个客户端进行 ...

  9. Windows下基于http的git服务器搭建-gitstack

    版权声明:若无来源注明,Techie亮博客文章均为原创. 转载请以链接形式标明本文标题和地址: 本文标题:Windows下基于http的git服务器搭建-gitstack     本文地址:http: ...

随机推荐

  1. 【Python基础】lpthw - Exercise 43 基本的面向对象分析和设计

    1. A game from sys import exit from random import randint from textwrap import dedent # 使可以使用三引号型的字符 ...

  2. Cassandra最小化安装

    Cassandra最小化安装 环境 CentOS 7.2 64位 IP_address:172.27.0.8 安装包装备 [root@master ~]# ll /usr/local/src tota ...

  3. 14 - How to check replication status

    The people using PostgreSQL and the Streaming Replication feature seem to ask many of the same quest ...

  4. 海思编译链编译出现__aeabi_unwind_cpp_pr1重定义怎么回事

    1.用arm-hisiv100nptl-linux-gcc编译代码,结果发现报错,__aeabi_unwind_cpp_pr1重定义,在librt.a先定义,使用的海思芯片是hi3520d. 2.本来 ...

  5. RxSwift 介绍

    RxSwift 介绍 中文文档 https://beeth0ven.github.io/RxSwift-Chinese-Documentation/ https://medium.com/@DianQ ...

  6. windows android ndk的某些编译工具报错乱码0x5 或拒绝访问05

    在IDEA或者AndroidStudio的快捷方式上右键属性 > 兼容性 > 以管理员身份运行 解决问题.

  7. Excle中的使用小技巧

    关于从数据库中拷贝来的数字,拷贝到excle中,那些数字都变成了科学计算法. 步骤1,鼠标右键选中的列,选择“设置单元格格式(F)” 2.从这里面选中这些是否有小数,如果没有小数就把这个改成0

  8. C# 方法扩展

    using System.Collections.Generic; namespace Extra_Function { public static class Function { public s ...

  9. scanf函数的返回值

    #include <stdio.h> int main() { ]; ]); printf("%d\n", n); ; } 此刻注意scanf函数里面的格式限定,该代码 ...

  10. Django中上传图片---避免因图片重名导致被覆盖

    上一篇文章中(https://www.cnblogs.com/lutt/p/10640412.html),我们以图片文件夹+图片名字的方式来储存图片,这样的做法会导致有重名的图片会导致之前的图片被覆盖 ...