ruby 2.0 install and passenger install
1 2 3 |
<span style="font-size: 12pt;"><code class=" " style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;">wget http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p451.tar.gz tar -xzvf ruby-2.0.0.-p451.tar.gz </code></span> |
1 2 |
<span style="font-size: 12pt;"><code style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;">cd ruby-2.0.0-p451 </code></span> |
1 2 |
<span style="font-size: 12pt;"><code style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;">./configure </code></span> |
1 2 3 |
<span style="font-size: 12pt;"><code style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;">make make test </code></span> |
1 2 |
<span style="font-size: 12pt;"><code style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;">make install </code></span> |
설치 후 아래와 같이 해당폴더에 ruby가 설치된다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<span style="font-size: 12pt;"><code style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;">installing binary commands: /usr/local/bin installing base libraries: /usr/local/lib installing arch files: /usr/local/lib/ruby/2.0.0/i686-linux installing pkgconfig data: /usr/local/lib/pkgconfig installing extension objects: /usr/local/lib/ruby/2.0.0/i686-linux installing extension objects: /usr/local/lib/ruby/site_ruby/2.0.0/i686-linux installing extension objects: /usr/local/lib/ruby/vendor_ruby/2.0.0/i686-linux installing extension headers: /usr/local/include/ruby-2.0.0/i686-linux installing extension scripts: /usr/local/lib/ruby/2.0.0 installing extension scripts: /usr/local/lib/ruby/site_ruby/2.0.0 installing extension scripts: /usr/local/lib/ruby/vendor_ruby/2.0.0 installing extension headers: /usr/local/include/ruby-2.0.0/ruby installing rdoc: /usr/local/share/ri/2.0.0/system installing capi-docs: /usr/local/share/doc/ruby installing command scripts: /usr/local/bin installing library scripts: /usr/local/lib/ruby/2.0.0 installing common headers: /usr/local/include/ruby-2.0.0 installing manpages: /usr/local/share/man/man1 installing default gems: /usr/local/lib/ruby/gems/2.0.0 </code></span> |
버전 확인
1 2 3 |
<span style="font-size: 12pt;"><code style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;">ruby -v gem -v </code></span> |
Install Rails
Update gem
1 2 |
<span style="font-size: 12pt;"><code style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;">/usr/local/bin/gem update --system </code></span> |
Install rails
1 |
<span style="font-size: 12pt;"><code class=" " style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;">/usr/local/bin/gem install rails -v3.2 </code></span> |
1 2 |
<span style="font-size: 12pt;"><code style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;">/usr/local/bin/rails -v </code></span> |
Install Passenger for Apache
1 2 |
<span style="font-size: 12pt;"><code class=" " style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;">/usr/local/bin/gem install passenger </code></span> |
1 2 |
<span style="font-size: 12pt;"><code style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;">/usr/local/bin/passenger-install-apache2-module </code></span> |
화면대로 진행하면 된다.
아파치가 설치되지 않았다고 에러 메세지가 발생된다 이러면 경로를 미리 지정후 다시 실행
1 |
export HTTPD=/usr/local/apache/bin/apachectl
1 |
export APXS2=/usr/local/apache/bin/apxs
1 |
화면대로 진행하면 된다.
1 |
<span style="font-size: 12pt;"><code style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;">/usr/local/bin/passenger-install-apache2-module </code></span> |
1 2 |
<span style="font-size: 12pt;"><code style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;">vi /usr/local/apache/conf/httpd.conf </code></span> |
At the bottom of this file include the supplied module loader supplied by the Passenger installer.
1 2 3 4 5 6 |
<span style="font-size: 12pt;"><code style="font-family: Inconsolata, monospace, sans-serif; font-size: inherit; border: none; border-radius: 2px; word-break: normal; background: transparent;"><span style="font-size: 10pt;">LoadModule passenger_module /usr/local/lib/ruby/gems/2.0.0/gems/passenger-5.0.10/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /usr/local/lib/ruby/gems/2.0.0/gems/passenger-5.0.10 PassengerDefaultRuby /usr/local/bin/ruby </IfModule> </span> </code></span> |