GitLab CE 9-3-stable源码安装手册(Centos6/REHL6)
# 进入gitlab目录cd /home/git/gitlab
gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
# 修改 Gemfile 和 Gemfile.lock
vim Gemfile(Gemfile.lock文件也要改,不然报错)
更改
https://rubygems.org/
为:
https://ruby.taobao.org/
# 确保只有 https://ruby.taobao.org/
gem sources -l
https://ruby.taobao.org/
# 升级gem
gem update --system
gem -v
####一定要注意选择自己用的数据库的命令
# 如果使用 MySQL,执行下面的命令 (note, the option says "without ... postgres")
sudo -u git -H bundle install --deployment --without development test postgres aws kerberos
# PostgreSQL (note, the option says "without ... mysql")
###sudo -u git -H bundle install --deployment --without development test mysql aws kerberos
笔记: 如果你想去用 Kerberos 做用户认证, 然后在--without选项中省略Kerberos
--------------------------------------------------------------------------------------------
如果提示下面的错误:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
error occurred while installing charlock_holmes (0.7.3), and Bundler cannot continue.
Make sure that `gem install charlock_holmes -v ‘0.7.3’` succeeds before bundling.
brew install icu4c or apt-get install libicu-dev
解决办法:
# yum install libicu.x86_64libicu-devel.x86_64
An error occurred while installing rugged (0.25.1.1), and Bundler cannot continue.
Make sure that `gem install rugged -v '0.25.1.1'` succeeds before bundling.
解决办法:
# yum install cmake
# gem install rugged -v '0.25.1.1'
ERROR:Could not find a valid gem 'charlock_holmes' (= 0.6.9.4), here is why:
Unable to download data from https://rubygems.org/ - Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org/quick/Marshal.4.8/charlock_holmes-0.6.9.4.gemspec.rz)
ERROR:Possible alternatives: charlock_holmes
解决办法:
#yum install libicu-devel
An error occurred while installing mysql2 (0.3.20), and Bundler cannot continue.
Make sure that `gem install mysql2 -v ‘0.3.20’` succeeds before bundling.
#解决办法
# yum install mysql-community-devel.x86_64
# gem install mysql2 -v '0.3.20
An error occurred while installing re2 (1.0.0), and Bundler cannot continue.
Make sure that `gem install re2 -v '1.0.0'` succeeds before bundling.
#解决办法
# yum install -y re2-devel
An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that `gem install pg -v ‘0.18.4’` succeeds before bundling.
#解决办法
# gem install pg -v '0.18.4'
# yum install postgresql-devel.x86_64
An error occurred while installing sqlite3 (1.3.13), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v ‘1.3.13’` succeeds before bundling.
# 解决办法
# yum install sqlite-devel.x86_64
# gem install sqlite3 -v '1.3.13'
Bundler::GemRequireError: There was an error while trying to load the gem ‘coffee-rails’.
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
#解决办法:因为execjs需要javascript的支持
#参考这里:NodeJs的安装
--------------------------------------------------------------------------------------------
页:
[1]