gitlab7.2安装

系统: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路径,登陆用户名和密码。

时间: 2024-09-17 15:15:23

gitlab7.2安装的相关文章

CentOS 6.6 64位系统源码安装GitLab7教程

环境:CentOS-6.6-x86_64-minimal.iso 安装LNMP(必须安装Nginx.MySQL.redis,PHP可选),参考<lnmp一键安装包> 添加epel仓库 cat > /etc/yum.repos.d/epel.repo << EOF [epel] name=Extra Packages for Enterprise Linux 6 - \$basearch #baseurl=http://download.fedoraproject.org/pu

APACHE安装笔记

apache|笔记 作者:车东 摘要: WEB应用容量规划:根据硬件配置和WEB应用的特点进行WEB服务的规划及一些简单的估算公式: APACHE安装过程:apache的通用的简化安装选项,方便以后的应用的模块化配置:修改 HARD_SERVER_LIMIT:vi /path/to/apache_src/src/include/httpd.h#define HARD_SERVER_LIMIT 2560 <===将原来的 HARD_SERVER_LIMIT 256 后面加个"0"a

win7下使用U盘安装Ubuntu Kylin完全详解教程

安装失败了好几次,看了很多篇博客,最后终于成功了,并且做了这个win7下使用U盘安装Ubuntu的教程,希望能给大家带来帮助! 详细的图文步骤如下: 部分操作步骤转自 http://blog.csdn.net/dreamthen/article/details/8765472,感谢. 1.本次使用的是64位的ubuntu Kylin桌面版,iso镜像可以自己去官网下载,大约700MB 2.  将系统拷进U盘,制成u盘启动系统. 4.将电脑划分出来一个空盘,大小20G 足矣,也可以根据个人喜好,分

Android Studio 在 win7 下的安装和设置

首先完成android studio下载 http://developer.android.com/sdk/installing/studio.html 其次下载jdk1.7.0_01,并且完成安装: 下面开始进行安装和设置: 由于studio支持系统位数是64位,而我自己所用电脑是32位的,所以安装完成以后出现启动不了,解决方法如下: 用文本工具打开studio.bat 其中找到 SET BITS=IF EXIST "%JRE%\lib\amd64" SET BITS=64 把IF

VHD安装Windows8系统图文教程

ImageX 是一个命令行工具,它可以在操作系统映像中使用共享的映像格式来创建.修改和部署映像.VHD是微软虚拟磁盘文件,Win7(专业版以上)及Win8原生支持从VHD启动.利用这两项技术实现win7.win8双系统,痛快的体验win8.优点是不必单独拿一个分区来装win8.卸载方便(省掉折腾硬盘分区.卸载时win8分区合并回去的麻烦),对原系统无影响,与实机安装几乎无差别的性能体验.缺点是不能休眠,无法完成系统评分,只适用于Windows 7,8,Windows Server 20008 R

Win8系统硬盘安装详细图文教程

Win8的RTM正式版的已经发布了MSDN下载,RTM的build是9200,和Win7不同的是,Win8只有两个版本,一个是类似Win7 家庭版的Core核心版,一个是类似Win7旗舰版和专业版二合一的Pro专业版,而安装方法也不同,Win8无论是核心版还是专业版,都是使用一个镜像进行安装,区别是输入的安装码不同,而安装不同的版本. Win8相关推荐: U盘安装Windows8教程 Windows 8 RTM正式版下载 1.首先下载上面链接给出的Win8,然后用winrar.winzip.7Z

硬盘安装Windows 8系统图文教程

没有光驱.没有光盘.没有U盘,照样安装一个全新的Windows 8!什么?你不信?那就看看软件小品如何教你使用硬盘安装一个全新的Windows 8!看了这篇图文并茂的硬盘安装Window8详细教程,我就不信你学不会!好了,开始动手吧! 一.准备工作: 可以正常工作的Windows xp/7操作系统以及容量大于3.5G的非系统分区; Windows 8 硬盘安装引导工具 nt6 hdd installer ; Windows 8 微软官方安装镜像(以下称Windows 8 镜像). 二.开始安装:

小米随身wifi驱动安装失败解决方法

  小米随身wifi支持windows xp, windows vista 32/64位,windows 7 32/64位 ,windows 8 32/64位usb 2.0接口;符合ieee 802.11n协议,兼容ieee 802.11g和ieee 802.11b标准; 下面,我们就来看看小米随身wifi驱动无法安装的解决方法. 米随身wifi驱动安装失败解决方法: 1.下载最新版本的小米随身wifi驱动,重新安装后,换个usb口重新连接小米随身wifi可以了. 2.安装时,用系统默认的就路径

Windows Server 2012 Server Core中安装活动目录

在Windows Sever 2012中,我们可以自由的切换Server Core和GUI图形界面,相信在今后会有更多的服务我们会运行在Server Core当中.下面本文将对在Server Core中对网络配置到修改计算机名,最后创建一个域进行一次叙述. www.2cto.com 1. 配置网络 ? 登陆到Server Core中,在命令提示符输入Sconfig ? 在Sconfig中选择8>网络设置. ? 选择需要进行修改的网络适配器编号,这里为10 ? 根据向导依次对IP地址.子网掩码.默