• Install R & RStudio for Ubuntu


    Install R

    r-project.org official source to install the latest R system.

    add R source

     
    sudo vi /etc/apt/sources.list
    # append below line to end of sources.list
    # you can view mirror at http://cran.r-project.org/mirrors.html
    deb http://ftp.ctex.org/mirrors/CRAN/bin/linux/ubuntu precise/

    import the GPG key and install r-base

     
    cd ~
    gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E084DAB9
    gpg -a --export E084DAB9 | sudo apt-key add -
    apt-get upgrade
    apt-get install r-base
    ROracle is much faster compare with RODBC or RJDBC in performance, You can found new version of ROracle or DBI package in CRAN, it is also required you properly install the Oracle Instant Client.
    manual install the ROracle
     
    wget http://cran.r-project.org/src/contrib/DBI_0.2-7.tar.gz
    R CMD INSTALL DBI_0.2-7.tar.gz
    wget http://cran.r-project.org/src/contrib/ROracle_1.1-11.tar.gz
    R CMD INSTALL --configure-args='--with-oci-inc=/opt/oracle/instantclient_11_2/sdk/include --with-oci-lib=/opt/oracle/instantclient_11_2' ROracle_1.1-11.tar.gz
    RStudio Server

    Install RStudio Server

     
    apt-get install gdebi-core
    apt-get install libapparmor1 # Required only for Ubuntu, not Debian
    wget http://download2.rstudio.org/rstudio-server-0.97.551-i386.deb
    gdebi rstudio-server-0.97.551-i386.deb
    rstudio-server verify-installation
     
    echo 'rsession-memory-limit-mb=1000' > /etc/rstudio/rserver.conf
    echo 'rsession-stack-limit-mb=4' >> /etc/rstudio/rserver.conf
    echo 'rsession-process-limit=20' >> /etc/rstudio/rserver.conf
    # Only pass below if you will using proxy mode
    echo 'www-address=127.0.0.1' >> /etc/rstudio/rserver.conf
    groupadd rstudio
    This section is optional, assured already install nginx in server.
     
    # do not forgot link to /opt/nginx/conf/vhosts
    server {
    listen 80;
    server_name cvprstudio;
    location / {
    proxy_pass http://localhost:8787;
    proxy_redirect http://localhost:8787/ $scheme://$host/;
    }
    }
     
    ln -s /usr/lib/rstudio-server/extras/init.d/debian/rstudio-server /etc/init.d/rstudio-server
    vi /etc/init.d/rstudio-server
    vi
     
    # append below line to /usr/lib/rstudio-server/extras/init.d/debian/rstudio-server SCRIPTNAME
    ORACLE_BASE=/opt/oracle
    ORACLE_HOME=/opt/oracle/instantclient_11_2
    TNS_ADMIN=/opt/oracle/network/admin
    NLS_LANG=AMERICAN_AMERICA.AL32UTF8
    Now you can restart rstudio-server via standard init.d service way
     
    /etc/init.d/rstudio-server restart
     
    adduser --ingroup rstudio cindy
    passwd cindy # setting password
    Usually it is more good to upgrade the r-base in system wide packages instead of per user.
    after run R in root console
     
    update.packages() # select mirror to check


  • 相关阅读:
    迅为4412开发板一键烧写QT程序到开发板
    迅为-i.IMX6Q开发板QT系统移植wifi-mt6620(一)
    迅为3399开发板人工智能测试-对象检测
    迅为IMX6ULL开发板搭建 Web 服务器
    迅为IMX6开发板AndroidStudio-ledtest小灯_测试
    迅为3399开发板Android7/Android8修改开机动画
    layui
    MyBatis
    开发过程,一个完整的开发过程需要完成哪些工作?分别由哪些不同的角色来完成这些工作?
    做好测试计划工作的关键是什么?
  • 原文地址:https://www.cnblogs.com/xiaojikuaipao/p/5107723.html
Copyright © 2020-2023  润新知