Please take a moment to review the RStudio product documentation page:
Please bookmark this page - you will refer to this frequently during the course.
Notice that the documentation page is organized in a logical flow for each product:
Take a look at the support documents:
You must download RStudio Server Pro for the correct operating system.
What OS are you using in this classroom virtual machine?
Since you previously installed R from pre-compiled binaries, R is not automatically on your PATH.
To add R to your path, you can use:
Note that this is not permanent!
For production use RStudio strongly recommends you use the supported version of RStudio Server Pro.
You can find the installation instructions in the documentation page at https://docs.rstudio.com/rsp/installation/
(The instructions in this exercise are based on this.)
Make sure you select the instructions for the correct operating system!
Run the download and install script on that page.
Hint: Remember to use
/usr/local/src as the download destination
cd /usr/local/src sudo apt-get install gdebi-core curl -O https://download2.rstudio.org/server/trusty/amd64/rstudio-server-pro-1.2.5042-1-amd64.deb sudo gdebi rstudio-server-pro-1.2.5042-1-amd64.deb
The process should be similar to this screen cast:
If you get the following error message:
Jan 10 20:01:45 ip-10-8-8-27 systemd: Starting RStudio Server... Jan 10 20:01:45 ip-10-8-8-27 systemd: Started RStudio Server. Jan 10 20:01:45 ip-10-8-8-27 rserver: ERROR Unable to find an installation of R on the system (which R did not return v.cpp:531 Jan 10 20:01:45 ip-10-8-8-27 systemd: rstudio-server.service: Main process exited, code=exited, status=1/FAILURE Jan 10 20:01:45 ip-10-8-8-27 systemd: rstudio-server.service: Failed with result 'exit-code'.
It means you installed the open source version of RStudio Server.
To fix this, you should:
You can safely install RStudio Server Pro on top of the open source RStudio Server. Specifically, you don’t have to remove any installation folders or files.
How to know you were successful?
If the final few lines of output from the install script looks similar to this, you have been successful.
● rstudio-server.service - RStudio Server Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2019-01-10 20:12:30 UTC; 1s ago Process: 27029 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
You are looking for the words
active (running) in the output, quite near the top.
Note that there might also be other process information in the output - just look for
Remember the original login page (https://rstd.io/class)?
Click on the URL link to take you to your own Getting Started page. From here, click on the link for RStudio Server Pro.
Then, on the sign-in page, sign in with the classroom credentials:
This should log you into RStudio Server Pro.
Note that your browser might issue a warning since it is generally unsafe to use an unencrypted HTTP connection when a password has to be provided.
You have now completed this part of the exercise, but here are some additional references to getting system status, as well as stopping and starting the server.
Running the verify installation command:
sudo rstudio-server stop sudo rstudio-server verify-installation sudo rstudio-server start
Remember to prefix these commands with
sudo if you’re not the root user. Otherwise you may get permissions errors.
To restart the RSP service and check its status, run these commands (with
sudo if necessary):
sudo rstudio-server restart sudo rstudio-server status
Don’t worry if you get the message
rsession: no process found when you run
rstudio-server restart: it’s standard in the RSP world.
Note that you can expect to see a lot of service-related output, in addition to the actual server status. The important part is to see
active (running) near the top of the output from
For example, the following output indicates a healthy running server.
admin-user@ip-10-8-8-193:/usr/local/src$ rstudio-server status ● rstudio-server.service - RStudio Server Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2019-09-05 20:14:29 UTC; 10s ago Process: 8922 ExecStop=/usr/bin/killall -TERM rserver (code=exited, status=0/SUCCESS) Process: 8962 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS) Main PID: 8963 (rserver) Tasks: 10 (limit: 4633) CGroup: /system.slice/rstudio-server.service ├─8963 /usr/lib/rstudio-server/bin/rserver ├─9045 /usr/lib/rstudio-server/bin/rserver-monitor --monitor-domain-socket /tmp/rstudio-rserver/rserver-monitor.socket -- ├─9046 nginx: master process /usr/lib/rstudio-server/bin/rserver-http ├─9048 nginx: worker process ├─9049 /bin/sh -c "/usr/bin/rrdtool" "-" └─9050 /usr/bin/rrdtool -
And, for reference, the locations of the various server log files:
The server log is at:
Note that these error logs may be empty if no authentication error events have occurred, e.g. when you have no users, or all login attempts were successful.For more information, refer to Troubleshooting problems in the admin guide.