Skip to content

Instantly share code, notes, and snippets.

@jonpugh
Last active January 25, 2021 10:11
Show Gist options
  • Save jonpugh/22df793108778f863f95f42f01afc415 to your computer and use it in GitHub Desktop.
Save jonpugh/22df793108778f863f95f42f01afc415 to your computer and use it in GitHub Desktop.
Modern Symfony/Drupal Development on Windows 10 with WSL / Ubuntu

I bought a $129 Lenovo Windows Laptop

Let's see how much we can get out of this thing.

Rules

  1. Native tools only. No Docker. No Virtualization. No "local dev" products.
  2. Minimize the number of apps. No Chrome.
  3. Use Windows apps whenever possible. VSCode vs IntelliJ
  4. Document all of our steps.

Setup

There are a few steps to get started that aren't fully documented.

  1. Install PowerShell or PowerShell 6.

    1. I had to enable something in the windows store to allow "untrusted apps" to be installed. I don't remember exactly how I did that and can't find the page in my history.
  2. Enable WSL (Windows Subsystem for Linux).

    1. https://docs.microsoft.com/en-us/windows/wsl/install-win10?redirectedfrom=MSDN
    2. Run PowerShell as Administrator.
    3. Run: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux.
    4. Restart.
  3. Install Ubuntu

    1. Press ":windows:" key and type "Ubuntu" to search.
    2. Under "Store", select "Ubuntu: App" and click "Get" to install.
    3. Run the "Ubuntu" App, and you get a Bash terminal! Create your user.
  4. Install Drupal LAMP stack:

    sudo apt install apache2 php mysql-server php-mysql php-gd php-xml php-mbstring php-curl composer

  5. Install VS Code:

    1. :windows: key, type "vscode".
  6. Run VS Code.

    1. When you first run VS Code, you will see a notification: "Enable WSL". This will re-open code with the filesystem from the Ubuntu instance instead!
@jonpugh
Copy link
Author

jonpugh commented Nov 12, 2019

PHP Warning: include(/home/jon/Projects/provision/vendor/symfony/console/Exception/InvalidArgumentException.php): failed to open stream: Too many open files in /home/jon/Projects/provision/vendor/composer/ClassLoader.php on line 444

https://www.tecmint.com/increase-set-open-file-limits-in-linux/

ulimit -n 65536

@jonpugh
Copy link
Author

jonpugh commented Nov 12, 2019

MySQL couldn't reset the password:

update user set plugin="mysql_native_password" where User='root';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment