문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 다음 판 양쪽 다음 판 | ||
develop:ruby [2007/04/02 22:23] mattabu |
develop:ruby [2014/04/10 11:21] starlits |
||
---|---|---|---|
줄 1: | 줄 1: | ||
====== Ruby ====== | ====== Ruby ====== | ||
- | ===== Using Ruby on Debian Linux ===== | + | - [[develop:ruby:install |
- | ==== Install on Debian Linux ==== | + | - [[develop: |
- | Debian Linux (Sarge) 에서 지원되는 | + | |
- | 다음과 같이 설치하면 된다. | + | |
- | < | + | |
- | # apt-get | + | |
- | </ | + | |
- | * The **irb** is acronym for Interactive RuBy. It evaluates | + | |
- | | + | |
- | + | ||
- | ==== Install RubyGems ==== | + | |
- | RubyGems는 Ruby의 표준 패키지 관리프로그램이다. | + | |
- | < | + | |
- | # apt-get install rubygems | + | |
- | </ | + | |
===== Set Rails Environment (1) ===== | ===== Set Rails Environment (1) ===== | ||
줄 90: | 줄 77: | ||
==== Setting Apache2 ==== | ==== Setting Apache2 ==== | ||
< | < | ||
- | # vi /opt/rails/apache2/conf/ | + | # cd /etc/apache2/mods-enabled |
- | LoadModule php5_module modules/ | + | # ln -s ../mods-available/ |
- | AddType application/ | + | </code> |
- | AddType application/x-httpd-php-source .phps | + | < |
- | DirectoryIndex index.php index.html | + | # vi /etc/apache2/sites-available/test |
- | Include conf/extra/ | + | |
- | # vi /opt/rails/apache2/conf/ | + | |
- | # PHP 파트 | + | |
- | < | + | |
- | Options Indexes FollowSymLinks | + | |
- | AllowOverride None | + | |
- | Order allow, | + | |
- | Allow from all | + | |
- | </Directory> | + | |
< | < | ||
- | DocumentRoot PHP웹루트디렉토리 | ||
ServerName PHP도메인이름 | ServerName PHP도메인이름 | ||
+ | DocumentRoot PHP웹루트디렉토리 | ||
</ | </ | ||
- | # Rais 파트 | ||
- | < | ||
- | Options Indexes FollowSymLinks | ||
- | AllowOverride None | ||
- | Order allow,deny | ||
- | Allow from all | ||
- | </ | ||
< | < | ||
ServerName RAILS도메인이름 | ServerName RAILS도메인이름 | ||
+ | DocumentRoot RAILS웹루트디렉토리 | ||
+ | |||
RewriteEngine On | RewriteEngine On | ||
RewriteCond %{DOCUMENT_ROOT}/ | RewriteCond %{DOCUMENT_ROOT}/ | ||
줄 130: | 줄 103: | ||
BrowserMatch bMSIE !no-gzip !gzip-only-text/ | BrowserMatch bMSIE !no-gzip !gzip-only-text/ | ||
</ | </ | ||
+ | # cd / | ||
+ | # ln -s ../ | ||
</ | </ | ||
줄 144: | 줄 119: | ||
# mongrel_rails start -d -p 8001 -e production -P log/ | # mongrel_rails start -d -p 8001 -e production -P log/ | ||
# mongrel_rails start -d -p 8002 -e production -P log/ | # mongrel_rails start -d -p 8002 -e production -P log/ | ||
- | # /opt/rails/apache2/ | + | # /etc/init.d/apache2 start |
</ | </ | ||
이렇게 하고 해당 URL을 웹브라우저로 접근해 본다. ^^ | 이렇게 하고 해당 URL을 웹브라우저로 접근해 본다. ^^ | ||
줄 171: | 줄 146: | ||
===== 기타 ===== | ===== 기타 ===== | ||
==== Install lighttpd ==== | ==== Install lighttpd ==== | ||
- | RoR에 가장 적합한 환경인 lighttpd + FCGI 환경을 구축하려는데, | + | RoR에 가장 적합한 환경인 lighttpd + FCGI 환경을 구축하려는데, |
+ | 그러므로 별도로 패키지를 받아서 설치해야 한다. 먼저 lighttpd 를 설치하기전에 필요한 패키지부터 설치한다. | ||
< | < | ||
# apt-get install libpcre3 zlib1g | # apt-get install libpcre3 zlib1g | ||
줄 213: | 줄 189: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
- |