在mac os x下安装Rstudio server 免费版

你需要安装有git。安装方法请google.

1. 下载源文件

git clone https://github.com/rstudio/rstudio.git

2. 安装依赖文件

cd rstudio/dependencies/osx/
sudo ./install-dependencies-osx
cd ../.. # Go back to rstudio directory

3. build并安装

mkdir build
cd build
cmake -DRSTUDIO_TARGET=Server -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/Applications/RSudio.Server ..
sudo make install

4. 设置自动启动
建立/Library/LaunchDaemons/org.rstudio.launchd.rserver.plist文件,其内容是:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
        "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>com.rstudio.launchd.rstudio</string>
        <key>ProgramArguments</key>
        <array>
                <string>/Applications/RSudio.Server/bin/rserver</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
</dict>
</plist>

5. 设置权限
建立/etc/rstudio/rserver.conf 文件,其内容是:

auth-minimum-user-id=500

6. 运行

sudo defaults write /Library/LaunchDaemons/org.rstudio.launchd.rserver.plist Disabled -bool false
sudo launchctl load /Library/LaunchDaemons/org.rstudio.launchd.rserver.plist

7. 测试
打开http://localhost:8787测试吧。

Leave a Reply

  

  

  

%d 博主赞过: