#title RStudio Server 세팅 CentOS6 다음과 같은 오류의 경우 {{{ Error: Cannot find a valid baseurl for repo: base }}} 다음을 수정한다. {{{ vi /etc/yum.repos.d/CentOS-Base.repo }}} {{{ [base] name=CentOS-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-$releasever - Updates #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 }}} {{{ yum update -y yum clean all yum install -y R }}} 버전이 낮다. 다음의 링크를 참고하여 3.x 버전을 설치하자. * [https://www.programmersought.com/article/61641226713/ Install R-3.3.2 and Rstudio-server in centOS 6 environment] {{{ yum install readline-devel yum install libXt-devel wget https://www.zlib.net/fossils/zlib-1.2.5.1.tar.gz tar xvf zlib-1.2.5.1.tar.gz cd zlib-1.2.5.1 ./configure --prefix=/root/library make && make install wget https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz tar xzvf bzip2-1.0.8.tar.gz cd bzip2-1.0.8 make -f Makefile-libbz2_so make clean make make -n install PREFIX=/root/library wget https://tukaani.org/xz/xz-5.2.4.tar.gz tar -zxf xz-5.2.4.tar.gz cd xz-5.2.4 ./configure --prefix=/root/library make && make install wget https://ftp.pcre.org/pub/pcre/pcre-8.42.tar.gz tar -zxf pcre-8.42.tar.gz cd pcre-8.42 ./configure --prefix=/root/library --enable-utf8 make && make install cd /root/library/include mkdir pcre ln -s pcre* pcre/. wget https://tukaani.org/xz/xz-5.2.4.tar.gz tar -zxf xz-5.2.4.tar.gz cd xz-5.2.4 ./configure --prefix=/root/library make && make install wget https://cran.r-project.org/src/base/R-3/R-3.3.2.tar.gz tar -zxvf R-3.3.2.tar.gz cd R-3.3.2 ./configure --prefix=/PATH/TO/INSTALL/R --enable-R-shlib LDFLAGS="-L/root/library/lib/" CPPFLAGS="-I/root/library/include/" make && make install }}} {{{ wget https://download2.rstudio.org/server/centos6/x86_64/rstudio-server-rhel-1.2.5042-x86_64.rpm yum install rstudio-server-rhel-1.2.5042-x86_64.rpm }}} 포트는 8787이다. ---- https://dailies.rstudio.com/rstudioserver/oss/redhat6/x86_64/ --> RStudio daily builds {{{ R설치 sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm sudo yum install tcl sudo yum clean all sudo yum install R R-Stuio 설치 wget http://download2.rstudio.org/rstudio-server-0.97.449-x86_64.rpm sudo yum install --nogpgcheck rstudio-server-0.97.449-x86_64.rpm ODBC 설치 wget http://download.microsoft.com/download/B/C/D/BCDD264C-7517-4B7D-8159-C99FC5535680/RedHat6/msodbcsql-11.0.2270.0.tar.gz tar -xzf msodbcsql-11.0.2270.0.tar.gz cd msodbcsql-11.0.2270.0 다음의 주소에서 다운로드 --> ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.0.tar.gz unixODBC 다시 인스톨 --> http://msdn.microsoft.com/ko-kr/library/hh568449.aspx --> unixODBC-2.3.0 버전으로... ./build_dm.sh --download-url=file://unixODBC-2.3.0.tar.gz 쪼메 기둘림... cd /tmp/unixODBC.19477.9801.16933/unixODBC-2.3.0 sudo make install cd /home/dw_admin/msodbcsql-11.0.2270.0 sudo ./install.sh install sudo odbcinst -q -d -n "ODBC Driver 11 for SQL Server" sudo odbcinst -q -d -n "MSSQL36" FreeTDS 설치 sudo yum install freetds sudo vi /etc/odbc.ini [SQLSERVER_36] Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0 Server=192.168.201.36,1433 테스트.. isql -v SQLSERVER_36 로그인 패스워드 install.packages("RODBC") library("RODBC") conn <- odbcConnect("SQLSERVER_36",uid="id", pwd="pw") sqlQuery(conn, sql1) wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm yum install R install.packages("gtools") install.packages("gdata") install.packages("caTools") install.packages("gplots", pkgs="/home/rstudio_user/gplots_2.11.0.1.tar.gz", repos = NULL) install.packages("ROCR") }}}