1. rbenv 설치하기

$ cd
$ git clone git://github.com/sstephenson/rbenv.git .rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
$ git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
$ source ~/.bashrc

2. rbenv 설치확인

$ rbenv


3. ruby 설치

rbenv install <ruby-version>
rbenv local <ruby-version>
//전역적으로 실행되길 바란다면
//renv global <ruby-version>
rbenv rehash
  • 버전확인: Ruby Download
  • 경우에 따라 OpenSSL lib가 필요하다고 요청하는 경우가 있다.
    $ sudo apt-get install libssl-dev
    

4. ruby 설치 확인

$ ruby --version



우분투의 언어설정을 변경하면, 그에 따라 우분투의 기본 폴더가 변경되는 특징을 가진다. 일본어로 테스트할 것이 있어서 시스템 환경을 일본어로 변경했다가 한국어로 변경했지만, 기본 폴더들이 일본어로 되어 있어, 이를 수정할 방법을 검색하다가 발견했다.

순서

  1. user-dirs.dirs 삭제
    $ rm ~/.config/user-dirs.dirs
    
  2. xdg-user-dirs-update 실행
    $ xdg-user-dirs-update
    
  3. ~/.config/user-dirs.dirs 수정
    # This file is written by xdg-user-dirs-update
    # If you want to change or add directories, just edit the line you're
    # interested in. All local changes will be retained on the next run
    # Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
    # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
    # absolute path. No other format is supported.
    # 
    XDG_DESKTOP_DIR="$HOME/desktop"
    XDG_DOWNLOAD_DIR="$HOME/downloads"
    XDG_TEMPLATES_DIR="$HOME/template"
    XDG_PUBLICSHARE_DIR="$HOME/share"
    XDG_DOCUMENTS_DIR="$HOME/documents"
    XDG_MUSIC_DIR="$HOME/music"
    XDG_PICTURES_DIR="$HOME/picture"
    XDG_VIDEOS_DIR="$HOME/video"


참고사이트  : http://wiki.nginx.org/Install

sudo -s
nginx=stable # use nginx=development for latest development version
add-apt-repository ppa:nginx/$nginx
apt-get update 
apt-get install nginx


