系统:centos6.4

1.安装依赖包

导入epel:

useradd git

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

rpm -ivh epel-release-6-8.noarch.rpm

yum -y install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis* checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate python-docutils pkg-config cmake perl cpio libicu*

2.安装最新版本git

wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.xz

tar xzvf git-latest.tar.xz

cd git-xxxx-xx-xx

autoconf

./configure

make

make install

cp /usr/local/bin/git /usr/bin/

3.ruby安装

curl -L --progress ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | tar xz

cd ruby-2.1.2

./configure --disable-install-rdoc

make

make install

4.mysql安装调整(现有环境为公司内部MYsql,连数据root账户。)

yum -y install mysql

service mysqld start

创建库gitlabhq_production

5.gitlab安装

su git

cd /home/git

clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 7-2-stable gitlab

cd /home/git/gitlab

cp config/gitlab.yml.example config/gitlab.yml (需要将此文件里面的host改为本机ip)

chown -R git log/

chown -R git tmp/

chmod -R u+rwX log/

chmod -R u+rwX tmp/

mkdir /home/git/gitlab-satellites

hmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites

chmod -R u+rwX tmp/pids/

chmod -R u+rwX tmp/sockets/

chmod -R u+rwX  public/uploads

cp config/unicorn.rb.example config/unicorn.rb

cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb

git config --global user.name "GitLab"

git config --global user.email "example@example.com"

git config --global core.autocrlf input

cp config/database.yml.mysql config/database.yml(需要将里面的用户名密码指定为mysql,sock也指向mysql的sock)

chmod o-rwx config/database.yml

vi /home/git/gitlab/Gemfile/

将source "https://rubygems.org"  更改为source "http://ruby.taobao.org"

bundle install --deployment --without development test postgres aws

6.gitlab-shell安装

service redis start

cd /home/git/gitlab

bundle exec rake gitlab:shell:install[v1.9.7] REDIS_URL=redis://localhost:6379 RAILS_ENV=production

7.安装nginx并初始化数据库

yum -y install nginx

cd /home/git/gitlab

cp lib/support/init.d/gitlab /etc/init.d/gitlab

cp lib/support/init.d/gitlab.default.example /etc/default/gitlab

日志切割:

cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab

nginx主配置文件,需要按需调整server 配置,其余可以保持默认。

cp lib/support/nginx/gitlab /etc/nginx/conf.d/gitlab.conf

生成mysql数据库表结构。

bundle exec rake gitlab:setup RAILS_ENV=production    (输入yes)

执行完会提示首次登陆的用户密码:

admin@local.host

5iveL!fe

执行检查操作:

bundle exec rake gitlab:check RAILS_ENV=production     (检查是否有报错)

service nginx start

service gitlab start

直接访问url路径,登陆用户名和密码。

gitlab7.2安装的更多相关文章

  1. gitlab迁移升级

    一.迁移步骤 1.首先安装最新版本gitlab(gitlab7.2安装) 2.停止旧版本gitlab服务 3.将旧的项目文件完整导入新的gitlab bundle exec rake gitlab:i ...

  2. centos7 使用 omnibus包安装方式,安装 gitlab7.4

    centos7 使用 omnibus包安装方式,安装 gitlab7.4 1: gitlab是一个开源的软件,类似于github.com那样的git代码管理仓库: 官网 https://about.g ...

  3. 一键安装 gitlab7 on rhel6.4 并设置邮件发送

    一键安装 gitlab7 on rhel6.4 并设置邮件发送 世间本无事,庸人自扰之.书归正传,简短节说:gitlab是个好东西,可是安装手冊奇烂.尽管以前对比文档一步一步安装起来gitlab 6. ...

  4. 一键安装gitlab7在rehl6.4上

    一键安装gitlab7在rehl6.4上 参考原文: http://blog.csdn.net/ubuntu64fan/article/details/38367579 1 关于gitlab7 无论如 ...

  5. CentOS6.5Minimal安装Gitlab7.5

    文章出处:http://www.restran.net/2015/04/09/gilab-centos-installation-note/ 在 CentOS 6.5 Minimal 系统环境下,用源 ...

  6. 在 Ubuntu 12.04 上安装 GitLab7.x

    安装环境: 操作系统:    Ubuntu 12.4 LTS 英文 数据库:        postgresql webserver: nginx 能够说到7.x的时候,GitLab的文档已经相当完好 ...

  7. 一键安装GitLab7

    1. Install and configure the necessary dependencies If you install Postfix to send email please sele ...

  8. centos 6 安装 gitlib

    安装gitlab-----------1. 下载 gitlabcurl -O https://downloads-packages.s3.amazonaws.com/centos-6.5/gitlab ...

  9. Centos6.5 gitlab安装使用

    公司从svn转到git做版本管理,我搜了一下网上git的服务器,包括gitosis,gitolite等.一开始我是用的是gitosis作为git服务器的,安装过程还算比较简单,整个服务使用python ...

