#安装所有的依赖包
sudo apt-get install -y build-essential git-core
sudo apt-get install -y zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev python-docutils postfix mysql-server mysql-client libmysqlclient-dev nginx libtool #安装ruby
mkdir /tmp/ruby && cd /tmp/ruby
curl --progress http://ruby.taobao.org/mirrors/ruby/ruby-1.9.3-p392.tar.gz | tar xz
cd ruby-1.9.-p392
./configure
make
sudo make install #创建用户
sudo adduser --disabled-login --gecos 'GitLab' git #获取git-shell的代码
cd /home/git
sudo -u git -H git clone https://github.com/gitlabhq/gitlab-shell.git
cd gitlab-shell sudo -u git -H git checkout v1.7.0
sudo -u git -H cp config.yml.example config.yml
sudo -u git -H vim config.yml
sudo -u git -H ./bin/install #获取gitlab代码 cd /home/git
sudo -u git -H git clone http://git.oschina.net/mirrors/gitlabhq.git gitlab #配置gitlab
cd /home/git/gitlab
sudo -u git -H cp config/gitlab.yml.example config/gitlab.yml
#sudo -u git -H vim config/gitlab.yml
sudo chown -R git log/
sudo chown -R git tmp/
sudo chmod -R u+rwX log/
sudo chmod -R u+rwX tmp/
sudo -u git -H mkdir /home/git/gitlab-satellites
sudo -u git -H mkdir tmp/pids/
sudo -u git -H mkdir tmp/sockets/
sudo chmod -R u+rwX tmp/pids/
sudo chmod -R u+rwX tmp/sockets/
sudo -u git -H mkdir public/uploads
sudo chmod -R u+rwX public/uploads
sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb #
sudo -u git -H vim config/unicorn.rb
sudo -u git -H git config --global user.name "GitLab"
sudo -u git -H git config --global user.email "gitlab@localhost"
sudo -u git -H git config --global core.autocrlf input
sudo -u git cp config/database.yml.mysql config/database.yml
sudo -u git -H vim config/database.yml
sudo -u git -H chmod o-rwx config/database.yml
sudo -u git cp config/puma.rb.example config/puma.rb #安装gam
cd /home/git/gitlab
gem sources --remove http://rubygems.org/
gem sources -a http://ruby.taobao.org/
gem sources -l
sudo gem install charlock_holmes --version '0.6.9.4'
sudo gem install bundler --no-ri --no-rdoc
sudo -u git -H vim Gemfile # source 'http://ruby.taobao.org/'
sudo -u git -H bundle install --deployment --without development test postgres unicorn aws --verbose #创建数据库
mysql -u root -p
mysql> CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production --verbose #安装启动脚本
sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab
sudo update-rc.d gitlab defaults
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
sudo /etc/init.d/gitlab restart
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production #nginx
sudo cp lib/support/nginx/gitlab /etc/nginx/sites-available/gitlab
sudo ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab
sudo vim /etc/nginx/sites-available/gitlab
sudo /etc/init.d/nginx restart

