CentOS rvm + ruby 설치

Jmnote (토론 | 기여)님의 2017년 6월 1일 (목) 14:55 판 (→‎확인 2)
  다른 뜻에 대해서는 우분투 rvm + ruby 설치 문서를 참조하십시오.

1 개요

CentOS ruby-rvm 설치
CentOS RVM 설치
  • 이 과정을 수행하면 rvm, ruby, gem 이 설치됨

2 확인

[root@zetawiki ~]# rvm version
-bash: rvm: command not found

3 yum 설치

[root@zetawiki ~]# yum install libyaml-devel glibc-headers autoconf gcc-c++ glibc-devel patch readline-devel zlib-devel libffi-devel openssl-devel automake libtool bison sqlite-devel
... (생략)
===========================================================================================
 Package                    Arch          Version                     Repository      Size
===========================================================================================
Installing:
 autoconf                   noarch        2.63-5.1.el6                base           781 k
 automake                   noarch        1.11.1-4.el6                base           550 k
 bison                      x86_64        2.4.1-5.el6                 base           637 k
 gcc-c++                    x86_64        4.4.7-18.el6                base           4.7 M
 glibc-devel                x86_64        2.12-1.209.el6_9.1          updates        991 k
 glibc-headers              x86_64        2.12-1.209.el6_9.1          updates        619 k
 libffi-devel               x86_64        3.0.5-3.2.el6               base            18 k
 libtool                    x86_64        2.2.6-15.5.el6              base           564 k
 libyaml-devel              x86_64        0.1.3-4.el6_6               base            85 k
 openssl-devel              x86_64        1.0.1e-57.el6               base           1.2 M
 patch                      x86_64        2.6-6.el6                   base            90 k
 readline-devel             x86_64        6.0-4.el6                   base           134 k
 sqlite-devel               x86_64        3.6.20-1.el6_7.2            base            81 k
 zlib-devel                 x86_64        1.2.3-29.el6                base            44 k
Installing for dependencies:
 cloog-ppl                  x86_64        0.15.7-1.2.el6              base            93 k
 cpp                        x86_64        4.4.7-18.el6                base           3.7 M
 gcc                        x86_64        4.4.7-18.el6                base            10 M
 kernel-headers             x86_64        2.6.32-696.3.1.el6          updates        4.5 M
 keyutils-libs-devel        x86_64        1.4-5.el6                   base            29 k
 krb5-devel                 x86_64        1.10.3-65.el6               base           504 k
 libcom_err-devel           x86_64        1.41.12-23.el6              base            33 k
 libgomp                    x86_64        4.4.7-18.el6                base           134 k
 libkadm5                   x86_64        1.10.3-65.el6               base           143 k
 libselinux-devel           x86_64        2.0.94-7.el6                base           137 k
 libsepol-devel             x86_64        2.0.41-4.el6                base            64 k
 libstdc++-devel            x86_64        4.4.7-18.el6                base           1.6 M
 mpfr                       x86_64        2.4.1-6.el6                 base           157 k
 ncurses-devel              x86_64        5.7-4.20090207.el6          base           641 k
 ppl                        x86_64        0.10.2-11.el6               base           1.3 M
Updating for dependencies:
 e2fsprogs                  x86_64        1.41.12-23.el6              base           554 k
 e2fsprogs-libs             x86_64        1.41.12-23.el6              base           121 k
 keyutils-libs              x86_64        1.4-5.el6                   base            20 k
 krb5-libs                  x86_64        1.10.3-65.el6               base           675 k
 libcom_err                 x86_64        1.41.12-23.el6              base            38 k
 libgcc                     x86_64        4.4.7-18.el6                base           103 k
 libselinux                 x86_64        2.0.94-7.el6                base           109 k
 libselinux-python          x86_64        2.0.94-7.el6                base           203 k
 libselinux-utils           x86_64        2.0.94-7.el6                base            82 k
 libss                      x86_64        1.41.12-23.el6              base            42 k
 libstdc++                  x86_64        4.4.7-18.el6                base           295 k
 ncurses-base               x86_64        5.7-4.20090207.el6          base            61 k
 ncurses-libs               x86_64        5.7-4.20090207.el6          base           245 k
 sqlite                     x86_64        3.6.20-1.el6_7.2            base           300 k

Transaction Summary
===========================================================================================
Install      29 Package(s)
Upgrade      14 Package(s)

Total download size: 36 M
Is this ok [y/N]: y
... (생략)
Installed:
  autoconf.noarch 0:2.63-5.1.el6              automake.noarch 0:1.11.1-4.el6               
  bison.x86_64 0:2.4.1-5.el6                  gcc-c++.x86_64 0:4.4.7-18.el6                
  glibc-devel.x86_64 0:2.12-1.209.el6_9.1     glibc-headers.x86_64 0:2.12-1.209.el6_9.1    
  libffi-devel.x86_64 0:3.0.5-3.2.el6         libtool.x86_64 0:2.2.6-15.5.el6              
  libyaml-devel.x86_64 0:0.1.3-4.el6_6        openssl-devel.x86_64 0:1.0.1e-57.el6         
  patch.x86_64 0:2.6-6.el6                    readline-devel.x86_64 0:6.0-4.el6            
  sqlite-devel.x86_64 0:3.6.20-1.el6_7.2      zlib-devel.x86_64 0:1.2.3-29.el6             

