Installing the PostgresSQL
- Open a terminal in mac and run the following command
- kaushiki-2:~ arun$ brew install postgresql
- Then run the following command from the terminal window
- If folder ~/Library/LaunchAgents/ does not exist, create this directory and then follow the next step
- kaushiki-2:~ arun$ cp /usr/local/Cellar/postgresql/9.5.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
- Initialise the database using the following command
- aushiki-2:~ arun$ initdb /usr/local/var/postgres/ -E utf8
- Also install the lunchy utility which helps in starting and stopping the postgres server. Run the following command to install lunchy
- kaushiki-2:~ arun$ gem install lunchy
- Once lunchy is installed use the following command to start and stop the postgres server
- kaushiki-2:~ arun$ lunchy start postgresstarted homebrew.mxcl.postgresql
- kaushiki-2:~ arun$ lunchy stop postgresstopped homebrew.mxcl.postgresql
- Also install the pgAdmin which is a GUI tool for configuring the Postgresql database