gitlab 6 安装备忘录
gitlab 6.2-stable;Ubuntu 13.10;ruby 2.0.0
推荐使用PostgreSQL,MySQL不同版本可能碰到兼容性问题(www.oschina.net/question/82993_84763)
ruby安装推荐使用rvm(ruby-china.org/wiki/install_ruby_guide)
参考:www.sagestroll.com/node/202
gem,ruby,bundle install源推荐http://ruby.taobao.org/
或者使用http://bitnami.com的一键部署。它已更新到6.3(未测试).
http://bitnami.com/stack/gitlab/installer
碰到问题(按官方文档安装时):
1.//找不到ruby,gem命令或运行gem出现"/usr/bin/env: ruby: 没有那个文件或目录"
$rubyhome=ruby安装目录
sudo ln -s $rubyhome/ruby /usr/bin/ruby sudo ln -s $rubyhome/bin/gem /usr/bin/gem
2.//运行gem命令出错:<internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError) from <internal:gem_prelude>:1:in `<compiled>'
找不到原因,后来用rvm安装ruby2.0.0时正确,方法见http://ruby-china.org/wiki/rvm-guide
3.// "usr/bin/env: ruby: 权限不够"
查看命令或执行的用户是否有进入ruby安装目录的权限
4.//clone github上的官方https://github.com/gitlabhq/gitlabhq.git慢
选用git@osc的镜像http://git.oschina.net/mirrors/gitlabhq
5.// sudo: bundle: command not found(已gem install bundler)
sudo ln -s /home/$username/.rvm/rubies/ruby-2.0.0-p247/bin/bundle /usr/bin/bundle
6.// /usr/bin/env: ruby_noexec_wrapper: 没有那个文件或目录
sudo ln -s /home/chenhao/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper /usr/bin/ruby_noexec_wrapper
7.//gem安装mysql2 出错
需要安装libmysqlclient-dev,但在用mariadb,所有会提示" libmysqlclient-dev : 依赖: libmysqlclient18 (= 5.5.32-0ubuntu0.13.04.1) 但是 5.5.32+maria-1~raring 正要被安装",所有需要安装libmariadbclient-dev
8.//rake aborted! (<unknown>): found character that cannot start any token while scanning for the next token
在database.yml使用'gitlab'@'localhost'作为username导致问题,应该使用gitlab(localhost只是mysql的host)
9.//不能找到 sidekiq.pid
试试sudo -u git -H bundle exec rake sidekiq:start RAILS_ENV=production
10//Could not locate Gemfile
切换工作目录到/home/git/gitlab
10.//git clone https方式成功 ssh失败 或者提示要求输入"git@your_gitlab_host"的密码
gitlab-shell/config里的web url与实际地址不符,在/etc/hosts添加"127.0.0.1 your_gitlab_host"
11.//GitLab Git push的时候提示需要密码
说明你的 key 没有被加入 authorizedkeys 里面,去检查一下 git账户的 ~/.ssh/authorizedKeys 列表.
12.//gitlab启用注册
取消gitlab.yml 中"signup_enabled: true"的注释
13.//smtp设置
这个暂时没有,请好心人提供一下(我按https://gist.github.com/xavierjurado/3138813这个试过,但不行).
错误:
1.//Retrieving rubygems- There is no checksum for 'http://production.cf.rubygems.org/rubygems/rubygems-.tgz' or 'rubygems-.tgz', it's not possible to validate it. If you wish to continue with unverified download add '--verify-downloads 1' after the command. There has been an error while trying to fetch the source. Halting the installation.
使用"rvm install 2.0.0 --verify-downloads 1"(已验证)或"rvm get stable;rvm rubygems current"(未验证)
2.//bundle install 时Network error
修改一下国内的gem源尝试,打开项目的根目录下面的Gemfile,这里是/home/git/gitlab/Gemfile第一行修改为: source 'http://ruby.taobao.org/' 再次执行bundle install
3.Check GitLab API access: /home/git/gitlab-shell/lib/gitlab_net.rb:57:in `get': undefined method `request_uri' for #<URI::Generic:0x000000013cf770> (NoMethodError) from /home/git/gitlab-shell/lib/gitlab_net.rb:29:in `check' from /home/git/gitlab-shell/bin/check:11:in `<main>'
gitlab_url必须以"http://"开头
4.使用nginx做http server时,访问出现502 bad gateway,同时/var/log/nginx/gitlab_error.log显示upstream prematurely closed connection while reading response header from upstream
检查gitlab/log下的unicorn.stderr.log,一般会发现timeout (31s > 30s), killing.原因是第一次访问时,gitlab需要初始化,机器太次时初始化所需时间超过了gitlab/config/unicorn.rb中的timeout,只需调大timeout即可.
http://my.oschina.net/meilihao/blog/156426
gitlab 6 安装备忘录的更多相关文章
- gitlab一键安装 (转)
原文地址:http://www.2cto.com/os/201411/353292.html 0 简介bitnami和gitlab bitnami BitNami是一个开源项目,该项目产生的开源软件包 ...
- gitlab的安装以及汉化
gitlab的安装 首先在网上下载好任意版本gitlab的rpm包 推荐下面的地址: https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gi ...
- gitlab一键安装+配置(备份+LADP认证)
gitlab一键安装+配置(备份+LADP认证) #gitlab一键安装 #centos6 mini, GitLab社区版 #参考官方最新文档 https://www.gitlab.com.cn/in ...
- Gitlab的安装与实践
tucao 先让我来吐槽一下下,使用GitHub以及Bitbucket比较不太稳定,尤其是后者,可以说是极其不稳定,甚至无法克隆仓库到本地.因此,决定安装一款开源且免费的Git服务到自己的服务器主机上 ...
- Gitlab的安装及项目新建
1. Gitlab的安装及仓库创建 1.1下载gitlab安装包 1).官网下载速度较慢 建议先行下载 国内的源里面可以找到最新的版本https://mirrors.tuna.tsinghua.edu ...
- DevOps之一 Gitlab的安装与配置
gitlab的安装 参考治疗:https://www.gitlab.com.cn/installation/#centos-7 http://www.21yunwei.com/archives/435 ...
- gitlab的安装和基本使用
一.gitlab的安装 1)安装依赖包 sudo yum install git vim gcc glibc-statc telnet -y sudo yum install -y curl poli ...
- docker+gitlab的安装和迁移
docker+gitlab的安装 docker search gitlab docker pull docker.io/gitlab/gitlab-ce docker run --name=: -- ...
- Gitlab的安装汉化及问题解决
Gitlab的安装汉化及问题解决(2017/12/14目前版本为10.2.4) 一.前言 Gitlab需要安装的包太TM多了,源码安装能愁死个人,一直出错,后来发现几行命令就装的真是遇到的新大陆一样. ...
随机推荐
- hdu1823(二维线段树模板题)
hdu1823 题意 单点更新,求二维区间最值. 分析 二维线段树模板题. 二维线段树实际上就是树套树,即每个结点都要再建一颗线段树,维护对应的信息. 一般一维线段树是切割某一可变区间直到满足所要查询 ...
- Xamarin XAML语言教程构建ControlTemplate控件模板 (四)
Xamarin XAML语言教程构建ControlTemplate控件模板 (四) 2.在页面级别中构建控件模板 如果开发者要在页面级别中构建控件模板,首先必须将ResourceDictionary添 ...
- Educational Codeforces Round 10 E - Pursuit For Artifacts (强联通缩点 + 回溯)
题目链接:http://codeforces.com/contest/652/problem/E 给你n个点m个边,x和y双向连接,要是z是1表示这条边上有宝藏,0则没有,最后给你起点和终点,问你要是 ...
- [BZOJ3944]Sum(杜教筛)
3944: Sum Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 6201 Solved: 1606[Submit][Status][Discuss ...
- [Codeforces 30D] Kings Problem
Brief Intro: 有n+1个点,其中n个点在X轴上,求从第k个点出发最短的汉密尔顿路径 Solution: 分类讨论+逐个枚举 设dist(i)是第i个点到n+1的距离 cal1(l,r)是n ...
- 【三分】Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) B. The Meeting Place Cannot Be Changed
三分显然,要注意EPS必须设成1e-6,设得再小一点都会TLE……坑炸了 #include<cstdio> #include<algorithm> #include<cm ...
- 【kmp算法】模板
void GetFail(char P[],int __next[])//__next[i]表示s[0]~s[i-1]的前缀中,最大长度相等的前后缀是多少 { __next[0]=-1; int le ...
- Windows python 3 安装OpenCV
本文适用于想在window下使用python 3 的童鞋,安装openCV 有问题的参考 一.你要确定自己的python版本是3.x,在命令行窗口输入python 本人使用的是python 3.6 二 ...
- HDU 3389 Game(博弈)
Game Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submis ...
- npm的简单应用
1.安装node 2.旧版node升级 (1)linux系统 sudo npm install npm -g (2)window系统 npm install npm -g 3.安装淘宝镜像cnpm(以 ...