Skip to content

Instantly share code, notes, and snippets.

@fbatiga
Last active March 31, 2019 08:28
Show Gist options
  • Select an option

  • Save fbatiga/672a97737f9a4f1e3b10dc4f7ebbb6dc to your computer and use it in GitHub Desktop.

Select an option

Save fbatiga/672a97737f9a4f1e3b10dc4f7ebbb6dc to your computer and use it in GitHub Desktop.
Basic files install
sudo su
sudo apt update
sudo apt install -y nano curl wget nginx letsencrypt fail2ban
sudo apt install mysql-common mysql-server -y
mysql_secure_installation
systemctl start mysql
systemctl enable mysql
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt install nodejs -y
sudo npm i -g yarn pm2
sudo echo "LABEL=SWAP swap /datadrive/swap defaults 0 0" >> /etc/fstab
sudo mkdir /datadrive
sudo mkfs -t xfs /dev/xvdb
sudo blkid | grep xvdb
sudo echo 'UUID=2680533e-9ee9-47f6-8b1c-343df7c94520 /datadrive xfs defaults,nofail 0 2' | sudo tee -a /etc/fstab
sudo mount -a
sudo swapon -s
sudo fallocate -l 4G /datadrive/swapfile
sudo chmod 600 /datadrive/swapfile
sudo mkswap /datadrive/swapfile
sudo swapon /datadrive/swapfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment