Windows Dev Box Try 2 2018
Going to list somethings as I go.
The Mac, in spite of Apple, is a great developer experience, here is to hoping the Windows, with the help of Microsoft, grows to be better and better as the improve it via user feedback to make it a great development box.
Links
This started it all https://char.gd/blog/2017/how-to-set-up-the-perfect-modern-dev-environment-on-windows
Webdev on Windows with WSL and VS Code
NPM and Composer install take a long time
Some of this is the Windowsantimalware running. If you go to Windows Security -> Exclusion you can have it not search this folder. More info https://blog.emsisoft.com/en/28620/antimalware-service-executable/
Local PHP
This one works best for me. I tried Valet etc just go lucky with this one https://medium.freecodecamp.org/setup-a-php-development-environment-on-windows-subsystem-for-linux-wsl-9193ff28ae83
Simple vhost file:
<VirtualHost *:80>
ServerName APP_NAME.test
ServerAdmin foo@foo.com
DocumentRoot /var/www/devroot/APP_NAME/public
Redirect permanent / https://APP_NAME.test/
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:443>
ServerName APP_NAME.test
ServerAdmin foo@foo.com
DocumentRoot /var/www/devroot/APP_NAME/public
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Make sure to run:
sudo a2enmod ssl
sudo a2enmod rewrite
service apache2 restart
MariaDB
Get the latest one installed so you have JSON fields etc here
But see bug in section apt-key
If you get this Linux error INSTALL PLUGIN unix_socket SONAME 'auth_socket';
checkout https://mariadb.com/kb/en/library/authentication-plugin-unix-socket/
Trouble with root connecting to 127.0.0.1
Connect to mysql on localhost and run
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1';
FLUSH PRIVILEGES;
Then set /etc/mysql/my.cnf to
skip-name-resolve = 1
bind-address = 0.0.0.0
service mysql restart
APT-KEY
This will not work
connecting dirmngr at '/tmp/apt-key-gpghome.L0JTeGaLOf/S.dirmngr' failed: IPC connect call failed
So run this instead
curl -sL "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF1656F24C74CD1D8" | sudo apt-key add
Putting the key in the search area. [https://github.com/Microsoft/WSL/issues/3286#issuecomment-395980628](Putting the key in the search area. https://github.com/Microsoft/WSL/issues/3286#issuecomment-395980628
NPM Errors
linux Error: pngquant failed to build, make sure that libpng-dev is installed
Fix is https://github.com/imagemin/pngquant-bin/issues/78
Exclude WSL folders from virus scans
For me this was more about my code folder
Apps
TextExpander
1Password
Get this in the store to start
Windows ClipBoard History
And Alfred replacement! The plugin section has the history one
VPN
ScreenShots
This is built into Windows and works really well. Using the Pen I can also just make the back button do it on the fly.
Record Desktop
???
MySQLWorkbench
not pretty but does handle things well
Add WSL File path to be ignored in the Windows defender scanner
comments powered by Disqus