ubuntu安装gitlab
#安装所有的依赖包
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的更多相关文章
- ubuntu 安装 gitlab最新版(下载慢问题)
Debian/Ubuntu 用户 首先信任 GitLab 的 GPG 公钥: curl https://packages.gitlab.com/gpg.key 2> /dev/null | su ...
- Ubuntu安装Gitlab Runner
第一步: 添加GitLab的官方存储库: curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runne ...
- Ubuntu 14.04下安装GitLab指南
摘要 GitLab 是一个用于仓库管理系统的开源项目.使用Git作为代码管理工具,并在此基础上搭建起来的web服务. 在GitLab的官方网站上面对Ubuntu的支持也是很好的,有比较详尽的安装指南. ...
- ubuntu 16.04.2 源码安装gitlab并且利用runner持续集成
参考原档:https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md#using-https 本章只 ...
- Ubuntu Docker 简单安装 GitLab
相关博文: Ubuntu 简单安装 Docker Ubuntu 简单安装和配置 GitLab 服务器版本 Ubuntu 16.04 LTS. 1. 安装和配置 安装命令: sudo docker ru ...
- Ubuntu 16.04 安装Gitlab
这里选用Ubuntu16.04系统 安装Gig sudo apt-get install git 安装gitlab 1,安装依赖包,运行如下命令 sudo apt-get install curl o ...
- Ubuntu bitnami gitlab 安装
/************************************************************************************** * Ubuntu bit ...
- ubuntu 安装和配置 GitLab
一.概述 GitLab 是一个基于 Web 的开源 Git 软件仓库管理器,用 Ruby 编写,包括 wiki,问题管理,代码审查,监控以及持续集成和部署.它使开发人员能够创建,审查和部署他们的项目. ...
- Linux环境Ubuntu上安装GitLab
本文主要介绍在Ubuntu[Ubuntu 18.04.3]上安装最新的GitLab版本控制工具. 一.安装更新GitLab所需要的依赖项 sudo apt-get update 下载过程中,网络要有所 ...
随机推荐
- 程序员遇到Bug时的25个反应
开发应用程序是一个非常有压力的工作.没有人是完美的,因此在这个行业中,代码中出现bug是相当普遍的现象.面对bug,一些程序员会生气,会沮丧,会心烦意乱,甚至会灰心丧气,而另一些程序员会依然保持冷静沉 ...
- redis队列的实现
redis中文官网:http://www.redis.cn/ 关于redis队列的实现方式有两种: 1.生产者消费者模式. 2.发布者订阅者模式. 详解: 1.生产者消费者模式. 普通版本: 比如一个 ...
- (必看)ping值不代表网速
在下售卖美国.香港VPN服务器多年,在于客户的交流中,最多关心的就是ping值速度,认为ping速度越低速度越快,以此来评判一台VPN服务器的速度快慢,这其实是一个误区!现在来详细说明下. 1.pin ...
- java中的继承Object
一个类,要么是直接继承Object,要么就是间接继承Object,如下: class A{ } class B extends A{ } B 是A的子类,A是Object的子类,所以B间接继承了Obj ...
- 何时使用Swift Structs和Classes
Swift 圈中有一个被反复讨论的话题是:何时使用struct,何时使用class.我觉得今天我也要给出我的个人观点. 值 VS 引用 答案真的很简单了:当你需要用值语义的时候使用class,需要用引 ...
- jquery实现checkbox的全选
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> < ...
- quartz 实例记录
之前介绍过了quartz的一些相关理论知识,感觉上挺简单的,实际动手操作也确实如此,去quartz的官网上把Jar包下载下来以后,会看到它的目录里有例子程序,看完第一个例子觉得还可以,但是看后面两个例 ...
- MQ安装配置
(1)执行接受许可脚本: ./mqlicense.sh –accept (2) 安装 WebSphere MQ for Linux 服务器: [root@localhost mq]# rpm ...
- Linux内核分析之扒开系统调用的三层皮(上)
一.原理总结 本周老师讲的内容主要包括三个方面,用户态.内核态和中断,系统调用概述,以及使用库函数API获取系统当前时间.系统调用是操作系统为用户态进程与硬件设备进行交互提供的一组接口,也是一种特殊的 ...
- [Leetcode][JAVA] Populating Next Right Pointers in Each Node II
Follow up for problem "Populating Next Right Pointers in Each Node". What if the given tre ...