Rstudio Server vs El Capitan
Solution 1:
You forgot to install and launch the related launch daemon and modify some other things. To fix this do the following:
-
Copy a pre-made plist:
sudo cp /usr/local/opt/rstudio-server/share/com.rstudio.launchd.rserver.plist /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist
-
Check permissions:
sudo chown root:wheel /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist sudo chmod 644 /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist
-
Modify the plist:
sudo nano /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist
and replace
<key>ProgramArguments</key> <array> <string>/usr/local/opt/rstudio-server/bin/rserver</string> <string>--server-daemonize=0</string> </array>
by
<key>ProgramArguments</key> <array> <string>/usr/local/opt/rstudio-server/bin/rserver</string> <string>--server-daemonize=0</string> <string>--auth-minimum-user-id=500</string> </array>
This step is necessary because rstudio-server's default auth-minimum-user-id is 1000 and the common OS X user's first ID is 501, the second user's ID is 502 etc.
-
Copy a pam:
sudo cp /etc/pam.d/ftpd /etc/pam.d/rstudio
-
Launch the daemon and start rstudio:
sudo launchctl load -w /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist sudo rstudio-server start
Finally launch a broswer, enter localhost:8787 in the address bar and log-in with your OS X user credentials.
To stop rstudio server enter sudo rstudio-server stop
. After a reboot you have to enter sudo rstudio-server start
to start it again.
If you want the rstudio-server to be launched automatically while booting, stop the server, unload the launch daemon,
sudo rstudio-server stop
sudo launchctl unload -w /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist
modify the file /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist with nano and set the RunAtLoad key from false to true. Finally load the launch daemon again:
sudo launchctl load -w /Library/LaunchDaemons/com.rstudio.launchd.rserver.plist
Solution 2:
I Just want to give some updates for the updated formula rstudio-server v1.0.153
.
Some of the files have been relocated for consistency.
/usr/local/opt/rstudio-server/share/com.rstudio.launchd.rserver.plist
was moved to
/usr/local/opt/rstudio-server/extras/launchd/com.rstudio.launchd.rserver.plist
and the pam file is now bundled with the formula
/usr/local/opt/rstudio-server/extras/pam/rstudio