LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installation help for gitlab (https://www.linuxquestions.org/questions/linux-newbie-8/installation-help-for-gitlab-4175498342/)

NotionCommotion 03-15-2014 08:42 PM

Installation help for gitlab
 
I am trying to install gitlab and am following https://github.com/gitlabhq/gitlab-r...install/centos It is an existing Centos 6.2 server (not 6.5) with MySQL. I got 90% through it, but am receiving the below error. I know almost nothing about Ruby/Gems, and would appreciate some insight where I am going astray. Thank you

Code:

[root@desktop gitlab]# sudo -u git -H /usr/local/bin/bundle install --deployment --without development test postgres aws
Fetching source index from https://rubygems.org/
Fetching https://github.com/gitlabhq/markup.git
remote: Counting objects: 1024, done.
remote: Compressing objects: 100% (548/548), done.
remote: Total 1024 (delta 367), reused 1024 (delta 367)
Receiving objects: 100% (1024/1024), 147.02 KiB, done.
Resolving deltas: 100% (367/367), done.
Installing rake (10.1.1)
Installing ace-rails-ap (2.0.1)
Installing i18n (0.6.9)
Using minitest (4.7.5)
Installing multi_json (1.8.4)
Installing atomic (1.1.14)
Installing thread_safe (0.1.3)
Installing tzinfo (0.3.38)
Installing activesupport (4.0.3)
Installing builder (3.1.4)
Installing erubis (2.7.0)
Installing rack (1.5.2)
Installing rack-test (0.6.2)
Installing actionpack (4.0.3)
Installing mime-types (1.25.1)
Installing polyglot (0.3.4)
Installing treetop (1.4.15)
Installing mail (2.5.4)
Installing actionmailer (4.0.3)
Installing actionpack-action_caching (1.1.0)
Installing actionpack-page_caching (1.0.2)
Installing activemodel (4.0.3)
Installing activerecord-deprecated_finders (1.0.3)
Installing arel (4.0.2)
Installing activerecord (4.0.3)
Using bundler (1.5.3)
Installing thor (0.18.1)
Installing railties (4.0.3)
Installing hike (1.2.3)
Installing tilt (1.4.1)
Installing sprockets (2.10.1)
Installing sprockets-rails (2.0.1)
Installing rails (4.0.3)
Installing acts-as-taggable-on (2.4.1)
Installing asciidoctor (0.1.4)
Installing descendants_tracker (0.0.3)
Installing ice_nine (0.10.0)
Installing axiom-types (0.0.5)
Installing bcrypt-ruby (3.1.2)
Installing sass (3.2.12)
Installing bootstrap-sass (3.0.3.0)
Using json (1.8.1)
Installing carrierwave (0.9.0)
Installing timers (1.1.0)
Installing celluloid (0.15.2)
Installing charlock_holmes (0.6.9.4)
Installing coercible (1.0.0)
Installing coffee-script-source (1.6.3)
Installing execjs (2.0.2)
Installing coffee-script (2.2.0)
Installing coffee-rails (4.0.1)
Installing colored (1.2)
Installing connection_pool (1.2.0)
Installing d3_rails (3.1.10)
Installing orm_adapter (0.5.0)
Installing warden (1.2.3)
Installing devise (3.0.4)
Installing devise-async (0.8.0)
Installing diff-lcs (1.2.5)
Installing dotenv (0.9.0)
Installing email_validator (1.4.0)
Installing enumerize (0.7.0)
Installing equalizer (0.0.8)
Installing escape_utils (0.2.4)
Installing eventmachine (1.0.3)
Installing multipart-post (1.2.0)
Installing faraday (0.8.8)
Installing faraday_middleware (0.9.0)
Installing font-awesome-rails (3.2.1.3)
Installing foreman (0.63.0)
Installing gemoji (1.3.1)
Installing github-markdown (0.5.5)
Using github-markup (0.7.6) from https://github.com/gitlabhq/markup.git (at 61ade38)
Installing posix-spawn (0.3.8)
Installing gitlab-grit (2.6.4)
Installing gitlab-flowdock-git-hook (0.4.2.2)
Installing nokogiri (1.5.10)
Installing sanitize (2.0.6)
Installing stringex (1.5.1)
Installing gitlab-gollum-lib (1.1.0)
Installing gitlab-grack (2.0.0.pre)
Installing gitlab-linguist (3.0.0)
Installing rugged (0.19.0)
Installing gitlab_git (5.4.0)
Installing gitlab_meta (6.0)
Installing net-ldap (0.3.1)
Installing hashie (2.0.5)
Installing omniauth (1.1.4)
Installing pyu-ruby-sasl (0.0.3.3)
Installing rubyntlm (0.1.1)
Installing gitlab_omniauth-ldap (1.0.4)
Installing gon (5.0.1)
Installing multi_xml (0.5.5)
Installing rack-accept (0.4.5)
Installing rack-mount (0.8.3)
Installing virtus (1.0.1)
Installing grape (0.6.1)
Installing grape-entity (0.3.0)
Installing haml (4.0.4)
Installing haml-rails (0.5.1)
Installing httparty (0.12.0)
Installing hipchat (0.14.0)
Installing http_parser.rb (0.5.3)
Installing httpauth (0.2.0)
Installing jquery-atwho-rails (0.3.3)
Installing jquery-rails (2.1.3)
Installing turbolinks (2.0.0)
Installing jquery-turbolinks (2.0.1)
Installing jquery-ui-rails (2.0.2)
Installing jwt (0.1.8)
Installing kaminari (0.15.1)
Installing kgio (2.8.1)
Installing libv8 (3.16.14.3)
Installing modernizr (2.6.2)

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql.h... no
checking for mysql/mysql.h... no
-----
mysql.h is missing.  please check your installation of mysql and try again.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/local/bin/ruby
        --with-mysql-config
        --without-mysql-config

extconf failed, exit code 1

Gem files will remain installed in /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/mysql2-0.3.11 for inspection.
Results logged to /home/git/gitlab/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/mysql2-0.3.11/gem_make.out
An error occurred while installing mysql2 (0.3.11), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling.
[root@desktop gitlab]#


redd9 03-15-2014 08:51 PM

I don't know much about gems either, but have you tried uninstalling and reinstalling mysql? Or installing it if you didn't have it in the first place.

NotionCommotion 03-15-2014 09:13 PM

Quote:

Originally Posted by redd9 (Post 5135309)
I don't know much about gems either, but have you tried uninstalling and reinstalling mysql? Or installing it if you didn't have it in the first place.

Hi Redd9, MySQL is working great. I haven't, however, tried uninstalling and reinstalling. Any reason I should?

knudfl 03-16-2014 04:29 AM

I'd guess you are missing the development parts of mysql.
I.e. you cannot build a "Mysql application" with the "run time mysql" only.

Install the package that provides mysql.h and other development files :

sudo apt-get install libmysqlclient-dev
EDIT : Would be # 'yum install mysql-devel' for CentOS.

-

NotionCommotion 03-16-2014 06:45 AM

Quote:

Originally Posted by knudfl (Post 5135432)
I'd guess you are missing the development parts of mysql.
I.e. you cannot build a "Mysql application" with the "run time mysql" only.

Install the package that provides mysql.h and other development files :

sudo apt-get install libmysqlclient-dev

-

One more thing that might make a difference. When installing MySQL, I used a ius repo, and used the following. Could it be a library conflict?
Code:

yum install mysql55 mysql55-server

knudfl 03-16-2014 07:21 AM

# 5.

Sorry, it's "mysql-devel" from the CentOS "base.repo"

But : When you have chosen "mysql55"/ius :
The required development file from the ius.repo : # yum install mysql55-devel
* 32 http://dl.iuscommunity.org/pub/ius/s...r_m.group.html
* 64 http://dl.iuscommunity.org/pub/ius/s...r_m.group.html

.. Will provide /usr/include/mysql/{mysql.h, 33-other-files.h, mysql/**}
.. and /usr/lib(64)/mysql/{libmysqlclient_r.so, libmysqlclient.so}

* The command to find a package providing mysql.h is $ yum provides */mysql.h


-

NotionCommotion 03-16-2014 08:04 AM

Thanks knudfl, that did the trick!

Ran into another snag. What does the following mean? Thank you
Code:

[root@desktop gitlab]# sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
sudo: bundle: command not found
[root@desktop gitlab]#


knudfl 03-16-2014 08:18 AM

# 7 .

That a good question as ..
$ yum 'provides */bundle' probably will reply with a lot of packages.

But you are using ruby, so why not try # yum install rubygem-bundler
→ → /usr/bin/bundle

Note : 'rubygem-bundler' should be in "CentOS-extra.repo" :
You may have to enable "extra" ? ( edit enable=0 to enable=1 ).

-

NotionCommotion 03-16-2014 08:27 AM

I tried the command without sudo, and made some progress. Think it is okay doing so as root, or will this mess permissions, etc up? Maybe I should not have attempted to do the original install as root?
Code:

[root@desktop gitlab]# bundle exec rake gitlab:setup RAILS_ENV=production
 Warning
  You are running as user root, we hope you know what you are doing.
  Things may work/fail for the wrong reasons.
  For correct results you should run this as user git.

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)? n
Do you want to continue (yes/no)? ^Crake aborted!

I then logged in as git (had to change user to allow remote access), but no progress.
Code:

-sh-4.1$ cd /home/git/gitlab
-sh-4.1$ sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
git is not in the sudoers file.  This incident will be reported.
-sh-4.1$

Thanks!

NotionCommotion 03-16-2014 08:42 AM

I changed owner of all files in /home/git to "git", and then as user git, did the following without the sudo, and it appeared to work. I am in uncharted territory :(

Code:

bundle exec rake gitlab:setup RAILS_ENV=production

John VV 03-16-2014 11:57 AM

you did point the out of date yum to the historical archive " the vault"

the 6.2 repos were removed a year ago
http://vault.centos.org/
after 6.2 went "end of life" back in July of 2012

and please HEED the warning from cent about using a unsupported OS
-- the place holder in the old 6.2 repo mirrors
http://mirrors.arsc.edu/centos/6.2/readme
Quote:

This directory (and version of CentOS) is depreciated. For normal users,
you should use /6/ and not /6.2/ in your path. Please see this FAQ
concerning the CentOS release scheme:

http://www.centos.org/modules/smartfaq/faq.php?faqid=34

If you know what you are doing, and absolutely want to remain at the 6.2
level, go to http://vault.centos.org/ for packages.

Please keep in mind that 6.0, 6.1 and 6.2 no longer gets any updates, nor
any security fix's.

NotionCommotion 03-16-2014 01:00 PM

Thanks John,

I just realized I am at 6.5. I forgot that I installed at 6.4, not 6.2, and update must have gotten me to 6.5?

knudfl 03-16-2014 01:05 PM

# 12 : $ cat /etc/redhat-release

The file /etc/redhat-release , etc. **-release are updated, when you do:
# yum update

NotionCommotion 03-17-2014 09:00 AM

Hello again, I am still stumped on the below line.

Code:

[root@desktop gitlab]# sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
sudo: bundle: command not found
[root@desktop gitlab]#

I tried installing rubygem-bundler, but I got "No package rubygem-bundler available" (yes, I extra is enabled).

What is odd is why can I execute bundle without sudo?????????????

Code:

[root@desktop gitlab]# bundle exec rake gitlab:setup RAILS_ENV=production
 Warning
  You are running as user root, we hope you know what you are doing.
  Things may work/fail for the wrong reasons.
  For correct results you should run this as user git.

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)? no
Quitting...
[root@desktop gitlab]#

I don't want to do so as root user as it deviates from the documentation I am following and I don't totally know what I am doing.

John VV 03-17-2014 10:58 AM

you are using "sudo"
so did you set it up correctly ?
it is installed but disabled and not configured by default
the mysql DB is owned by the user "mysql"
is that user in the sudoers list

RHEL/CentOS/Fedora normally uses "su -" for installing software


All times are GMT -5. The time now is 01:52 AM.