-
Notifications
You must be signed in to change notification settings - Fork 0
/
UpdateRstudioServer.Rmd
134 lines (86 loc) · 2.99 KB
/
UpdateRstudioServer.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
title: "Upgrade your personal Rstudio server"
author: "Paul Melloy"
date: "2024-06-11"
---
## Update your Rstudio server
I was surprised how little documentation was available on how to update Rstudio
Servers.
I use a Rstudio server deployed on the Australian Research and Data Commons (ARDC),
NECTAR service.
It took me too long to figure this out as all the current documentation was old and
obsolete.
[This post](https://www.r-bloggers.com/2023/05/r-install-and-configure-rstudio-server-in-ubuntu/)
by [Zhenguo Zhang](https://www.r-bloggers.com/author/zhenguo-zhang/) was helpful,
However not specific to my use case of just wanting to *upgrade* my server.
**NOTE:** Upgrading the software will need `sudo` privileges on the machine.
<br>
### 1. Stop the service
```{bash stop_service, eval=FALSE}
sudo rstudio-server stop
```
<br>
### 2. Remove the old service
```{bash remove_old, eval=FALSE}
sudo apt-get remove rstudio-server
```
<br>
### 3. Install new version
This step can mostly be followed from the POSIT website: https://posit.co/download/rstudio-server/
<br>
#### Disto dependant
Be aware the following is linux distribution dependant.
My version is "Ubuntu 22.04.4 LTS" however yours might be slightly different.
If gdebi-core is not already installed from the old Rstudio server install it again
a) install gdebi-core to allow debian package manager to install the new version
```{bash gdebi, eval=FALSE}
sudo apt-get install gdebi-core
```
b) Install the new Rstudio version
You may need to get the most recent line of code from the [posit website](https://posit.co/download/rstudio-server/).
```{bash install, eval=FALSE}
# Download
wget https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2024.04.2-764-amd64.deb
# Install
sudo gdebi rstudio-server-2024.04.2-764-amd64.deb
```
<br>
### 4. Start the new service
Verify installation
```{bash verify, eval=FALSE}
sudo rstudio-server verify-installation
```
Start the a new session
```{bash start, eval=FALSE}
sudo rstudio-server start
```
Verify the a new session has started and is active
```{bash active, eval=FALSE}
sudo rstudio-server active-sessions
```
Once the service is active make put the service back online
```{bash online, eval=FALSE}
sudo rstudio-server online
```
- and that should be it!!
<br>
<br>
### Troubleshooting
Restarting your service
```{bash restart, eval=FALSE}
sudo rstudio-server restart
```
- Check the ports are open rstudio server is usually `8787`
```{bash ports, eval=FALSE}
# list ports in use
sudo netstat -tulpn
```
- Check the rstudio configuration files
```{bash, eval=FALSE}
nano /etc/rstudio/rserver.conf
```
#### Links to other instructions
https://www.r-bloggers.com/2023/05/r-install-and-configure-rstudio-server-in-ubuntu/
https://posit.co/download/rstudio-server/
https://forum.posit.co/t/cant-start-rstudio-server-ubuntu-18-0-4-bionic/11835/3
https://forum.posit.co/t/how-to-update-r-in-rstudio-server/102011