Postgres
This is an advanced, open-source object-relational database management system (ORDBMS). For data scientists, understanding the relational concepts at PostgreSQL's core is essential. At its simplest, PostgreSQL, much like other relational databases, organizes data into tables, where each table consists of rows (individual records) and columns (attributes or fields). These tables can be linked through keys, allowing for complex data relationships and efficient querying.
Linux server
Linux server refers to a specific type of server based on the free, open-source, and modular Linux operating system
Benefits of Linux: -
•Cost-efficiency
• Powerful community support
•Freely distributed source code
• Stability with lower risk of downtime
•High performance in managing demanding workloads and storage needs
•Improved security from unwanted cyber threats
•Customization flexibility in terms of server implementation and operation
Installation of PostgreSQL on Linux
Step 1: On Linux Terminal & execute the following command to update all the packages.
sudo apt-get update
Step 2: Now, it is time to install PostgreSQL on Linux. For that, the below-mentioned command will be used.
sudo apt install PostgreSQL postgresql-contrib
These are the simple commands needed to Install PostgreSQL on Linux. Following this, below are some of the configuration methods, you have to perform on the Linux PostgreSQL.
How to Check the Status of PostgreSQL on Linux?
To check the status of your installed PostgreSQL on Linux, the following small command will be used. It will show the Online Status of PostgreSQL.
service PostgreSQL status
How to Start PostgreSQL on Linux?
You can't directly work on PostgreSQL on Linux just like Python or Java. You need to get into PostgreSQL. To do that, the following two commands will be used.
Step 1: The first one will Enable PostgreSQL on Linux.
sudo su postgres
Step 2: The second one will help to enter into the PostgreSQL.
psql
How to Check Database & Users on PostgreSQL in Linux?
Step 1: To check the Database implemented in PostgreSQL, the command '\l' will be used. It will mark the Database there.
Step 2: To check the Users available in the PostgreSQL, the command '\du' will be used.
How to Configure & Modify Users on PostgreSQL on Linux?
Step 1: To create a simple & normal user, the following command will be used. It will show Create Role Message.
CREATE USER <User-Name>;
Step 2: If you want to make the New User the Superuser, the following command will be executed. It will show an Alter Role Message.
ALTER USER <User-Name> WITH SUPERUSER;
Step 3: Now, if you want to check whether the User is created or not, use the command '\du' there.
From the discussion, we can confirm that one can easily now Configure PostgreSQL App on Linux. Performing a few commands there will clear the concept of PostgreSQL on Linux.
Top comments (0)