Centos 6.5上安装GitLab服务及问题解决(5)

8)安装gems
[git@Git gitlab]$sudo gem install charlock_holmes --version '0.6.9.4'
Fetching: charlock_holmes-0.6.9.4.gem (100%)
Building native extensions.  This could take a while...
Successfully installed charlock_holmes-0.6.9.4
Parsing documentation for charlock_holmes-0.6.9.4
Installing ri documentation for charlock_holmes-0.6.9.4
Done installing documentation for charlock_holmes after 0 seconds
1 gem installed
[git@Git gitlab]$ vi Gemfile
source "https://rubygems.org"改为source "http://rubygems.org"
[git@Git gitlab]$ bundle install --deployment --without development test postgres
Fetching source index from
Fetching https://github.com/gitlabhq/grit.git
Could not find modernizr-2.6.2 in any of the sources
#出现错误:Could not find modernizr-2.6.2 in any of the sources
#解决办法:
[git@Git gitlab]$ vi Gemfile
第114行  gem "modernizr",        "2.6.2"
更改改为:
第114行  gem "modernizr-rails",  "2.7.1"
[git@Git gitlab]$ vi Gemfile.lock
第252行    modernizr (2.6.2)
更改改为:
第252行    modernizr-rails (2.7.1)
第523行  modernizr (= 2.6.2)
更改改为:
第523行  modernizr-rails (= 2.7.1)
#重新执行:
[git@Git gitlab]$ bundle install --deployment --without development test postgres puma aws

9)启动redis

[git@Git gitlab]$ sudo /etc/init.d/redis start
启动 :[确定]
[git@Git gitlab]$ sudo chkconfig redis on

10)对数据库进行初始化
[git@Git gitlab]$ bundle exec rake gitlab:setup RAILS_ENV=production --verbose
This will create the necessary database tables and seed the database.
You will lose any previous data stored in the database.
Do you want to continue (yes/no)? yes
#最后初始化成功后会获得账号和密码
Administrator account created:
login.........admin@local.host
password......5iveL!fe

11)检查GitLab及其环境的配置是否正确
[git@Git gitlab]$ bundle exec rake gitlab:env:info RAILS_ENV=production
System information
System:        CentOS release 6.5 (Final)
Current User:  git
Using RVM:      no
Ruby Version:  2.1.1p76
Gem Version:    2.2.2
Bundler Version:1.6.2
Rake Version:  10.1.0
GitLab information
Version:        6.4.3
Revision:      3173626
Directory:      /home/git/gitlab
DB Adapter:    mysql2
URL:           
HTTP Clone URL:
SSH Clone URL:  git@git.yingtao.com:some-project.git
Using LDAP:    no
Using Omniauth: no
GitLab Shell
Version:        1.9.3
Repositories:  /home/git/repositories/
Hooks:          /home/git/gitlab-shell/hooks/
Git:            /usr/bin/git
[git@Git gitlab]$ bundle exec rake sidekiq:start RAILS_ENV=production
rake aborted!
SIGTERM
/home/git/gitlab/lib/tasks/sidekiq.rake:9:in `system'
/home/git/gitlab/lib/tasks/sidekiq.rake:9:in `block (2 levels) in <top (required)>'
Tasks: TOP => sidekiq:start
(See full trace by running task with --trace)
[git@Git gitlab]$ bundle exec rake gitlab:check RAILS_ENV=production
Checking Environment ...
Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes
Checking Environment ... Finished
Checking GitLab Shell ...
GitLab Shell version >= 1.7.9 ? ... OK (1.9.3)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
update hook up-to-date? ... yes
update hooks in repos are links: ... can't check, you have no projects
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
        /home/git/repositories: OK
        /home/git/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.4.10
Send ping to redis server: PONG
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... no
  Try fixing it:
  Redownload the init script
  For more information see:
  doc/install/installation.md in section "Install Init Script"
  Please fix the error above and rerun the checks.
  #原文说可以忽略上面的错误,不影响使用
projects have namespace: ... can't check, you have no projects
Projects have satellites? ... can't check, you have no projects
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.9.2)
Checking GitLab ... Finished

11)下载启动脚本

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/e37dbe61225a187bef7dcb0655fbfcdf.html