In this tutorial we’ll install the Debian Linux 9 (squeeze), Apache 2 with mpm-itk (to run each web as a isolated user),...
Setup PostgreSQL database system
adminPostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness.
1. Install packages
apt-get install postgresql postgresql-client
2. Create a user
// Change to the postgres linux user and create the actual user
su postgres
createuser user1
// Using the default template allow the user and set password
psql template1
alter user aip password ‘password’
That’s actually all you need to install and create the firt user. Follow the remaining steps to allow remote access to the PostgreSQL server.
3. Enable TCP/IP connections to the server to be able to manage by a remote client. Edit this line in the main PostgreSQL config file (pico /etc/postgresql/7.4/main/postgresql.conf):
tcpip_socket = true
If managing on Windows I recommend using the EMS SQL Manager
4. Allow connections from you IP address or a range (pico /etc/postgresql/7.4/main/pg_hba.conf)
host all all 85.234.0.0 255.255.0.0 trust
Using this code I enabled the 85.234.0.0/255.255.0.0 IP range to connect to the server. Make sure you allow as few IP addresses as possible.
You’re all set. Make sure the port 5432 is open in all firewalls to be able to remote manage the server.