Levdbas
2/4/2019 - 7:17 PM

My WSL installer

My WSL installer

#!/bin/sh
sudo apt-get update  # To get the latest package lists
sudo apt-get upgrade
sudo apt-get install dos2unix

#node
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
sudo apt-get install -y nodejs -y

# fix for crashing browsersync/server
echo fs.inotify.max_user_watches = 524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

#yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn -y

#CLI's
#npm install grunt --save-dev -y
sudo npm install gulp-cli -g -y
sudo npm install gulp -g -y

#PHP
sudo apt-get install php7.2 php7.2-cli php7.2-common php php7.2-zip
sudo apt-get install libapache2-mod-php php7.2-mysql php7.2-xml -y

#comoser
sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
sudo php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php
sudo php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer

#mysql
sudo apt install mariadb-client-core-10.1 -y

#wp CLI
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
wp --info

#wp dotenv
wp package install aaemnnosttv/wp-cli-dotenv-command:^1.0

#ruby
#sudo apt-get install build-essential -y
#sudo apt-get install libgmp-dev -y
#sudo apt-get install ruby-full -y
#sudo gem install sass
#sudo gem install compass