

AlmaLinux 9 in WSL2 : install PHP, Apache, MariaDB, Composer, PhpMyadmin
source link: https://www.dotkernel.com/php-development/almalinux-9-in-wsl2-install-php-apache-mariadb-composer-phpmyadmin/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

AlmaLinux 9 in WSL2 : install PHP, Apache, MariaDB, Composer, PhpMyadmin
In this article we will demonstrate how we install AlmaLinux 9 using WSL2.
First, you need to check if your machine is ready for using WSL2. Open Windows Terminal and execute the following command:
wsl -v
The output should look similar to this:
WSL version: 1.0.0.0
Kernel version: 5.15.74.2
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.819
If instead of the above output, you get an error, it means that WSL is not (completely) installed on your machine. In this case, please follow the instructions found in this guide, then return to this page and continue with the next step.
Download and install AlmaLinux 9
Open Microsoft Store and search for AlmaLinux
. From the results, select AlmaLinux 9
and install it. Once installed, clicking on Open will open it in Windows Terminal.
The installer will prompt you for your username, your password and password confirmation.
Setup AlmaLinux 9
While still in the AlmaLinux 9 terminal, start executing the following commands.
Install required packages:
sudo dnf install epel-release dnf-utils http://rpms.remirepo.net/enterprise/remi-release-9.rpm -y
Update installed packages:
sudo dnf upgrade -y
Install Ansible:
sudo dnf install ansible -y
Clone our development environment setup package:
git clone https://github.com/dotkernel/development.git
Navigate to the directory with the Ansible recipes:
cd ~/development/wsl/
Using your preferred text editor, open config.yml where you must fill in the empty fields. Save and close the file.
Run Step 1 of the installer script (it will prompt you for the password you entered during the installation process):
ansible-playbook -i hosts install.yml --ask-become-pass
Restart AlmaLinux 9:
- press
Control
+d
- Open Windows Terminal
- stop AlmaLinux 9 by executing
wsl -t AlmaLinux9
- start AlmaLinux 9 by executing
wsl -d AlmaLinux9
Navigate back to the directory with the Ansible recipes:
cd ~/development/wsl/
Run Step 2 of the installer script (once again, it will prompt you for the password you entered during the installation process):
ansible-playbook -i hosts install.yml --ask-become-pass
Once finished, the installation is complete, your AlmaLinux 9 development environment is ready to use.
Test AlmaLinux 9
Check if everything works by opening in your browser:
- http://localhost/ – Apache’s default home page
- http://localhost/info.php – PHP info page
- http://localhost/phpmyadmin/ – PhpMyAdmin (login with username root + the root password you configured in config.yml under mariadb -> root_password)
The complete guide with additional features is available here.
Leave a Reply Cancel Reply
Your email address will not be published. Required fields are marked *
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Save my name, email, and website in this browser for the next time I comment.
Recommend
-
139
phpMyAdmin A web interface for MySQL and MariaDB. https://www.phpmyadmin.net/ Code status Download You can get the newest release at
-
14
Tutorial How to Install and Secure phpMyAdmin with Nginx on an Ubuntu 18.04 server MySQL
-
10
How to Install Apache Maven on AlmaLinux 8 Apache Maven is a powerful project management and comprehension tool used by software developers working with the Java programming language. It is a build automation tool that favors conven...
-
6
How to Install Apache Cassandra on AlmaLinux / Rocky Linux 8 Apache Cassandra is an open-source NoSQL distributed database management system. Cassandra can be scaled horizontally by adding more nodes across which data is replicated...
-
8
How to Install and use PHP Composer on AlmaLinux 8 Composer is a dependency manager for PHP that allows you to download and install all the required PHP packages needed for your project. It is a command-line tool that installs all...
-
13
<?xml encoding="utf-8" ??>LAMP stack is a collection of open-source software installed together to enable a server to host and run modern web applications written in server-side languages like PHP. LAMP i...
-
6
Using a Different System? ...
-
10
Using a Different System? ...
-
5
Install Apache Cassandra on AlmaLinux 8|Oracle Linux 8Many organizations handling large unstructured data require a highly scalable and available tool. Apache Cassandra is the most popular tool for this task.Apache Cassandra
-
10
How to Configure MariaDB Master-Slave Replication on AlmaLinuxLearn How to Configure MariaDB Master-Slave Replication on an AlmaLinux Platform
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK