How to install PostgreSQL on Amazon AWS EC2
The Elastic Compute Cloud (EC2) of the Amazon Web Services (AWS) further leveled the technology start up play ground. Now, a group of ambitious founders can develop their web services and on a laptop and rent a AWS EC2 server and push their service on there and the whole world will have access to it.TalentBits is part of the AWS EC2 user group. One very commonly asked question about setting up your environment on EC2 is how to set up PostgreSQL as it is one of the most commonly used open source SQL based database.
Step one: ssh to your AWS virtual box.
Upon registering the service, you will create an AWS instance you can control. Add your ip address to the security group with SSH protocol. Then you can follow the instruction provided to ssh into the AWS virtual box.
Step two: Switch to root role
Step three: Create a dedicated user for postgres. Postgres will not allow certain actions to perform under root.
Step four: Create a folder for actual data
Step Five: give pguser the permission of that data folder
Step Six: Install PostgreSQL
Step Seven: Edit the cluster path, make sure they aline with the folder you created for data
Step Eight: Switch to pguser role we just created
Step Nine: switch back to root and start pg service
Step Ten: Add it to auto start list
You should have successfully installed PostgreSQL service on the AWS box
0 comments: