Skip to content

Commit f3e1d12

Browse files
authored
Merge pull request #65 from dotkernel/issue-54
Issue #54: Add AlmaLinux 10
2 parents 8ca18fc + b171f77 commit f3e1d12

File tree

20 files changed

+576
-63
lines changed

20 files changed

+576
-63
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ DXCore version: 10.0.26091.1-240325-1447.ge-release
2525
Windows version: 10.0.22631.3737
2626
```
2727

28-
If the output starts with `WSL version: 2.x.x.x`, you are ready to use **WSL2** and can proceed to [install AlmaLinux9](wsl/README.md).
28+
If the output starts with `WSL version: 2.x.x.x`, you are ready to use **WSL2** and can proceed to [install AlmaLinux10](wsl/README.md).
2929

3030
## Install WSL2
3131

@@ -57,4 +57,4 @@ To test, run again the following command:
5757
wsl -v
5858
```
5959

60-
This time the output should display `WSL version: 2.x.x.x`, which means that your system is ready for using **WSL2** and you can proceed to [install AlmaLinux9](wsl/README.md).
60+
This time the output should display `WSL version: 2.x.x.x`, which means that your system is ready for using **WSL2** and you can proceed to [install AlmaLinux10](wsl/README.md).

docs/book/v1/setup/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Install the AlmaLinux9 distro by executing the below command:
4545
wsl --install -d AlmaLinux-9
4646
```
4747

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

5050
```text
5151
Downloading: AlmaLinux OS 9
@@ -68,7 +68,7 @@ Changing password for user dotkernel.
6868
New password:
6969
```
7070

71-
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 previous step - else, continue with retyping your password):
71+
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 stepelse, continue with retyping your password):
7272

7373
Next, you are asked to retype your password:
7474

docs/book/v1/setup/setup-packages.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ sudo dnf install epel-release dnf-utils https://rpms.remirepo.net/enterprise/rem
99
You should see the below message, shown the first time you execute a command which requires elevated permissions (hence the `sudo` modifier at the beginning of the command).
1010

1111
```text
12-
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
12+
We trust you have received the usual lecture from the local System
13+
Administrator. It usually boils down to these three things:
1314
1415
#1) Respect the privacy of others.
1516
#2) Think before you type.

docs/book/v1/virtualhosts/create-virtualhost.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Create virtualhosts
22

3+
> By using the `*.localhost` pattern for any new virtualhost, you do not need to modify the `hosts` file in Windows, because these are routed by default.
4+
35
Move inside the directory `development/wsl`:
46

57
```shell
@@ -9,9 +11,7 @@ cd ~/development/wsl/
911
If you don't already have a `config.yml` file, duplicate `config.yml.dist` as `config.yml`.
1012

1113
Using your preferred text editor, open `config.yml` and, under the `virtualhosts` key, enter the virtualhosts that you want to create, each on its own line.
12-
1314
Already existing virtualhosts will be skipped, their contents will not be lost, no need to comment or remove them.
14-
1515
Save and close the file.
1616

1717
Create the specified virtualhosts:
@@ -20,8 +20,7 @@ Create the specified virtualhosts:
2020
ansible-playbook -i hosts create-virtualhost.yml --ask-become-pass
2121
```
2222

23-
This process will ask for your password (set during the installation process) and then iterate over the list of configured `virtualhosts` and will output a short summary with the results.
24-
23+
This process will ask for your AlmaLinux10 password, iterate over the list of configured `virtualhosts` and output a short summary with the results.
2524
Your virtualhost should be accessible and ready to use.
2625

2726
You will install your project under the `html` directory of your project, for example `/var/www/example.localhost/html`.

docs/book/v1/virtualhosts/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Using this tool, you configure a virtualhost for each of your applications, and
77
**Example**:
88

99
* `api.dotkernel.localhost`: this could be the endpoint where you host your website's API
10-
* `frontend.dotkernel.localhost`: this could be domain you host your website's frontend that will consume the API
10+
* `frontend.dotkernel.localhost`: this could be subdomain where you host your website's frontend that will consume the API
1111

1212
In the above example, the URLs are built like this:
1313

