Skip to content
Merged
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
20 changes: 13 additions & 7 deletions wsl/os/almalinux9/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,30 @@

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

### Switch to PHP 7.4
### Switch to PHP 8.3

sudo dnf module switch-to php:remi-7.4 -y
sudo dnf module switch-to php:remi-8.3 -y

### Switch to PHP 8.2

sudo dnf module switch-to php:remi-8.2 -y

### Switch to PHP 8.1

sudo dnf module switch-to php:remi-8.1 -y

### Switch to PHP 8.2
### Switch to PHP 7.4

sudo dnf module switch-to php:remi-8.2 -y
sudo dnf module switch-to php:remi-7.4 -y

### Switch to PHP 8.3

sudo dnf module switch-to php:remi-8.3 -y
## How do I switch to a different version of Node.js?

### Switch to Node.js 20.x

## How do I switch to a different version of Node.js?
sudo dnf remove nodejs -y
curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash -
sudo dnf install nodejs -y

### Switch to Node.js 18.x

Expand Down
4 changes: 2 additions & 2 deletions wsl/os/almalinux9/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,5 @@ The virtualhost's document root is set to the `public` directory of the above lo
* If you work with virtualhosts, your projects are created under `/var/www/`.
* You can still run PHP scripts under the default Apache project directory, located at `/var/www/html/`.
* If you encounter write permission issues, see [this guide](FAQ.md#how-do-i-fix-common-permission-issues).
* We install PHP 8.2 by default. If you need a different version, see [this guide](FAQ.md#how-do-i-switch-to-a-different-version-of-php).
* We install NodeJS 18 by default. If you need a different version, see [this guide](FAQ.md#how-do-i-switch-to-a-different-version-of-nodejs).
* We install PHP 8.3 by default. If you need a different version, see [this guide](FAQ.md#how-do-i-switch-to-a-different-version-of-php).
* We install NodeJS 20 by default. If you need a different version, see [this guide](FAQ.md#how-do-i-switch-to-a-different-version-of-nodejs).
6 changes: 3 additions & 3 deletions wsl/os/almalinux9/roles/nodejs/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Add Node.js 18.x repo
shell: curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo -E bash -
- name: Install Node.js 18.x
- name: Add Node.js 20.x repo
shell: curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo -E bash -
- name: Install Node.js 20.x
command: "dnf install nodejs -y"
6 changes: 3 additions & 3 deletions wsl/os/almalinux9/roles/php/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Install PHP 8.2
command: dnf module install php:remi-8.2 -y
- name: Enable and start PHP 8.2
- name: Install PHP 8.3
command: dnf module install php:remi-8.3 -y
- name: Enable and start PHP 8.3
command: systemctl enable --now php-fpm
- name: Create PHP info file
template:
Expand Down
6 changes: 6 additions & 0 deletions wsl/os/ubuntu20/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ sudo service apache2 restart

## How do I switch to a different version of Node.js?

### Switch to Node.js 20.x

sudo apt remove nodejs -y
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install nodejs -y

### Switch to Node.js 18.x

sudo apt remove nodejs -y
Expand Down
4 changes: 2 additions & 2 deletions wsl/os/ubuntu20/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,5 @@ The virtualhost's document root is set to the `public` directory of the above lo
* If you work with virtualhosts, your projects are created under `/home/your-username/projects/`.
* You can still run PHP scripts under the default Apache project directory, located at `/var/www/html/`.
* If you encounter write permission issues, see [this guide](FAQ.md#how-do-i-fix-common-permission-issues).
* Default version of PHP is set to 7.4. If you need a different version, see [this guide](FAQ.md#how-do-i-switch-between-php-versions).
* We install NodeJS 18 by default. If you need a different version, see [this guide](FAQ.md#how-do-i-switch-to-a-different-version-of-nodejs).
* Default version of PHP is set to 8.3. If you need a different version, see [this guide](FAQ.md#how-do-i-switch-between-php-versions).
* We install NodeJS 20 by default. If you need a different version, see [this guide](FAQ.md#how-do-i-switch-to-a-different-version-of-nodejs).
6 changes: 3 additions & 3 deletions wsl/os/ubuntu20/roles/nodejs/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
- name: Add Node.js 18.x repo
shell: curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
- name: Add Node.js 20.x repo
shell: curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
args:
warn: no
- name: Install Node.js 18.x
- name: Install Node.js 20.x
apt:
name: nodejs
state: latest
20 changes: 20 additions & 0 deletions wsl/os/ubuntu20/roles/php/tasks/php82.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- name: Add ppa:ondrej/php repository
apt_repository:
repo: ppa:ondrej/php
update_cache: true
- name: Install PHP 8.2
apt:
name:
- php8.2
- php8.2-common
- php8.2-bz2
- php8.2-cli
- php8.2-curl
- php8.2-intl
- php8.2-mbstring
- php8.2-mysql
- php8.2-xml
- php8.2-zip
- libapache2-mod-php8.2
state: present
20 changes: 20 additions & 0 deletions wsl/os/ubuntu20/roles/php/tasks/php83.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- name: Add ppa:ondrej/php repository
apt_repository:
repo: ppa:ondrej/php
update_cache: true
- name: Install PHP 8.3
apt:
name:
- php8.3
- php8.3-common
- php8.3-bz2
- php8.3-cli
- php8.3-curl
- php8.3-intl
- php8.3-mbstring
- php8.3-mysql
- php8.3-xml
- php8.3-zip
- libapache2-mod-php8.3
state: present
3 changes: 2 additions & 1 deletion wsl/os/ubuntu20/roles/php/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ php_info_filename: info.php
php_versions:
- "74"
- "81"

- "82"
- "83"