Skip to content

Commit dfe43f3

Browse files
authored
Merge pull request #143 from dotkernel/updating
added page - updating
2 parents 088e872 + 76325cd commit dfe43f3

4 files changed

Lines changed: 90 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ On a native Linux host, skip steps 1 and 2 and go straight to [Setup Packages](h
5757
> Security is relaxed by default: the MariaDB root password is stored in plaintext in `config.yml`, and phpMyAdmin allows root login.
5858
> Never expose it to a network.
5959

60+
## Updating
61+
62+
Already have an installation?
63+
Run `git pull` in your clone and add any new aliases to `~/.bash_profile`.
64+
See [Updating](https://docs.dotkernel.org/development/v2/updating/) for the steps and a list of changes.
65+
6066
## Virtualhosts
6167

6268
List the domains you want under the `virtualhosts` key in `wsl/config.yml`, then run:

‎docs/book/v2/faq.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ The aliases are the following:
132132
* `node20`: switch to Node.js 20
133133
* `node18`: switch to Node.js 18
134134

135+
> If an alias is missing from an existing installation, see [Updating an existing installation](updating.md).
136+
135137
After switching to a different Node.js version, test with the following command:
136138

137139
```shell

‎docs/book/v2/updating.md‎

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Updating an existing installation
2+
3+
## Summary
4+
5+
Pull the latest changes of the `development` repository and apply any new shell aliases to your `~/.bash_profile`.
6+
Aliases such as `node24` are written to `~/.bash_profile` only when the environment is first provisioned, so an existing installation does not receive them automatically.
7+
8+
## General procedure
9+
10+
Follow these steps whenever a new release of this repository introduces changes that affect an installation you have already provisioned.
11+
12+
Connect to your **AlmaLinux 10** distro, then go to the directory where you cloned the repository (by default `~/development`) and pull the latest changes:
13+
14+
```shell
15+
cd ~/development
16+
git pull
17+
```
18+
19+
Open the template that defines the shell aliases and compare it with your own `~/.bash_profile`:
20+
21+
```shell
22+
cat wsl/roles/system/templates/bash_profile.j2
23+
```
24+
25+
Open `~/.bash_profile` in an editor and add any alias that is missing from it:
26+
27+
```shell
28+
nano ~/.bash_profile
29+
```
30+
31+
Save the file, then log out and log back in (or run `source ~/.bash_profile`) so that the new aliases are loaded.
32+
33+
> Only add what is new.
34+
> Do not replace the whole file, as it may contain your own customizations.
35+
36+
## Changes
37+
38+
### Node.js 24 by default
39+
40+
Node.js 24 is now the default version, and the `node24` alias is available.
41+
To upgrade an existing installation:
42+
43+
1. Go to your clone of the repository and pull the latest changes:
44+
45+
```shell
46+
cd ~/development
47+
git pull
48+
```
49+
50+
2. Open `~/.bash_profile`:
51+
52+
```shell
53+
nano ~/.bash_profile
54+
```
55+
56+
3. Add the following line:
57+
58+
```shell
59+
alias node24="sudo dnf remove nodejs -y && curl -fsSL https://rpm.nodesource.com/setup_24.x | sudo bash - && sudo dnf install nodejs -y"
60+
```
61+
62+
4. Save the file, then log out and log back in.
63+
5. Run the alias to switch to Node.js 24:
64+
65+
```shell
66+
node24
67+
```
68+
69+
6. Check the installed version:
70+
71+
```shell
72+
node -v
73+
```
74+
75+
The output should look similar to the below:
76+
77+
```terminaloutput
78+
v24.13.0
79+
```
80+
81+
For more on switching between Node.js versions, see the [FAQ](faq.md#how-do-i-switch-to-a-different-version-of-nodejs).

‎mkdocs.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ nav:
1515
- Installation: v2/setup/installation.md
1616
- Setup Packages: v2/setup/setup-packages.md
1717
- Running on WSL 2: v2/running.md
18+
- Updating: v2/updating.md
1819
- Virtualhosts:
1920
- Overview: v2/virtualhosts/overview.md
2021
- Create virtualhost: v2/virtualhosts/create-virtualhost.md

0 commit comments

Comments
 (0)