docs/book/v2/faq.md

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
# Frequently asked questions
2+
3+
## How do I switch to a different version of PHP?
4+
5+
Execute the following command:
6+
7+
```shell
8+
sudo dnf module switch-to php:remi-{major}.{minor} -y
9+
```
10+
11+
where `{major}.{minor}` is one of the supported PHP versions: `8.4`, `8.3`, `8.2` and `8.1`.
12+
13+
Additionally, our setup includes predefined aliases for executing the above command.
14+
The aliases are the following:
15+
16+
* `php81`: switch to PHP 8.1
17+
* `php82`: switch to PHP 8.2
18+
* `php83`: switch to PHP 8.3
19+
* `php84`: switch to PHP 8.4
20+
21+
After switching to a different PHP version, test with the following command:
22+
23+
```shell
24+
php -v
25+
```
26+
27+
Depending on the selected PHP version, the output should look similar to the below:
28+
29+
```text
30+
PHP 8.3.8 (cli) (built: Jun 4 2024 14:53:17) (NTS gcc x86_64)
31+
Copyright (c) The PHP Group
32+
Zend Engine v4.3.8, Copyright (c) Zend Technologies
33+
```
34+
35+
## How do I switch to a different version of Node.js?
36+
37+
Execute the following commands:
38+
39+
```shell
40+
sudo dnf remove nodejs -y
41+
curl -fsSL https://rpm.nodesource.com/setup_{major}.x | sudo bash -
42+
sudo dnf install nodejs -y
43+
```
44+
45+
where `{major}` is the Node.js version you want to switch to.
46+
47+
Additionally, our setup includes predefined aliases for the above commands.
48+
The aliases are the following:
49+
50+
* `node22`: switch to Node.js 22
51+
* `node20`: switch to Node.js 20
52+
* `node18`: switch to Node.js 18
53+
54+
After switching to a different Node.js version, test with the following command:
55+
56+
```shell
57+
node -v
58+
```
59+
60+
## How do I fix common permission issues?
61+
62+
If running your project, you encounter permission issues, follow the below steps.
63+
64+
### Error
65+
66+
> PHP Fatal error: Uncaught InvalidArgumentException: The directory "`<path-to-project>`/data" is not writable...
67+
68+
> PHP Fatal error: Uncaught InvalidArgumentException: The directory "`<path-to-project>`/data/cache" is not writable...
69+
70+
> PHP Fatal error: Uncaught InvalidArgumentException: The directory "`<path-to-project>`/data/cache/doctrine" is not writable...
71+
72+
### Solution
73+
74+
```shell
75+
chmod -R 777 data
76+
```
77+
78+
### Error
79+
80+
> PHP Fatal error: Uncaught InvalidArgumentException: The directory "`<path-to-project>`/public/uploads" is not writable...
81+
82+
### Solution
83+
84+
```shell
85+
chmod -R 777 public/uploads
86+
```
87+
88+
### Error
89+
90+
> PHP Fatal error: Uncaught ErrorException: fopen(`<path-to-project>`/log/error-log-yyyy-mm-dd.log): Failed to open stream: Permission denied...
91+
92+
### Solution
93+
94+
```shell
95+
chmod -R 777 log
96+
```
97+
98+
## Where are the error log files?
99+
100+
From time to time, you are encountering various errors which are not displayed. Or you can get errors 500 in a browser.
101+
102+
To find the error messages, you need to read the error log files.
103+
104+
### Apache log files
105+
106+
```text
107+
/var/log/httpd/error_log
108+
```
109+
110+
### PHP-FPM log files
111+
112+
```text
113+
/var/log/php-fpm/error.log
114+
/var/log/php-fpm/www-error.log
115+
```
116+
117+
## How do I update Composer?
118+
119+
Before updating, check your current Composer version by executing:
120+
121+
```shell
122+
composer --version
123+
```
124+
125+
The output should be similar to:
126+
127+
```text
128+
Composer version 2.8.5 2025-01-21 15:23:40
129+
PHP version 8.3.20 (/usr/bin/php)
130+
Run the "diagnose" command to get more detailed diagnostics output.
131+
```
132+
133+
Update Composer using its own `self-update` command:
134+
135+
```shell
136+
sudo /usr/local/bin/composer self-update
137+
```
138+
139+
The output should be similar to:
140+
141+
```text
142+
Upgrading to version 2.8.8 (stable channel).
143+
144+
Use composer self-update --rollback to return to version 2.8.5
145+
```
146+
147+
After updating, check again your Composer version by executing:
148+
149+
```shell
150+
composer --version
151+
```
152+
153+
The output should be similar to:
154+
155+
```text
156+
Composer version 2.8.8 2025-04-04 16:56:46
157+
PHP version 8.3.20 (/usr/bin/php)
158+
Run the "diagnose" command to get more detailed diagnostics output.
159+
```
160+
161+
## How do I update phpMyAdmin?
162+
163+
Being installed as a system package, it can be updated using the command which updates the rest of the system packages:
164+
165+
```shell
166+
sudo dnf upgrade -y
167+
```
168+
169+
## How do I create command aliases?
170+
171+
From either your terminal or file explorer, navigate to your home directory (`/home/<your-username>/`).
172+
173+
Using your preferred text editor, open the file: `.bash_profile` (if it does not exist, creat it first).
174+
175+
Move to the end of the file and enter on a new line:
176+
177+
```text
178+
alias command_alias="command to execute"
179+
```
180+
181+
where:
182+
183+
* `command_alias` is the name by which you want to call your original command
184+
* `command to execute`: the original command to be executed on alias call
185+
186+
### Example
187+
188+
```text
189+
alias list_files="ls -Al"
190+
```
191+
192+
will create an alias called `list_files` that will run the command `ls -Al`.
193+
194+
Then, you can execute your custom alias in a terminal just as a regular command:
195+
196+
```shell
197+
list_files
198+
```