요즘 XML 설정이 복잡한 메이븐Maven(http://maven.apache.org/) 대신 그레들Gradle(http://www.gradle.org/)이 사람들의 많은 관심을 받고 있다. 그루비Groovy를 바탕으로 하는 자동화 배포툴이라고 할 수 있으려나? 설정이 간략화되는 것에 대해서 높은 점수를 받고 있는 것으로 보인다. 그루비를 배워야 하나? ㅡ0-)?

안드로이드 배포툴도 그레들로 나오기 시작하던데...


우분투에서 Gradle 설치를 위한 명령어는 간단하다.

    $ sudo apt-get install gradle

honeymon@honeymon-ubuntu:~$ sudo apt-get install gradle

[sudo] password for honeymon: 

패키지 목록을 읽는 중입니다... 완료

의존성 트리를 만드는 중입니다       

상태 정보를 읽는 중입니다... 완료

다음 패키지를 더 설치할 것입니다:

  ant ant-optional antlr aspectj binfmt-support bnd bsh bsh-gcj checkstyle

  default-jdk default-jre default-jre-headless eclipse-jdt eclipse-pde

  eclipse-platform eclipse-platform-data eclipse-rcp fastjar fop gcj-4.6-base

  gcj-4.6-jre-lib groovy ivy jarwrapper junit junit4 libantlr-java

  libapache-pom-java libapr1 libaprutil1 libasm3-java libaspectj-java

  libavalon-framework-java libbatik-java libbindex-java libbonoboui2-0

  libbonoboui2-common libbsf-java libclassworlds-java libcodenarc-groovy-java

  libcommons-beanutils-java libcommons-cli-java libcommons-collections3-java

  libcommons-compress-java libcommons-configuration-java libcommons-dbcp-java

  libcommons-digester-java libcommons-el-java libcommons-httpclient-java

  libcommons-io-java libcommons-jexl-java libcommons-jxpath-java

  libcommons-lang-java libcommons-logging-java libcommons-net2-java

  libcommons-parent-java libcommons-pool-java libcommons-vfs-java libdb-java

  libdb-je-java libdb4.8 libdb5.1-java libdb5.1-java-gcj libdoxia-java

  libeasymock-java libecj-java libequinox-osgi-java libfop-java

  libganymed-ssh2-java libgcj-bc libgcj-common libgcj12

  libgeronimo-jpa-2.0-spec-java libgeronimo-jta-1.1-spec-java

  libgeronimo-osgi-support-java libglade2-0 libgmetrics-groovy-java

  libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0 libgnomeui-common

  libgnuinet-java libgnujaf-java libgnumail-java libgoogle-collections-java

  libgradle-announce-java libgradle-antlr-java libgradle-code-quality-java

  libgradle-core-java libgradle-ide-java libgradle-jetty-java

  libgradle-maven-java libgradle-osgi-java libgradle-plugins-java

  libgradle-scala-java libgradle-wrapper-java libhamcrest-java

  libhawtjni-runtime-java libhttpclient-java libhttpcore-java

  libicu4j-4.4-java libicu4j-java libitext1-java libjansi-java

  libjansi-native-java libjasper-java libjetty-extra libjetty-extra-java

  libjetty-java libjline-java libjna-java libjna-posix-java libjoptsimple-java

  libjsch-java libjsoup-java libjsr305-java libjtidy-java libjzlib-java

  liblogback-java liblucene2-java libmaven-ant-tasks-java libmaven-scm-java

  libmaven2-core-java libmockobjects-java libmodello-java libmx4j-java

  libnetbeans-cvsclient-java libosgi-compendium-java libosgi-core-java

  libosgi-foundation-ee-java libplexus-ant-factory-java

  libplexus-archiver-java libplexus-bsh-factory-java libplexus-build-api-java

  libplexus-cipher-java libplexus-classworlds-java

  libplexus-component-api-java libplexus-container-default-java

  libplexus-containers-java libplexus-i18n-java

  libplexus-interactivity-api-java libplexus-interpolation-java

  libplexus-io-java libplexus-sec-dispatcher-java libplexus-utils-java

  libregexp-java librhino-java libsaxon-java libservlet2.4-java libslf4j-java

  libsvn-java libsvn1 libsvnkit-java libswt-cairo-gtk-3-jni

  libswt-glx-gtk-3-jni libswt-gnome-gtk-3-jni libswt-gtk-3-java

  libswt-gtk-3-jni libswt-webkit-gtk-3-jni libtomcat6-java

  libtrilead-ssh2-java libwagon-java libxbean-java libxmlgraphics-commons-java

  libxstream-java openjdk-6-jdk rhino sat4j testng

제안하는 패키지:

  ant-gcj ant-doc liboro-java jython libjdepend-java libcommons-net-java

  javacc ant-optional-gcj bsh-doc eclipse fop-doc groovy-doc libbcprov-java

  libbcpg-java ivy-doc junit-doc libavalon-framework-java-doc

  libclassworlds-java-doc libcodenarc-groovy-java-doc

  libcommons-beanutils-java-doc libcommons-collections3-java-doc

  libgeronimo-jta-1.0.1b-spec-java libcommons-digester-java-doc

  libcommons-httpclient-java-doc libcommons-io-java-doc

  libcommons-jxpath-java-doc libcommons-logging-java-doc

  libexcalibur-logkit-java libcommons-net2-java-doc libcommons-vfs-java-doc

  libdoxia-java-doc libeasymock-java-doc ecj libecj-java-gcj libgcj12-dbg

  libgcj12-awt libgeronimo-jpa-2.0-spec-java-doc libgeronimo-jta-java-doc

  libgeronimo-osgi-support-java-doc libgmetrics-groovy-java-doc

  libgnumail-java-doc gradle-doc maven2 scala jetty libjetty-java-doc

  libjline-java-doc libjna-java-doc libjsoup-java-doc libjsr305-java-doc

  libjtidy-java-doc glassfish-javaee janino libmaven-scm-java-doc

  libmodello-java-doc libhessian-java libosgi-compendium-java-doc

  libosgi-core-java-doc libosgi-foundation-ee-java-doc

  libplexus-build-api-java-doc libplexus-cipher-java-doc

  libplexus-classworlds-java-doc libplexus-component-api-java-doc

  libplexus-container-default-java-doc libplexus-i18n-java-doc

  libplexus-interactivity-api-java-doc libplexus-interpolation-java-doc

  libplexus-sec-dispatcher-java-doc libplexus-utils-java-doc libsaxon-java-doc

  libswt-gtk-3-java-gcj tomcat6 libwagon-java-doc libspring-core-java

  libspring-beans-java libspring-context-java libspring-web-java

  libjoda-time-java libstax-java libcglib2.1-java libjettison-java

  openjdk-6-demo openjdk-6-source visualvm librhino-java-doc testng-doc

다음 새 패키지를 설치할 것입니다:

  ant ant-optional antlr aspectj binfmt-support bnd bsh bsh-gcj checkstyle

  default-jdk default-jre default-jre-headless eclipse-jdt eclipse-pde

  eclipse-platform eclipse-platform-data eclipse-rcp fastjar fop gcj-4.6-base

  gcj-4.6-jre-lib gradle groovy ivy jarwrapper junit junit4 libantlr-java

  libapache-pom-java libapr1 libaprutil1 libasm3-java libaspectj-java

  libavalon-framework-java libbatik-java libbindex-java libbonoboui2-0

  libbonoboui2-common libbsf-java libclassworlds-java libcodenarc-groovy-java

  libcommons-beanutils-java libcommons-cli-java libcommons-collections3-java

  libcommons-compress-java libcommons-configuration-java libcommons-dbcp-java

  libcommons-digester-java libcommons-el-java libcommons-httpclient-java

  libcommons-io-java libcommons-jexl-java libcommons-jxpath-java

  libcommons-lang-java libcommons-logging-java libcommons-net2-java

  libcommons-parent-java libcommons-pool-java libcommons-vfs-java libdb-java

  libdb-je-java libdb4.8 libdb5.1-java libdb5.1-java-gcj libdoxia-java

  libeasymock-java libecj-java libequinox-osgi-java libfop-java

  libganymed-ssh2-java libgcj-bc libgcj-common libgcj12

  libgeronimo-jpa-2.0-spec-java libgeronimo-jta-1.1-spec-java

  libgeronimo-osgi-support-java libglade2-0 libgmetrics-groovy-java

  libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0 libgnomeui-common

  libgnuinet-java libgnujaf-java libgnumail-java libgoogle-collections-java

  libgradle-announce-java libgradle-antlr-java libgradle-code-quality-java

  libgradle-core-java libgradle-ide-java libgradle-jetty-java

  libgradle-maven-java libgradle-osgi-java libgradle-plugins-java

  libgradle-scala-java libgradle-wrapper-java libhamcrest-java

  libhawtjni-runtime-java libhttpclient-java libhttpcore-java

  libicu4j-4.4-java libicu4j-java libitext1-java libjansi-java

  libjansi-native-java libjasper-java libjetty-extra libjetty-extra-java

  libjetty-java libjline-java libjna-java libjna-posix-java libjoptsimple-java

  libjsch-java libjsoup-java libjsr305-java libjtidy-java libjzlib-java

  liblogback-java liblucene2-java libmaven-ant-tasks-java libmaven-scm-java

  libmaven2-core-java libmockobjects-java libmodello-java libmx4j-java

  libnetbeans-cvsclient-java libosgi-compendium-java libosgi-core-java

  libosgi-foundation-ee-java libplexus-ant-factory-java

  libplexus-archiver-java libplexus-bsh-factory-java libplexus-build-api-java

  libplexus-cipher-java libplexus-classworlds-java

  libplexus-component-api-java libplexus-container-default-java

  libplexus-containers-java libplexus-i18n-java

  libplexus-interactivity-api-java libplexus-interpolation-java

  libplexus-io-java libplexus-sec-dispatcher-java libplexus-utils-java

  libregexp-java librhino-java libsaxon-java libservlet2.4-java libslf4j-java

  libsvn-java libsvn1 libsvnkit-java libswt-cairo-gtk-3-jni

  libswt-glx-gtk-3-jni libswt-gnome-gtk-3-jni libswt-gtk-3-java

  libswt-gtk-3-jni libswt-webkit-gtk-3-jni libtomcat6-java

  libtrilead-ssh2-java libwagon-java libxbean-java libxmlgraphics-commons-java

  libxstream-java openjdk-6-jdk rhino sat4j testng

0개 업그레이드, 170개 새로 설치, 0개 제거 및 5개 업그레이드 안 함.

279 M바이트 아카이브를 받아야 합니다.

이 작업 후 407 M바이트의 디스크 공간을 더 사용하게 됩니다.

계속 하시겠습니까 [Y/n]?


관련해서 설치해야하는 gradle이 억수로 많네~ ㅡ0-)>


   설치 확인!  
 

