#安装所有的依赖包
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. php中or的含义

    or其实是Php中的短路或 经常看到这样的语句: $file = fopen($filename, r) or die("抱歉,无法打开: $filename"); or在这里是这 ...

  2. ICMP

    (一)ICMP IP是一个尽力的不可靠的协议,IP不能提供差错控制(如果数据在传播过程中出现错误了),这个时候ICMP就起作用了. ICMP提供两个功能:差错的报告,查询. ICMP的ICMP包分为两 ...

  3. 读取iOS通讯录

    首先导入头文件 #import <AddressBook/AddressBook.h> 获取权限 读取通讯录 - (void)loadPerson { ABAddressBookRef a ...

  4. php中英文截取无乱码 包括全角下的字符

    符合UTF-8下,如果GBK下  改为  $content .= $str[$sing].$str[$sing+1];        $sing += 3; 改为 $sing += 2; /**    ...

  5. Android 3D滑动菜单完全解析,实现推拉门式的立体特效

    转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/10471245 在上一篇文章中,我们学习了Camera的基本用法,并借助它们编写了一 ...

  6. jquery实现checkbox的全选

    <html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> < ...

  7. 一些常用的Bootstrap模板资源站

    2013-11-13 23:28:09   超级Bootstrap模板库:http://www.wrapbootstrap.com/ 免费的HTML5 响应式网页模板:http://html5up.n ...

  8. 安装xubuntu时遇到的一些问题

    1  下载地址 http://www.linuxdown.net/ 2  选择虚拟机 VirtualBox 3  安装步骤 http://www.cnblogs.com/zhcncn/p/398730 ...

  9. sqlplus启动后的环境SQLPATH的设置

    sqlplus启动时会查找和加载的两个文件login.sql和glogin.sql.其中glogin.sql文件默认存放在$ORACLE_HOME/sqlplus/admin目录下,login.sql ...

  10. SQLSERVER执行性能统计工具SQLQueryStress

    SQLSERVER执行时间统计工具SQLQueryStress 有时候需要检测一下SQL语句的执行时间,相信大家都会用SET STATISTICS TIME ON开关打开SQLSERVER内置的时间统 ...