docs/book/v2/introduction.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Introduction
2+
3+
`dotkernel/development` is a tool that helps you prepare your development environment with the following components:
4+
5+
* **WSL2**: Windows Subsystem for Linux
6+
* **AlmaLinux10**: free and open source Linux distribution
7+
* **PHP**: general-purpose scripting language geared towards web development
8+
* **Apache**: free and open-source cross-platform web server software
9+
* **MariaDB**: community-developed, commercially supported fork of the MySQL relational database management system
10+
* **Git**: distributed version control system
11+
* **Composer**: application-level dependency manager for the PHP
12+
* **Node.js**: JavaScript runtime environment
13+
* **PhpMyAdmin**: open source administration tool for MySQL and MariaDB

docs/book/v2/setup/installation.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Install AlmaLinux10
2+
3+
Open `Windows Terminal`.
4+
5+
List the available Linux distributions (aka: _distros_) by executing:
6+
7+
```shell
8+
wsl --list --online
9+
```
10+
11+
Depending on the list of distros available at the moment you run the command, the output should look similar to the below:
12+
13+
```text
14+
The following is a list of valid distributions that can be installed.
15+
Install using 'wsl.exe --install <Distro>'.
16+
17+
NAME FRIENDLY NAME
18+
AlmaLinux-8 AlmaLinux OS 8
19+
AlmaLinux-9 AlmaLinux OS 9
20+
AlmaLinux-Kitten-10 AlmaLinux OS Kitten 10
21+
AlmaLinux-10 AlmaLinux OS 10
22+
Debian Debian GNU/Linux
23+
FedoraLinux-42 Fedora Linux 42
24+
SUSE-Linux-Enterprise-15-SP5 SUSE Linux Enterprise 15 SP5
25+
SUSE-Linux-Enterprise-15-SP6 SUSE Linux Enterprise 15 SP6
26+
Ubuntu Ubuntu
27+
Ubuntu-24.04 Ubuntu 24.04 LTS
28+
archlinux Arch Linux
29+
kali-linux Kali Linux Rolling
30+
openSUSE-Tumbleweed openSUSE Tumbleweed
31+
openSUSE-Leap-15.6 openSUSE Leap 15.6
32+
Ubuntu-18.04 Ubuntu 18.04 LTS
33+
Ubuntu-20.04 Ubuntu 20.04 LTS
34+
Ubuntu-22.04 Ubuntu 22.04 LTS
35+
OracleLinux_7_9 Oracle Linux 7.9
36+
OracleLinux_8_7 Oracle Linux 8.7
37+
OracleLinux_9_1 Oracle Linux 9.1
38+
```
39+
40+
Note the two columns: **NAME** and **FRIENDLY NAME**.
41+
To install a specific distro, use the value from the **NAME** column, in this case: `AlmaLinux-10`.
42+
Install the AlmaLinux10 distro by executing the below command:
43+
44+
```shell
45+
wsl --install -d AlmaLinux-10
46+
```
47+
48+
You should see the download progress—once finished, the output should look like this:
49+
50+
```text
51+
Downloading: AlmaLinux OS 10
52+
Installing: AlmaLinux OS 10
53+
Distribution successfully installed. It can be launched via 'wsl.exe -d AlmaLinux-10'
54+
Launching AlmaLinux-10...
55+
Please create a default UNIX user account. The username does not need to match your Windows username.
56+
For more information visit: https://aka.ms/wslusers
57+
Enter new UNIX username:
58+
```
59+
60+
As per the last line, the installation process now prompts you to enter a username.
61+
This is the username you will use inside AlmaLinux10, and it can be any alphanumeric string (for example `dotkernel`):
62+
63+
Next, you are prompted to change the password associated with your chosen username (you will not see what you are typing, that's a security measure in Linux regarding passwords):
64+
65+
```shell
66+
Enter new UNIX username: dotkernel.
67+
New password:
68+
```
69+
70+
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):
71+
72+
Next, you are asked to retype your password:
73+
74+
```text
75+
Retype new password:
76+
```
77+
78+
Finally, you should see the following message:
79+
80+
```text
81+
passwd: password updated successfully
82+
[<your-almalinux10-username>@<your-device-name> <your-windows-username>]$
83+
```

0 commit comments

Comments
 (0)