Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions docs/book/v2/faq.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# AlmaLinux 10 Frequently asked questions

Quick answers to common questions about switching PHP/Node.js versions, fixing permissions, finding logs, and maintaining your development environment.

* [How do I switch to a different version of PHP?](#how-do-i-switch-to-a-different-version-of-php)
* [How do I switch to a different version of Node.js?](#how-do-i-switch-to-a-different-version-of-nodejs)
* [How do I fix common permission issues?](#how-do-i-fix-common-permission-issues)
* [Where are the error log files?](#where-are-the-error-log-files)
* [How do I update Composer?](#how-do-i-update-composer)
* [How do I update phpMyAdmin?](#how-do-i-update-phpmyadmin)
* [How do I upgrade MariaDB?](#how-do-i-upgrade-mariadb)
* [How do I delete a virtualhost?](#how-do-i-delete-a-virtualhost)
* [How do I create command aliases?](#how-do-i-create-command-aliases)

## How do I switch to a different version of PHP?

Execute the following command:
Expand Down Expand Up @@ -82,6 +94,9 @@ Depending on the current npm version, the output should look similar to the belo

If running your project, you encounter permission issues, follow the below steps.

> `chmod -R 777` grants read/write/execute access to everyone, which is only appropriate for a local development environment like this one.
> Avoid carrying this habit into staging or production, where permissions should be scoped more narrowly (for example, to the web server's user/group).

### Error

> PHP Fatal error: Uncaught InvalidArgumentException: The directory "`<path-to-project>`/data" is not writable...
Expand Down Expand Up @@ -160,7 +175,7 @@ sudo /usr/local/bin/composer self-update
The output should be similar to:

```text
Upgrading to version 2.8.8 (stable channel).
Upgrading to version 2.9.0 (stable channel).

Use composer self-update --rollback to return to version 2.8.5
```
Expand All @@ -187,7 +202,7 @@ Being installed as a system package, it can be updated using the command which u
sudo dnf upgrade -y
```

## How do I upgrade MariaDB ?
## How do I upgrade MariaDB?

Initially, MariaDB was at version 11.4 LTS.
In case you want to upgrade to a different version, for instance [11.8 LTS](https://mariadb.org/11-8-is-lts/), use the below steps:
Expand Down Expand Up @@ -239,7 +254,7 @@ sudo systemctl restart mariadb

If for whatever reason you want to delete a virtualhost, for instance `to-be-deleted.localhost` you need to do the following:

* Delete the folder where are the files located
* Delete the folder where the files are located

```shell
sudo rm -rf /var/www/to-be-deleted.localhost
Expand All @@ -251,6 +266,12 @@ sudo rm -rf /var/www/to-be-deleted.localhost
sudo rm -f /etc/httpd/sites-available/to-be-deleted.localhost.conf
```

* Delete the enabled site symlink

```shell
sudo rm -f /etc/httpd/sites-enabled/to-be-deleted.localhost.conf
```

* Restart httpd server

```shell
Expand All @@ -261,7 +282,7 @@ sudo systemctl restart httpd

From either your terminal or file explorer, navigate to your home directory (`/home/<your-username>/`).

Using your preferred text editor, open the file: `.bash_profile` (if it does not exist, creat it first).
Using your preferred text editor, open the file: `.bash_profile` (if it does not exist, create it first).

Move to the end of the file and enter on a new line:

Expand Down
59 changes: 59 additions & 0 deletions docs/book/v2/running.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Running AlmaLinux 10 on WSL 2

## Summary

Start (or reconnect to) your AlmaLinux 10 distro from Windows Terminal, check whether it's currently running, and shut it down when you're done.

> If you are not using WSL 2, connect via SSH with [PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/).

Open `Windows Terminal`.
Expand All @@ -19,3 +23,58 @@ This will open a new tab connected to **AlmaLinux 10**.
> For this, all you need to do is to launch it from a terminal, file explorer or an IDE.
> Once launched, you can close the tool you launched it from.
> It will stay connected until you shut it down manually or reboot your computer.

## Check if AlmaLinux 10 is running

From Windows Terminal, execute:

```shell
wsl -l -v
```

Look for the `AlmaLinux-10` row — its **STATE** column reads **Running** if it's currently active, or **Stopped** otherwise.

## Shut down AlmaLinux 10

To stop just the AlmaLinux 10 distro, leaving any other distros untouched:

```shell
wsl -t AlmaLinux-10
```

To shut down all currently running WSL 2 distros at once:

```shell
wsl --shutdown
```

## Next step

Continue to [Virtualhosts](virtualhosts/overview.md) to start hosting your projects.

## FAQ

### What if `AlmaLinux-10` doesn't appear in the tab selector dropdown?

Confirm it's actually installed by running:

```shell
wsl -l -v
```

If it's missing from the list entirely, revisit [Install AlmaLinux 10](setup/installation.md).
Restarting Windows Terminal after installation also helps it pick up the new tab profile.

### What if `wsl -d AlmaLinux-10` fails to start?

Run the below command to confirm the distro is installed and check its current state:

```shell
wsl -l -v
```

If another distro is using the same resources, stop it first with the below command, then retry:

```shell
wsl -t <distro-name>
```
95 changes: 90 additions & 5 deletions docs/book/v2/setup/installation.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
# Install AlmaLinux 10 on WSL 2

## Summary

Stop any other running WSL 2 distros, then install the AlmaLinux 10 distro (`wsl --install -d AlmaLinux-10`) and create the initial Unix user account.

> If you are not using WSL, you can jump straight to the [AlmaLinux 10 Setup page](https://docs.dotkernel.org/development/v2/setup/setup-packages/).

> This is step 2 of 3: [System Requirements](system-requirements.md) → **Install AlmaLinux 10** (this page) → [Setup Packages](setup-packages.md).

> All commands on this page are executed in `Windows Terminal`, on your Windows host, not inside AlmaLinux 10.

Before proceeding with the installation, we need to make sure that no other WSL 2 distribution (aka: _distro_) is running.
This is important because this installation will fail if required ports are already in use by another distro.

> The distro is downloaded over the internet, so make sure you have a stable connection.
> Depending on your connection speed, the download can take anywhere from a couple of minutes to significantly longer.

Open `Windows Terminal`.

## Stop other WSL 2 distros
Expand All @@ -27,12 +38,17 @@ If you have other distros installed, the output could look similar to the below:

```text
NAME STATE VERSION
AlmaLinux-8 Stopped 2
* AlmaLinux-9 Running 2
AlmaLinux-9 Stopped 2
* AlmaLinux-10 Running 2
```

Make sure that the **STATE** column reads **Stopped** for all distros.
If any of them reads **Running**, you must stop if first by executing `wsl -t <distro-name>` after replacing `<distro-name>` with the name of the distro you want to stop.
If any of them reads **Running**, you must stop it first by executing the below command, after replacing `<distro-name>` with the name of the distro you want to stop:

```shell
wsl -t <distro-name>
```

Once you have stopped all distros, you can continue to the [installation](#install-almalinux-10) section.

## Install AlmaLinux 10
Expand Down Expand Up @@ -90,7 +106,7 @@ Install the **AlmaLinux 10** distro by executing the below command:
wsl --install -d AlmaLinux-10
```

You should see the download progressonce finished, the output should look like this:
You should see the download progress-once finished, the output should look like this:

```text
Downloading: AlmaLinux OS 10
Expand All @@ -112,7 +128,8 @@ Enter new UNIX username: dotkernel.
New password:
```

Depending on the strength of your password, you might get a `BAD PASSWORD: <some-reason>` message (if you want to choose a different password, hit `Enter` and you are taken back to the previous step—else, continue with retyping your password):
Depending on the strength of your password, you might get a `BAD PASSWORD: <some-reason>` message.
If you want to choose a different password, hit `Enter` and you are taken back to the previous step or continue with retyping your password.

Next, you are asked to retype your password:

Expand All @@ -126,3 +143,71 @@ Finally, you should see the following message:
passwd: password updated successfully
[<your-alma-linux-10-username>@<your-device-name> <your-windows-username>]$
```

> At this point your terminal has dropped you inside the **AlmaLinux 10** shell (notice the prompt changed).
> Keep this window open and continue directly with [Setup Packages](setup-packages.md).
> Its commands run inside AlmaLinux 10, not in Windows Terminal.
> If you close this window, see [Running on WSL 2](../running.md) to reconnect.

## Next step

Continue to [Setup Packages](setup-packages.md) to install the required system packages and provision your development environment.

## FAQ

### What if the installation fails because a distro is already running?

Make sure no other WSL 2 distro is running by checking:

```shell
wsl -l -v
```

All distros must show **Stopped**. Stop any running distro with the below command before retrying the installation:

```shell
wsl -t <distro-name>
```

### What if `AlmaLinux-10` is already installed?

The installation will fail with `A distribution with the supplied name already exists`.
Use a different `--name` value, or remove the existing distro first if you intend to reinstall it.

### Does the username need to match my Windows username?

No, the Unix username created during installation can be any alphanumeric string and does not need to match your Windows username.

### What if I get a `BAD PASSWORD` message?

This is just a strength warning.
Press `Enter` to choose a different password, or continue retyping the same one if you want to keep it.

### Where can I find the list of available distros if `AlmaLinux-10` isn't shown?

Run the below command to see the current list of installable distros and their **NAME** values:

```shell
wsl --list --online
```

### What if `wsl --install -d AlmaLinux-10` fails or hangs with no clear error?

This is most often caused by hardware virtualization being disabled in your BIOS/UEFI, or by Hyper-V/Virtual Machine Platform not being enabled.
Revisit the [System Requirements](system-requirements.md) page and confirm both.
A blocked or unstable internet connection (including corporate proxies/firewalls) can also cause the download to stall.

### What if the Microsoft Store is unavailable or blocked (for example, on a work laptop)?

You don't need the Store for this step.
`wsl --install -d AlmaLinux-10` downloads and registers the distro directly, without going through the Store.

### How do I completely remove AlmaLinux-10 and start over?

Unregister the distro, which deletes it and all its data, then reinstall it from scratch:

```shell
wsl --unregister AlmaLinux-10
```

Once unregistered, you can run `wsl --install -d AlmaLinux-10` again as described above.
Loading