With the recent release of AlmaLinux OS 10, we have created a new recipe for our WSL development environment. Compared to its predecessor, AlmaLinux 10 provides performance enhancements, security updates and improved hardware support.

What You Get

Like for AlmaLinux 9, the WSL recipe sets up the development environment with all the components a regular PHP developer needs:

  • WSL2 – Windows Subsystem for Linux.
  • AlmaLinux 10 – Free and open source Linux distribution.
  • PHP – General-purpose scripting language geared towards web development.
  • Apache – Free and open-source cross-platform web server software.
  • MariaDB – Community-developed, commercially supported fork of the MySQL relational database management system.
  • Git – Distributed version control system.
  • Composer – Application-level dependency manager.
  • Node.js – JavaScript runtime environment.
  • PhpMyAdmin – Open source administration tool for MySQL and MariaDB.

Requirements

Make sure that you have the minimum requirements for running WSL2.

OS-wise you must be running:

  • Windows 10:
    • For x64 systems: Version 1903 or later with Build 18362.1049 or later.
    • For ARM64 systems: Version 2004 or later with Build 19041 or later.
  • or Windows 11.

Hardware-wise, you need virtualization support. On some older hardware that supports this feature, it may be disabled from the BIOS.

WSL2 needs Virtual Machine Platform feature enabled. You can enable it via the PowerShell running as an Administrator:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Installing the distro

Start by downloading and installing the Linux distro with this command:

wsl --install -d AlmaLinux-10

If everything ran ok, you are asked to enter a password at the end.

Next run each of the ansible playbook commands to install the development components.

Using WSL2 with AlmaLinux 10

You can start AlmaLinux10 by executing this coomand in the Windows Terminal:

wsl -d AlmaLinux-10

Our PHP projects can be run by navigating into the root project folder and running this command:

php -S 0.0.0.0:8080 -t public

Then you need to navigate to http://localhost:8080 in you preferred browser.

Running the Application Via Virtual Hosts

An easier way to run your applications is via virtual hosts. The full instructions to set up your virtual hosts are in the Create virtualhosts page.

After you set up your virtual hosts and install your project in e.g. the /var/www/example.localhost/html folder, you can run the application in the browser by accessing example.localhost.

If you run into any issues, make sure to first check our FAQ page. If all else fails, create an issue with details and we can talk.

Additional Resources


Looking for PHP, Laminas or Mezzio Support?

As part of the Laminas Commercial Vendor Program, Apidemia offers expert technical support and services for:

  • Modernising Legacy Applications
  • Migration from any version of Zend Framework to Laminas
  • Migration from legacy Laminas API Tools (formerly Apigility) to Dotkernel API
  • Mezzio and Laminas Consulting and Technical Audit
  • Leave a 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>