diff --git a/wsl/os/almalinux9/FAQ.md b/wsl/os/almalinux9/FAQ.md index b6559dd..24cd41d 100644 --- a/wsl/os/almalinux9/FAQ.md +++ b/wsl/os/almalinux9/FAQ.md @@ -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 diff --git a/wsl/os/almalinux9/README.md b/wsl/os/almalinux9/README.md index 4950c0f..9aa70a2 100644 --- a/wsl/os/almalinux9/README.md +++ b/wsl/os/almalinux9/README.md @@ -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). diff --git a/wsl/os/almalinux9/roles/nodejs/tasks/main.yml b/wsl/os/almalinux9/roles/nodejs/tasks/main.yml index f5a0671..67dbbb2 100644 --- a/wsl/os/almalinux9/roles/nodejs/tasks/main.yml +++ b/wsl/os/almalinux9/roles/nodejs/tasks/main.yml @@ -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" diff --git a/wsl/os/almalinux9/roles/php/tasks/main.yml b/wsl/os/almalinux9/roles/php/tasks/main.yml index 018ac58..53b6091 100644 --- a/wsl/os/almalinux9/roles/php/tasks/main.yml +++ b/wsl/os/almalinux9/roles/php/tasks/main.yml @@ -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: diff --git a/wsl/os/ubuntu20/FAQ.md b/wsl/os/ubuntu20/FAQ.md index 6edb5ef..5c6a312 100644 --- a/wsl/os/ubuntu20/FAQ.md +++ b/wsl/os/ubuntu20/FAQ.md @@ -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 diff --git a/wsl/os/ubuntu20/README.md b/wsl/os/ubuntu20/README.md index 46f3fb9..8b35177 100644 --- a/wsl/os/ubuntu20/README.md +++ b/wsl/os/ubuntu20/README.md @@ -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). diff --git a/wsl/os/ubuntu20/roles/nodejs/tasks/main.yml b/wsl/os/ubuntu20/roles/nodejs/tasks/main.yml index 83d1569..fcd53f4 100644 --- a/wsl/os/ubuntu20/roles/nodejs/tasks/main.yml +++ b/wsl/os/ubuntu20/roles/nodejs/tasks/main.yml @@ -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 diff --git a/wsl/os/ubuntu20/roles/php/tasks/php82.yml b/wsl/os/ubuntu20/roles/php/tasks/php82.yml new file mode 100644 index 0000000..b989ef5 --- /dev/null +++ b/wsl/os/ubuntu20/roles/php/tasks/php82.yml @@ -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 diff --git a/wsl/os/ubuntu20/roles/php/tasks/php83.yml b/wsl/os/ubuntu20/roles/php/tasks/php83.yml new file mode 100644 index 0000000..632f596 --- /dev/null +++ b/wsl/os/ubuntu20/roles/php/tasks/php83.yml @@ -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 diff --git a/wsl/os/ubuntu20/roles/php/vars/main.yml b/wsl/os/ubuntu20/roles/php/vars/main.yml index 0c5b30f..8d0c977 100644 --- a/wsl/os/ubuntu20/roles/php/vars/main.yml +++ b/wsl/os/ubuntu20/roles/php/vars/main.yml @@ -3,4 +3,5 @@ php_info_filename: info.php php_versions: - "74" - "81" - + - "82" + - "83"