can also set up with Anisble!
visit my post Install and setup ghostjs with ansible
I want a site like yours.. I've an AWS account.. help me!!
Alright, here you go. Let's do this mostly using command line.
- Login to your AWS console, generate an access key and secret key for yourself.
How to create an AWS account, and generate an access key ?
Generate an access key: Click on IAM -> User -> click on username -> click on security credentials -> click create access key. Now save this " Access key id and secret access key " somewhere for now.Now we need awsCLI to communicate through command line. I will be using ubuntu >
- Login into your server and run the command
pip3 install awscli --upgrade --user
Here set the access keys you saved earlier and set the region as well. After setting up you can check by running the command.
>Launch an instance via cli.
aws ec2 run-instances --image-id ami-024a64a6685d05041 --count 1 --instance-type t2.micro --key-name ashwini --security-group ghost-2
There you go, successfully launched an instance!.
- Create a new linux user other than root. AWS by default gives you a ubuntu user.
sudo adduser <user>
2. Update and upgrade the packages.
sudo apt-get update sudo apt-get upgrade
3. Install nginx
sudo apt-get install nginx
4. Install mysql-server and create a new user or change root user password.
sudo apt-get install mysql-server sudo mysql ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; quit
5. Install nodejs.
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash
sudo apt-get install -y nodejs
6. Install ghostcli
sudo npm install [email protected] -g
7. Install Ghost. First create a directory and run the install process.
sudo mkdir -p /var/www/ghost
sudo chown <user>:<user> /var/www/ghost
sudo chmod 775 /var/www/ghost
7. Now its time to configure your site. you need to feed respective information
>Ghost database name
>Ghost MySQL user
>Start Ghost: Yes
Yay!! Go on and check your site now.
Note: Your site will run on "http" you have few more steps to go, to make it to https and understanding CDN.