dd if=/dev/zero of=/var/swap bs=1k count=1024k mkswap /var/swap swapon /var/swap echo '/var/swap swap swap defaults 0 0' >> /etc/fstab
If the last command fails with "Permission denied" (e.g. on a fresh Amazon EC2 instance), try this instead:
echo '/var/swap swap swap defaults 0 0' | sudo tee -a /etc/fstab
adduser usermod -aG sudo su -
sudo apt-get update sudo apt-get upgrade sudo apt-get install nginx
sudo ufw allow 'Nginx Full' sudo apt-get install mysql-server
If you are running Ubuntu 18.04, you will need to run a couple of additional steps in order to make your MySQL setup compatible
sudo mysql ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash sudo apt-get install -y nodejs
If you have Node.js already installed, please ensure it was installed system wide. This means Node.js was installed e.g. in
/usr/bin/node or /usr/local/bin/node. You can double check where Node.js was installed with the command (which node).
sudo npm i -g ghost-cli@latest
sudo mkdir -p /var/www/ghost
sudo chown [user]:[user] /var/www/ghost sudo chmod 775 /var/www/ghost
cd /var/www/ghost ghost install