- A fresh install of a WSL distro, eg Ubuntu
- Docker Desktop for Windows set up for WSL2 (https://docs.docker.com/docker-for-windows/wsl/)
sudo apt-get update && sudo apt-get upgrade
sudo apt-add-repository ppa:fish-shell/release-3
sudo apt-get update
sudo apt-get install fish
From bash:
chsh -s $(which fish)
sh -c "$(curl -fsSL https://starship.rs/install.sh)" (from bash)
Then in ./.config/fish/config.fish
add:
starship init fish | source
sudo apt install keychain
Then in ./.config/fish/config.fish
add:
eval (keychain --quiet --eval --agents ssh id_rsa)
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
nvm install lts
nvm use lts
npm install -g yarn
wget https://getcomposer.org/installer
php installer
sudo mv composer.phar /usr/local/bin/composer
Set the path in the ~/.config/fish/config.fish
file.
set -x PATH ~/.config/composer/vendor/bin $PATH
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
git config --global user.name "Brett Mason"
git config --global user.email "[email protected]"
sudo visudo
ALL ALL = (root) NOPASSWD: /usr/sbin/service
username ALL=(ALL) NOPASSWD: ALL
sudo add-apt-repository ppa:ondrej/php.
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install libnss3-tools jq xsel libssl-dev zip unzip pkg-config libmemcached11 libmemcachedutil2 imagemagick memcached redis-server
sudo apt-get install network-manager dnsmasq
sudo apt-get install nginx mysql-server php-fpm php-cli php-mysql php-sqlite3 php-intl php-zip php-xml php-curl php-mbstring php-redis php-pear php-dev
In Ubuntu systems running MySQL 5.7 (and later versions), the root MySQL user is set to authenticate using the auth_socket plugin by default rather than with a password. In order to use a password to connect to MySQL as root, you will need to switch its authentication method from auth_socket to mysql_native_password. To do this, open up the MySQL prompt from your terminal:
sudo usermod -d /var/lib/mysql/ mysql
sudo service mysql start
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
FLUSH PRIVILEGES;
exit
sudo service mysql restart
To test logging in as a normal user run mysql -u root -p
and enter the password from step 4.
valet install
Make a directory to store sites, eg mkdir ~/sites
and run valet park
from this directory, as well as valet secure
to generate the SSL certificate for installing in the browser.
sudo chown -R myuser /path/to/folder
https://gist.github.com/danielstgt/dc1068e577bbd8b6e9a6050a6db1f9c3#gistcomment-3212174
You can now execute an arbitrary command line when starting an instance by creating/editing /etc/wsl.conf (via sudo) with the following:
[boot]
command="service postgresql start"
This command runs as root and generates no output. If you need to run multiple commands, they should be semicolon separated (or something like &&) inside the command= string.