搭建gitlab

环境Ubuntu 12.04

1. Install and configure the necessary dependencies

If you install Postfix to send email please select ‘Internet Site‘ during setup. Instead of using Postfix you can also use Sendmail orconfigure a custom SMTP server. If you wish to use Exim, please configure it as an SMTP server.

On Centos 6 and 7, the commands below will also open HTTP and SSH access in the system firewall.

sudo apt-get install curl openssh-server ca-certificates postfix

2. Add the GitLab package server and install the package

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

sudo apt-get install gitlab-ce

If you are not comfortable installing the repository through a piped script, you can find the entire script here.

3. Configure and start GitLab

sudo gitlab-ctl reconfigure

4. Browse to the hostname and login

Username: root 
Password: 5iveL!fe

到此可以使用root账户登录,新建项目。

下面配置一下邮件:

 gitlab_rails[‘gitlab_email_from‘] = ‘[email protected]‘
 
 gitlab_rails[‘smtp_enable‘] = true
 gitlab_rails[‘smtp_address‘] = "smtp.exmail.qq.com"
 gitlab_rails[‘smtp_port‘] = 456
 gitlab_rails[‘smtp_user_name‘] = "[email protected]"
 gitlab_rails[‘smtp_password‘] = "password"
 gitlab_rails[‘smtp_domain‘] = "smtp.qq.com"
 gitlab_rails[‘smtp_authentication‘] = "login"
 gitlab_rails[‘smtp_enable_starttls_auto‘] = true

配置完邮件以后就可以注册用户了。

如果想要把之前使用的gitolite的项目导入到gitlab使用以下方式(注意:之前的仓库是没有.git后缀的,但是gitlab是有.git后缀的,我们要手动把仓库名字改成带.git的格式)

cp /tmp/repositories/* /var/opt/gitlab/git-data/repositories/root/*
cd /var/opt/gitlab/git-data/repositories/root/
mv example example.git
chown -R git:git /var/opt/gitlab/git-data/repositories/root/*

#执行以下命令导入
gitlab-rake gitlab:import:repos

出现如下图说明导入完成,登录gitlab去查看吧。

Processing hortor/goose_client.git

* Created goose_client (hortor/goose_client.git)

Done!

时间: 2025-01-07 10:11:07

搭建gitlab的相关文章

CentOS服务器上搭建Gitlab安装步骤、中文汉化详细步骤、日常管理以及异常故障排查

一, 服务器快速搭建gitlab方法 可以参考gitlab中文社区 的教程 centos7安装gitlab:https://www.gitlab.cc/downloads/#centos7 centos6安装gitlab:https://www.gitlab.cc/downloads/#centos6 如下方法按照官网来操作,手工安装过于麻烦.当前测试平台为小鸟云的三个月centos 7测试机. 1. 安装配置依赖项 如想使用Postfix来发送邮件,在安装期间请选择'Internet Site

使用Docker搭建GitLab实践

使用Docker搭建GitLab实践 SVN与GIT,二者皆须会 当前版本控制系统(Version Control System,VCS)有集中化版本版本控制系统(Centralized Version Control System,简称 CVCS)和分布式版本控制系统(Distributed Version Control System,简称 DVCS). 集中化版本控制系统的代表是SVN,分布式版本控制系统的代表是GIT. 熟悉SVN已两年,玩过SVNKIT.svn cli.pysvn,当然

Ubuntu搭建Gitlab服务器

想到Gitlab就必定会想到SVN,因为两者都是代码管理系统,作为开发人员来说,用习惯了SVN的图形化界面和SVN代码更新和提交的方式, 可能就会觉得使用git会比较麻烦,其实不然git使用起来非常方便,并且好处也不少,git后面会成为一种流行和趋势.所以在这儿简单的介绍Gitlab 服务器的搭建和git的一些基本操作使用. Git的优点和缺点介绍 优点 1.适合分布式开发,强调个体 2.公共服务器压力和数据量都不会太大 3.速度快.灵活 4.任意两个开发者之间可以很容易的解决冲突 5.离线可以

Centos7使用docker搭建gitlab服务器

了解到docker的优点,搭建快,运行要求资源低,最重要的是实现的功能和效果都能达到预期,于是决定使用docker来搭建gitlab服务器. 效果图如下: 系统环境:CentOS Linux release 7.1.1503 (Core) git版本:/gitlab/gitlab-ce 一.安装和启动docker 安装:yum -y install docker 启动:systemctl start docker 开机启动:systemctl enable docker 二.拉取镜像文件 doc

搭建gitlab服务器

搭建gitlab服务器,统一管理软件项目 一.环境准备 1.启动一台虚拟机,内存至少改为4G2.在虚拟机上配置docker [[email protected] docker]# yum install -y docker_pkgs/*rpm [[email protected] docker]# systemctl start docker [[email protected] docker]# systemctl enable docker [[email protected] docker

简单搭建Gitlab CI持续集成环境

简单搭建Gitlab CI持续集成环境 简单介绍Gitlab CI的功能 从GitLab 8.X 开始,GitLab CI就已经集成在GitLab中,我们只要在项目中添加一个.gitlab-ci.yml文件,然后添加一个Runner,开启Runner,即可进行持续集成.而且随着GitLab的升级,GitLab CI变得越来越强大. GitLab Runner 在没使用过Gitlab之前,我也有一个困惑,到底Gitlab Runner是什么东西.它的作用是什么?</br>GitLab Runne

ubuntu搭建GitLab

目前Git是最流行的代码管理工具,git是分布式的,在多人协作,分支开发的项目上有其独特的优势.github上如果想建私有仓库是需要收取费用的,开源的GItLab允许我们搭建Git私有服务器. 下面介绍一下如何在自己的ubuntu服务器上搭建Gitlab.GitLab是一款开源的软件,在用基本的功能时时免费的,当需要提供额外的服务时需要收取费用. 下载最新版的gitlab,需要的机器配置: ubuntu 14.0以上 服务器内存需要4G以上 gitlab运行比较消耗内存,4g一下服务器安装了也无

Ubuntu Docker 搭建 GitLab

1.首先创建一个目录用于存放配置 sudo docker pull docker.io/gitlab/gitlab-ce sudo mkdir -p /root/docker/gitlab/config sudo mkdir -p /root/docker/gitlab/logs sudo mkdir -p /root/docker/gitlab/data 2.运行实例(关于最新版本的https 没有搞定,晚上说的都是旧版本, 尝试了一下 旧版本也是无果的,还有官方的新版有很多监控) docke

ubuntu14.04搭建gitlab服务器

某日,工作需要,需要搭建一个版本控制器.查看资料,当前比较流行的有gitlab,svn.由于常用github,所以更倾向于gitlab.下面记录了搭建的流程. 1.安装邮件支持的插件: sudo apt-get install curl openssh-server ca-certificates postfix 安装过程中出现的界面均可选择默认. 2.添加官方源,并安装: curl -sS http://packages.gitlab.cc/install/gitlab-ce/script.d

linux下搭建gitlab

  GitLab GitLab,是一个使用 Ruby on Rails 开发的开源应用程序,与Github类似,能够浏览源代码,管理缺陷和注释,非常适合在团队内部使用. 官方只提供了Debian/Ubuntu系统下的安装说明文档,如果需要在centos下安装,可以参考这篇:https: //github.com/gitlabhq/gitlab-recipes/tree/master/install/centos,笔者依照这篇文章的说明,成功的在centos系统上安装了gitlab,分享一下自己的