随机推荐

  1. Kubernetes-深入分析集群安全机制(3.6)

    集群的安全性主要考虑以下几个方面: 容器与所在宿主机的隔离: 限制容器给基础设施及其他容器带来消极影响的能力: 最小权限原则--合理限制所有组件的权限,确保组件只执行它被授权的行为,通过限制单个组件的 ...

  2. python2.7练习小例子(二十九)

        29):1.题目:按相反的顺序输出列表的值. #!/usr/bin/python # -*- coding: UTF-8 -*- a = ['one', 'two', 'three'] for ...

  3. RedHat7.1 安装Oracle12102

    选型: 32位的内存是个瓶颈,已经是64位的时代了.使用64位的CentOS6 和 64位的Oracle 11g R2 在虚拟机器安装,采用hostonly方式设置网络 注意:能上网的网卡要设置一下I ...

  4. Android使用butterknife注解出现nullPointerException解决

    1.下载butterknife加入到你的libs中,构建到你的项目中,此时还不能注解成功,必须进行2配置 2.选择你的项目右键---->properties----->java compi ...

  5. Python字符串处理:过滤字符串中的英文与符号,保留汉字

    使用Python 的re模块,re模块提供了re.sub用于替换字符串中的匹配项. re.sub(pattern, repl, string, count=0) 参数说明: pattern:正则重的模 ...

  6. A problem occurred evaluating project ':'. > ASCII

    项目编译出错: 错误信息如下: FAILURE: Build failed with an exception. * Where: Build file 'F:\git\i***\build.grad ...

  7. 【C#】 URL Protocol

    [C#] URL Protocol 网页调用本地程序, 支持 Windows 下所有浏览器, 与浏览器插件对比实现简单,但判断是否调用成功时, 只有ie10以上有函数,其他浏览器得自己实现(用 ifr ...

  8. unity3d easytouch计算摇杆旋转角度以及摇杆八方向控制角色

    在写第三人称控制的时候,一开始在电脑测试是用WASD控制角色 后来需要发布到手机上,于是就加了一个摇杆 键盘控制角色的代码已经写好了,角色八方向移动 如果按照传统的大众思路来控制的话,是达不到我想要的 ...

  9. 「日常训练」「小专题·USACO」 Wormholes(1-4)

    题意 之后补充. 分析 这是一条很好的考察递归(或者说搜索)的题目.它的两个过程(建立初步解,验证)都用到了递归(或者说运用递归可以相当程度的减少代码量). 具体实现见代码.注意,为了使用std::p ...

  10. 「暑期训练」「Brute Force」 Far Relative’s Problem (CFR343D2B)

    题意 之后补 分析 我哭了,强行增加自己的思考复杂度...明明一道尬写的题- -(往区间贪心方向想了 其实完全没必要,注意到只有366天,直接穷举判断即可. 代码 #include <bits/ ...