Both sides previous revisionPrevious revisionNext revision | Previous revision |
computing:rstudio [2021/04/03 02:12] – oemb1905 | computing:rstudio [2021/04/03 02:17] (current) – oemb1905 |
---|
------------------------------------------- | ------------------------------------------- |
| |
This is to set up [[https://rstudio.com/products/rstudio/download/|R-Studio]] on Debian. As always, first setup TLS/LAMP first; see [[https://wiki.haacksnetworking.com/doku.php?id=computing:apachesurvival|Apache Survival]] for help with doing so. Once you have that setup, download and install R-Studio. **Always check their recommendations** as well, but currently they recommend using //gdebi// as follows: | This is to set up [[https://rstudio.com/products/rstudio/download/|R-Studio]] on Debian. As always, first setup TLS/LAMP first; see [[https://wiki.haacksnetworking.com/doku.php?id=computing:apachesurvival|Apache Survival]] for help with doing so. Once you have that setup, download and install R-Studio. **Always check rstudio's recommendations** as well, but currently they recommend using //gdebi// as follows: |
| |
cd ~ | cd ~ |
sudo gdebi rstudio-server-1.2.1335-amd64.deb | sudo gdebi rstudio-server-1.2.1335-amd64.deb |
| |
Make sure you already have an existing LAMP stack running for your domain on at least one virtual host with TLS. If you do not yet have that, please see the apachesurvival tutorial first. If you can do that, then set up two virtual host configuration files for http/https as follows: | Make sure you already have an existing LAMP stack running for your domain on at least one virtual host with TLS. If you do not yet have that, please see the apachesurvival tutorial first. If you can do that, then set up two virtual host configuration files for http/https. Those are called reverse proxy virtual hosts according to the apache project. I adapted two recipes I contributed to for gitlab-ce to work with rstudio. First, create a virtual host to receive http requests for the domain you are using. |
| |
sudo nano /etc/apache2/sites-available/rstudioserver.conf | sudo nano /etc/apache2/sites-available/rstudioserver.conf |
| |
Use something like this http configuration that I tweaked from the gitlab-ce recipe project on Gitlab: [[https://repo.haacksnetworking.com/oemb1905/haackingclub/-/blob/master/apache/virtualhosts/rstudio.jonathanhaack.com.conf|rstudioserver.conf]] | If you look at this http config, you can adapt the domain and ports to your liking: [[https://repo.haacksnetworking.com/oemb1905/haackingclub/-/blob/master/apache/virtualhosts/rstudio.jonathanhaack.com.conf|rstudioserver.conf]] |
| |
sudo nano /etc/apache2/sites-available/rstudioserver-ssl.conf | sudo nano /etc/apache2/sites-available/rstudioserver-ssl.conf |
| |
Use something like this https configuration that I tweaked from the gitlab-ce recipe project on Gitlab: [[https://repo.haacksnetworking.com/oemb1905/haackingclub/-/blob/master/apache/virtualhosts/rstudio.jonathanhaack.com-ssl.conf|rstudioserver-ssl.conf]] | This https config will get you started (this is definitely not optional if this is public facing as described in this tutorial): [[https://repo.haacksnetworking.com/oemb1905/haackingclub/-/blob/master/apache/virtualhosts/rstudio.jonathanhaack.com-ssl.conf|rstudioserver-ssl.conf]] |
| |
sudo a2ensite rstudioserver.conf | sudo a2ensite rstudioserver.conf |
sudo systemctl restart rstudio-server | sudo systemctl restart rstudio-server |
| |
--- //[[jonathan@haacksnetworking.com|oemb1905]] 2019/12/30 02:18// | --- //[[jonathan@haacksnetworking.com|oemb1905]] 2021/04/02 20:12// |
| |