honeymon@honeymon-ubuntu:~$ gradle

:help

Welcome to Gradle 1.0-milestone-3.

To run a build, run gradle <task> ...

To see a list of available tasks, run gradle tasks

To see a list of command-line options, run gradle --help

BUILD SUCCESSFUL

Total time: 1.615 secs

honeymon@honeymon-ubuntu:~$


 

그레들 버전 확인

 

$ gradle -v

honeymon@honeymon-ubuntu:~$ gradle -v

------------------------------------------------------------

Gradle 1.0-milestone-3

------------------------------------------------------------

Gradle build time: Thursday, September 8, 2011 4:06:52 PM UTC

Groovy: 1.8.6

Ant: Apache Ant(TM) version 1.8.2 compiled on December 3 2011

Ivy: non official version

JVM: 1.6.0_27 (Sun Microsystems Inc. 20.0-b12)

OS: Linux 3.5.0-25-generic amd64

honeymon@honeymon-ubuntu:~$ 


 

 그레들 설치 위치  

 

/usr/share/gradle


 

 참고사이트

 

* 손권남님의 위키 : http://wiki.kwonnam.pe.kr/gradle

* Gradle/lean :http://www.gradle.org/learn



- RVM(Ruby Version Manager)를 이용




터미널에서

$ curl -L https://get.rvm.io | bash -s stable --ruby

라고 실행하면, RVM(https://rvm.io/)을 통해서 최신버전의 Ruby를 설치해준다.

맥에서도 잘 되고, 우분투에서도 잘 되고~

현재(2013년 1월) 설치된 버전은 1.9.3p362 다.

+ Recent posts