ubuntu安装gitlab的更多相关文章

  1. ubuntu 安装 gitlab最新版(下载慢问题)

    Debian/Ubuntu 用户 首先信任 GitLab 的 GPG 公钥: curl https://packages.gitlab.com/gpg.key 2> /dev/null | su ...

  2. Ubuntu安装Gitlab Runner

    第一步: 添加GitLab的官方存储库:    curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runne ...

  3. Ubuntu 14.04下安装GitLab指南

    摘要 GitLab 是一个用于仓库管理系统的开源项目.使用Git作为代码管理工具,并在此基础上搭建起来的web服务. 在GitLab的官方网站上面对Ubuntu的支持也是很好的,有比较详尽的安装指南. ...

  4. ubuntu 16.04.2 源码安装gitlab并且利用runner持续集成

    参考原档:https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md#using-https 本章只 ...

  5. Ubuntu Docker 简单安装 GitLab

    相关博文: Ubuntu 简单安装 Docker Ubuntu 简单安装和配置 GitLab 服务器版本 Ubuntu 16.04 LTS. 1. 安装和配置 安装命令: sudo docker ru ...

  6. Ubuntu 16.04 安装Gitlab

    这里选用Ubuntu16.04系统 安装Gig sudo apt-get install git 安装gitlab 1,安装依赖包,运行如下命令 sudo apt-get install curl o ...

  7. Ubuntu bitnami gitlab 安装

    /************************************************************************************** * Ubuntu bit ...

  8. ubuntu 安装和配置 GitLab

    一.概述 GitLab 是一个基于 Web 的开源 Git 软件仓库管理器,用 Ruby 编写,包括 wiki,问题管理,代码审查,监控以及持续集成和部署.它使开发人员能够创建,审查和部署他们的项目. ...

  9. Linux环境Ubuntu上安装GitLab

    本文主要介绍在Ubuntu[Ubuntu 18.04.3]上安装最新的GitLab版本控制工具. 一.安装更新GitLab所需要的依赖项 sudo apt-get update 下载过程中,网络要有所 ...

随机推荐

  1. 存储构造题(Print Check)

    连接:Print Check 题意:n行m列的矩阵,有k次涂色,每一涂一行或者一列,求最后的涂色结果. 从数据的大小看,暴力肯定要TLE: 问题是如何存储数据. 首先:我们只要最后的涂色结果. 其次: ...

  2. 斯坦福第十一课:机器学习系统的设计(Machine Learning System Design)

    11.1  首先要做什么 11.2  误差分析 11.3  类偏斜的误差度量 11.4  查全率和查准率之间的权衡 11.5  机器学习的数据 11.1  首先要做什么 在接下来的视频中,我将谈到机器 ...

  3. 银行IT入门深似海

    最初就是接触各种系统,了解各大系统的功能 像建行 从终端到后台就经历10多个系统 另外,就是各种标准规范 例如报文规范  搞终端我师父让我看8583规范 还有什么银联的规范  PBOC什么的 我现在还 ...

  4. UIPageControl页控制器

    一.基本知识 #import "ViewController.h"@interface ViewController ()<UIScrollViewDelegate>{ ...

  5. rsync 配置

    1.安装rsync和配置文件 root@localhost ~]# yum -y install rsync #安装rsync服务 #CentOS 默认以 xinetd 方式运行 rsync 服务.r ...

  6. 【概念笔记】JAVA基础 - part1

    IT`huhui前言录 这是自己对JAVA基础的一个小总结,会不断完善.因为时间仓促的原因. 每学习一段时间,停下来,静心总结一下,甚好.停停走,走走停,一往无前,不摔倒. 一些链接里面是我看到一些人 ...

  7. Mono、Unity和Xamarin三者关系

    1.Mono: .net是微软出的标准.如果站在Mono的角度来说,这套标准能规定编译器产生一些符合一定条件的文件出来,这些中间文件最后在目标平台上被解析成跟机器相关的东西.问题是,开始只有Windo ...

  8. C#调用阿里云CDN API刷新缓存

    使用CDN必须要解决CDN缓存的问题,要么在每次更新文件时生成不同的URL,要么在每次更新文件时刷新CDN缓存.我们在一个实际应用场景中用到了后者,所以需要调用阿里云CDN的API进行缓存刷新的操作. ...

  9. Google 镜像站搜集[转]

    Google 镜像站搜集 原文链接:http://www.itechzero.com/google-mirror-sites-collect.html 如果您是以下镜像的作者,并且不希望您的镜像出现在 ...

  10. unity3D ——自带寻路Navmesh入门教程(一)(转)

    转自:http://liweizhaolili.blog.163.com/blog/static/16230744201271161310135/ 说明:从今天开始,我阿赵打算写一些简单的教程,方便自 ...