Dependency Installed:
  cloog-ppl.x86_64 0:0.15.7-1.2.el6           cpp.x86_64 0:4.4.7-18.el6                    
  gcc.x86_64 0:4.4.7-18.el6                   kernel-headers.x86_64 0:2.6.32-696.3.1.el6   
  keyutils-libs-devel.x86_64 0:1.4-5.el6      krb5-devel.x86_64 0:1.10.3-65.el6            
  libcom_err-devel.x86_64 0:1.41.12-23.el6    libgomp.x86_64 0:4.4.7-18.el6                
  libkadm5.x86_64 0:1.10.3-65.el6             libselinux-devel.x86_64 0:2.0.94-7.el6       
  libsepol-devel.x86_64 0:2.0.41-4.el6        libstdc++-devel.x86_64 0:4.4.7-18.el6        
  mpfr.x86_64 0:2.4.1-6.el6                   ncurses-devel.x86_64 0:5.7-4.20090207.el6    
  ppl.x86_64 0:0.10.2-11.el6                 

Dependency Updated:
  e2fsprogs.x86_64 0:1.41.12-23.el6            e2fsprogs-libs.x86_64 0:1.41.12-23.el6      
  keyutils-libs.x86_64 0:1.4-5.el6             krb5-libs.x86_64 0:1.10.3-65.el6            
  libcom_err.x86_64 0:1.41.12-23.el6           libgcc.x86_64 0:4.4.7-18.el6                
  libselinux.x86_64 0:2.0.94-7.el6             libselinux-python.x86_64 0:2.0.94-7.el6     
  libselinux-utils.x86_64 0:2.0.94-7.el6       libss.x86_64 0:1.41.12-23.el6               
  libstdc++.x86_64 0:4.4.7-18.el6              ncurses-base.x86_64 0:5.7-4.20090207.el6    
  ncurses-libs.x86_64 0:5.7-4.20090207.el6     sqlite.x86_64 0:3.6.20-1.el6_7.2            

Complete!

4 rvm ruby 설치

[root@zetawiki ~]# curl -sSL https://get.rvm.io | bash -s stable --ruby
Downloading https://github.com/rvm/rvm/archive/1.29.1.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.1/1.29.1.tar.gz.asc
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: Signature made Mon 20 Feb 2017 05:02:47 AM KST using RSA key ID BF04FF17
gpg: Can't check signature: No public key
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found. Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).

GPG signature verification failed for '/usr/local/rvm/archives/rvm-1.29.1.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.1/1.29.1.tar.gz.asc'! Try to install GPG v2 and then fetch the public key:

    gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

or if it fails:

    command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -

the key can be compared with:

    https://rvm.io/mpapis.asc
    https://keybase.io/mpapis

NOTE: GPG version 2.1.17 have a bug which cause failures during fetching keys from remote server. Please downgrade or upgrade to newer version (if available) or use the second method described above.
[root@zetawiki ~]# curl -sSL https://rvm.io/mpapis.asc | gpg --import -
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
gpg: no ultimately trusted keys found
[root@zetawiki ~]# curl -sSL https://get.rvm.io | bash -s stable --ruby
Downloading https://github.com/rvm/rvm/archive/1.29.1.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.1/1.29.1.tar.gz.asc
gpg: Signature made Mon 20 Feb 2017 05:02:47 AM KST using RSA key ID BF04FF17
gpg: Good signature from "Michal Papis (RVM signing) <mpapis@gmail.com>"
gpg:                 aka "Michal Papis <michal.papis@toptal.com>"
gpg:                 aka "[jpeg image of size 5015]"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 409B 6B17 96C2 7546 2A17  0311 3804 BB82 D39D C0E3
     Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36  166B E206 C29F BF04 FF17
GPG verified '/usr/local/rvm/archives/rvm-1.29.1.tgz'

Upgrading the RVM installation in /usr/local/rvm/
Upgrade of RVM in /usr/local/rvm/ is complete.
... (생략)
ruby-2.4.0 - #extracting rubygems-2.6.12....
ruby-2.4.0 - #removing old rubygems.........
ruby-2.4.0 - #installing rubygems-2.6.12.........................
ruby-2.4.0 - #gemset created /usr/local/rvm/gems/ruby-2.4.0@global
ruby-2.4.0 - #importing gemset /usr/local/rvm/gemsets/global.gems...............................................
ruby-2.4.0 - #generating global wrappers........
ruby-2.4.0 - #gemset created /usr/local/rvm/gems/ruby-2.4.0
ruby-2.4.0 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.4.0 - #generating default wrappers........
ruby-2.4.0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.4.0 - #complete 
Ruby was built without documentation, to build it run: rvm docs generate-ri
Creating alias default for ruby-2.4.0...

  * To start using RVM you need to run `source /usr/local/rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

5 확인 2

[root@zetawiki ~]# rvm version
-bash: rvm: command not found
  • SSH 재접속
[root@zetawiki ~]# rvm version
rvm 1.29.1 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io/]
[root@zetawiki ~]# ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
[root@zetawiki ~]# gem -v
2.6.12

6 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}