From eaea64a2bedc17b07a47a100a9d0b73c54091846 Mon Sep 17 00:00:00 2001 From: bidi Date: Thu, 8 Oct 2026 15:49:16 +0300 Subject: [PATCH 1/2] added page - updating Signed-off-by: bidi --- README.md | 6 +++ docs/book/v2/faq.md | 2 + docs/book/v2/updating.md | 81 ++++++++++++++++++++++++++++++++++++++++ mkdocs.yml | 1 + 4 files changed, 90 insertions(+) create mode 100644 docs/book/v2/updating.md diff --git a/README.md b/README.md index e55b5d8..87d0e87 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,12 @@ On a native Linux host, skip steps 1 and 2 and go straight to [Setup Packages](h > Security is relaxed by default: the MariaDB root password is stored in plaintext in `config.yml`, and phpMyAdmin allows root login. > Never expose it to a network. +## Updating + +Already have an installation? +Run `git pull` in your clone and add any new aliases to `~/.bash_profile`. +See [Updating](https://docs.dotkernel.org/development/v2/updating/) for the steps and a list of changes. + ## Virtualhosts List the domains you want under the `virtualhosts` key in `wsl/config.yml`, then run: diff --git a/docs/book/v2/faq.md b/docs/book/v2/faq.md index 2f3320f..de1da68 100644 --- a/docs/book/v2/faq.md +++ b/docs/book/v2/faq.md @@ -132,6 +132,8 @@ The aliases are the following: * `node20`: switch to Node.js 20 * `node18`: switch to Node.js 18 +> If an alias is missing from an existing installation, see [Updating an existing installation](updating.md). + After switching to a different Node.js version, test with the following command: ```shell diff --git a/docs/book/v2/updating.md b/docs/book/v2/updating.md new file mode 100644 index 0000000..a87c955 --- /dev/null +++ b/docs/book/v2/updating.md @@ -0,0 +1,81 @@ +# Updating an existing installation + +## Summary + +Pull the latest changes of the `development` repository and apply any new shell aliases to your `~/.bash_profile`. +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. + +## General procedure + +Follow these steps whenever a new release of this repository introduces changes that affect an installation you have already provisioned. + +Connect to your **AlmaLinux 10** distro, then go to the directory where you cloned the repository (by default `~/development`) and pull the latest changes: + +```shell +cd ~/development +git pull +``` + +Open the template that defines the shell aliases and compare it with your own `~/.bash_profile`: + +```shell +cat wsl/roles/system/templates/bash_profile.j2 +``` + +Open `~/.bash_profile` in an editor and add any alias that is missing from it: + +```shell +nano ~/.bash_profile +``` + +Save the file, then log out and log back in (or run `source ~/.bash_profile`) so that the new aliases are loaded. + +> Only add what is new. +> Do not replace the whole file, as it may contain your own customizations. + +## Changes + +### Node.js 24 by default + +Node.js 24 is now the default version, and the `node24` alias is available. +To upgrade an existing installation: + +1. Go to your clone of the repository and pull the latest changes: + +```shell +cd ~/development +git pull +``` + +2. Open `~/.bash_profile`: + +```shell +nano ~/.bash_profile +``` + +3. Add the following line: + +```shell +alias node24="sudo dnf remove nodejs -y && curl -fsSL https://rpm.nodesource.com/setup_24.x | sudo bash - && sudo dnf install nodejs -y" +``` + +4. Save the file, then log out and log back in. +5. Run the alias to switch to Node.js 24: + +```shell +node24 +``` + +6. Check the installed version: + +```shell +node -v +``` + +The output should look similar to the below: + +```terminaloutput +v24.13.0 +``` + +For more on switching between Node.js versions, see the [FAQ](faq.md#how-do-i-switch-to-a-different-version-of-nodejs). diff --git a/mkdocs.yml b/mkdocs.yml index bcdcb1c..7daaa5b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -15,6 +15,7 @@ nav: - Installation: v2/setup/installation.md - Setup Packages: v2/setup/setup-packages.md - Running on WSL 2: v2/running.md + - Updating: v2/updating.md - Virtualhosts: - Overview: v2/virtualhosts/overview.md - Create virtualhost: v2/virtualhosts/create-virtualhost.md From 76325cdbcaf80a056e453dc5062b4ee3c60be505 Mon Sep 17 00:00:00 2001 From: bidi Date: Thu, 8 Oct 2026 15:53:11 +0300 Subject: [PATCH 2/2] linting fixes Signed-off-by: bidi --- docs/book/v2/updating.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/book/v2/updating.md b/docs/book/v2/updating.md index a87c955..a35d699 100644 --- a/docs/book/v2/updating.md +++ b/docs/book/v2/updating.md @@ -42,40 +42,40 @@ To upgrade an existing installation: 1. Go to your clone of the repository and pull the latest changes: -```shell -cd ~/development -git pull -``` + ```shell + cd ~/development + git pull + ``` 2. Open `~/.bash_profile`: -```shell -nano ~/.bash_profile -``` + ```shell + nano ~/.bash_profile + ``` 3. Add the following line: -```shell -alias node24="sudo dnf remove nodejs -y && curl -fsSL https://rpm.nodesource.com/setup_24.x | sudo bash - && sudo dnf install nodejs -y" -``` + ```shell + alias node24="sudo dnf remove nodejs -y && curl -fsSL https://rpm.nodesource.com/setup_24.x | sudo bash - && sudo dnf install nodejs -y" + ``` 4. Save the file, then log out and log back in. 5. Run the alias to switch to Node.js 24: -```shell -node24 -``` + ```shell + node24 + ``` 6. Check the installed version: -```shell -node -v -``` + ```shell + node -v + ``` -The output should look similar to the below: + The output should look similar to the below: -```terminaloutput -v24.13.0 -``` + ```terminaloutput + v24.13.0 + ``` For more on switching between Node.js versions, see the [FAQ](faq.md#how-do-i-switch-to-a-different-version-of-nodejs).