Rocks Clusters 6 (CentOS 6) 에서 R 설치

 

* 소스로 설치하는 방법 (현재 CentOS 6를 위한 rpm을 제공하지 않고 있어서 소스로 설치함)

 

1. 다운로드

http://cran.nexr.com/src/base/R-2/R-2.15.2.tar.gz

 

2. 관련 모듈 설치

http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm

다운로드 받아서 설치 (이모듈을 설치하지 않으면 make 시 attach라는 function이 없다고 나옴)

Error: could not find function "attach"

$> rpm -i epel-release-6-7.noarch.rpm

* 기타 모듈 gcc, libgcc, cpp, libgfortran 등등 모듈 설치 확인

 

3. 설치

$> tar xvfz R-2.15.2.tar.gz

$> cd R-2.15.2

$> mkdir makeout

$> ./configure --prefix=/path/makeout --with-readline=no

$> make

$> make install

 

실행파일 /path/R-2.12.1/bin/R

 

 

<Rocks Clusters 5에서 R 2.15.2설치>

$> tar xvfz R-2.15.2.tar.gz

$> cd R-2.15.2

$> ./configure --prefix=/path/makeout --with-readline=no

$> make

$> make install

 

$> touch R_HOME/etc/Rprofile.site  # touch /usr/lib64/R/etc/Rprofile.site

$> cd R_HOME/etc/

$> vi Rprofile.site

options(repos=c(CRAN="http://미러서버아이피/cran"))

$> R

R> install.packages("ENmisc")

'TA > Common' 카테고리의 다른 글

nmap  (0) 2013.02.04
ping, tracert, traceroute  (0) 2013.02.04
grep 사용시 or 사용 방법  (0) 2013.02.04
umount: device is busy  (0) 2013.02.04
glusterfs 3.3 설치 및 구성  (0) 2013.02.04
Posted by 옥탑방람보
,

http://www.bioconductor.org/about/mirrors/mirror-how-to/

 

1. 방화벽 오픈 - 873번

 

2. 데이터 다운로드

    $> rsync -zrtlv --delete bioconductor.org::2.11 /local/bioc/packages/2.11

3. 아파치에 연결

    $> ln -s /local/bioc /var/www/html/bioconductor

4. 연결 정보 변경

5. bioconductor 설치

6. bioconductor 내 cran 사이트 설정부분 변경 및 brainarray 데이터 주소 삭제

    * biocLite() 시 시간이 오래 소요되는 원인을 찾는 중 확인된 사항임

    $bioconductor 미러서버> cd /local/bioc/packages/2.11/bioc/src/contrib/

    $bioconductor 미러서버> cp BiocInstaller_1.8.3.tar.gz BiocInstaller_1.8.3.tar.gz.ori

    $bioconductor 미러서버> tar xvfz BiocInstaller_1.8.3.tar.gz

    $bioconductor 미러서버> vim BiocInstaller/R/biocLite.R

      repos["CRAN"] <- "http://XXX/cran"   #86번째줄의 정보를 구축된 미러사이트 주소로 변경

      #repos[["MBNI"]] <- mbniUrl   #89번째줄의 내용을 주석처리함 (추후 http://brainarray.mbni.med.umich.edu/bioc 데이터 받고 나면 mbniUrl 부분을 데이터 받은 서버 주소로 변경해서 반영할 필요 있음)

    $bioconductor 미러서버> tar cvfz BiocInstaller_1.8.3.tar.gz BiocInstaller

     

    $설치할 서버> cd /home/bio/install/R/library/BiocInstaller

    $설치할 서버> R

    $R> source("http://XXX/bioconductor/packages/2.11/biocLite.R")

    $R> biocLite()

Posted by 옥탑방람보
,

<Cran Mirror Howto>

http://cran.r-project.org/mirror-howto.html

1. (미러서버) 방화벽 오픈

    ftp.kaist.ac.kr (21,22,80,873)

    cran.r-project.org (21,22,80,873) - 873만 뚫으면 됨.

2. (미러서버) rsync로 데이터 동기화

    rsync -rtlzv --delete cran.r-project.org::CRAN /local/cran/    # kaist의 경우 ftp.kaist.ac.kr::cran (소문자)

3. (미러서버) 아파치 구동 (외부로 80포트 뚫여있어야 함)

    $> vi /etc/httpd/conf/httpd.conf

    ...

    LoadModule rewrite_module modules/mod_rewrite.so       # uncomment

    ...

    AddType text/html .shtml

    ...

    AddHander server-parsed .shtml

    ...

    RewriteEngine on

    RewriteRule /cran/package=(.+) /cran/web/packages/$1/index.html [R=seeother]   # http://XXX/cran/ 을 홈디렉토리로 사용할 경우

    RewriteRule /cran/view=(.+) /cran/web/views/$1.html [R=seeother]

    $> /etc/init.d/httpd restart

4. (클라이언트 서버) CRAN repository 사이트 설정

    $> touch R_HOME/etc/Rprofile.site  # touch /usr/lib64/R/etc/Rprofile.site

    $> cd R_HOME/etc/Rprofile.site

    $> vi Rprofile.site

    options(repos=c(CRAN="http://미러서버아이피/cran"))

     

<rocks clusters>

$> cp R_HOME/etc/Rprofile.site /export

$> rocks run host "mount -t nfs masterHostName:/export /mnt"

$> rocks run host "cp /mnt/Rprofile.site R_HOME/etc/"

$> rocks run host "umount /mnt"

$> rm /export/Rprofile.site

 

* 완료 테스트

R> install.packages("ggplot2")  # over R version 2.14

R> install.packages("ENmisc")

 

Posted by 옥탑방람보
,