About Postgres
A robust relational database management system (RDBMS) that is open-source and has grown in popularity recently is PostgreSQL. Since its initial release in 1996, a committed development community has continued to develop and support it.
One of PostgreSQL's distinguishing characteristics is its capacity for handling sophisticated SQL features like stored procedures, triggers, and views. Because of this, it is a fantastic option for enterprise-level applications that need complicated data handling.
The scalability of PostgreSQL is a key component. It is appropriate for high-traffic applications since it supports several concurrent connections and can manage huge datasets.
Additionally, PostgreSQL is known for being a trustworthy and safe database management system. To safeguard sensitive data from unauthorized access, it offers strong data encryption and access control features.
Additionally, PostgreSQL places a high priority on extensibility, making it simple to add new functions and data types. As a result, it functions as a versatile database management system that can be modified to suit certain business requirements.
Overall, PostgreSQL is a feature-rich database management system that is adaptable and capable of handling challenging data administration jobs. It's a great option for a variety of applications thanks to its scalability, security, and flexibility.
Install Postgres on Ubuntu
Let's install Postgres on Ubuntu
Here I am going to choose version 14 for Postgres.
Install the dependencies required to build PostgreSQL:
sudo apt update
sudo apt install build-essential libreadline-dev zlib1g-dev libssl-dev libxml2-dev libxslt-dev
Download the source code for PostgreSQL from the official website:
curl -LO https://ftp.postgresql.org/pub/source/v14.7/postgresql-14.7.tar.gz
Extract the source code archive:
tar xvf postgresql-14.7.tar.gz
Change to the directory where the source code was extracted:
cd postgresql-14.7
*Configure the build options by running the following command:
*
./configure
Build the PostgreSQL binaries by running:
make
Install PostgreSQL by running:
sudo make install
Initialize the database cluster by running:
sudo /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
Start the PostgreSQL server by running:
sudo /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
You can then connect to the PostgreSQL server by running:
sudo -u postgres /usr/local/pgsql/bin/psql
That's it! You now have a working installation of PostgreSQL from source on your Ubuntu system.
The default configuration will build the server and utilities, as well as all client applications and interfaces that require only a C compiler. All files will be installed under /usr/local/pgsql
by default.
Issues I faced:
configure: error: readline library not found
sudo apt install libreadline-dev
Top comments (0)