Coder Social home page Coder Social logo

wsl2_dev_setup's Introduction

WSL2_dev_setup

Setup instructions WSL2 for web development

Prerequisites

For this setup to work, you need to...

  • ...have either Windows 11 or Windows 10 version 2004 and higher (Build 19041 and higher) installed
  • ...have CPU virtualization feature turned on in BIOS
  • ...have Hyper V Windows Service activated
 dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

...in Powershell does the job.

Setup

Goals:

  • Running ddev webserver managed with Docker Desktop for all services your webproject requires
  • Running PHPStorm on Windows host machine, including container management (via hook to Docker Desktop), fast file system indexation, WSL2 terminal support and much more

Reasons:

  • Virtual Machine Performance issues
  • Dual desktops and switching between host machine and virtual machine disturbs workflows
  • Full webserver scope management can be extremely tedious
  • Breaking one service can destroy your whole webserver setup

NOTE: This instruction manual is still work in progress, as is WSL2. I take no responsibility for any damage done to your system.

WSL

Installation

Microsoft's instructions
Microsoft's instructions (GER)

  • In Windows Powershell, run:
 wsl --install
 wsl --set-default-version 2

Configuration

  • In Windows User directory, create or update .wslconfig:
 [wsl2]
 memory=10GB
 processors=8
 swap=10GB
 localhostForwarding=true

Change these values according to your needs / specs

Ubuntu 20 LTS installation

  • To install Ubuntu 20 LTS or any other of the supported distributions open Windows Store search for it, and run the installation
  • Launch your distribution!

PHPStorm on Windows

Installation Instructions

Docker

Show Docker Desktop (WSL2) Setup instructions

DDEV

Show DDEV Setup Instructions

  • Natively supports Magento 2 projects!

More information

  • Due to the architecture of WSL2, you don't want your projects being located in the Windows file system (as WSL2 is significantly slower here, due to file system difference)
  • Instead, you create and manage your projects inside the subsystem and use any IDE on the host Windows system to edit them

wsl2_dev_setup's People

Contributors

luc4g3r avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.