Next, install the latest version of PostgreSQL by running the following command: dnf install postgresql14 postgresql14-server Next, disable the default PostgreSQL repo using the following command: dnf -qy module disable postgresql Step 3 – Install PostgreSQL 14 on Oracle Linux 8įirst, update your repository using the following command: dnf update -y Once the repo is created, you can proceed to the next step. You can install it using the following command: dnf install In order to install the latest PostgreSQL version, you will need to install the PostgreSQL repo to your system. Postgresql 13 client, server PostgreSQL server and client module Postgresql 12 client, server PostgreSQL server and client module Postgresql 10 client, server PostgreSQL server and client module Postgresql 9.6 client, server PostgreSQL server and client module Oracle Linux 8 Application Stream (x86_64) You should see all PostgreSQL versions in the following output: Last metadata expiration check: 0:19:12 ago on Wednesday 22 June 2022 11:49:00 AM EDT. You can check all available versions in the AppStream repository using the following command: dnf module list postgresql dnf update -y Step 2 – Add PostgreSQL 14 Repositoryīy default, the latest version of PostgreSQL is not included in the Oracle Linux default repository. Once you are logged in to your server, run the following command to update your base system with the latest available packages. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page. Create a new server, choosing Oracle Linux 8 as the operating system with at least 2GB RAM. Step 1 – Create Atlantic.Net Cloud Serverįirst, log in to your Atlantic.Net Cloud Server. A root password configured on your server.A server running Oracle Linux 8 on the Atlantic.Net Cloud Platform.In this post, we will show you how to install and secure PostgreSQL on Oracle Linux 8. This version comes with significant improvements to the indexing and lookup system that benefit large databases. At the time of writing this article, PostgreSQL 14 is the latest version. It is used as a database backend for several web, mobile, geospatial, and analytics applications. It is gaining popularity due to its robustness, flexibility, and performance. \d 2.PostgreSQL is an open-source, powerful, and high-performance relational database management system. Psql 1. Examples of database-related syntax #Create databaseĬREATE DATABASE mydb #View all databasesĬREATE TABLE test ( id int, body varchar ( 100 )) #View all tables under the current database Restart PostgreSQL service #Restart PostgreSQL serviceĪfter configuration, you can use the client to connect 4- Common syntax examples of PostgreSQL shell Vi / var / lib / pgsql / 12 / data / pg_hba. #Change the listening address to* #The default listen addresses configuration is commented out, so you can add this line directly at the beginning of the configuration file Vi / var / lib / pgsql / 12 / data / postgresql. Open port sudo firewall - cmd - add - port = 5432 / tcp - permanent Change password ALTER USER postgres WITH PASSWORD 'NewPassword' 3- Configure remote access 1. Switching Linux user to Postgres through Su command will automatically enter the command line su postgres 2. In order to facilitate our use of Postgres account for management, we can change the password of this account 1. After the database is initialized, a database named Postgres will be created to store the basic information of the database, such as user information, etc., which is equivalent to the default MySQL database named mysql.Ī super user will be initialized in Postgres database postgres X 2- Modify the password of Postgres accountĪfter PostgreSQL is installed successfully, a Linux user named Postgres will be created by default. Sudo systemctl start postgresql - 12 #Set PostgreSQL service to start for power on Start PostgreSQL service #Start PostgreSQL service Initialize the database sudo / usr / pgsql - 12 / bin / postgresql - 12 - setup initdb Installing PostgreSQL 11 is Yum install postgresql12 postgresql12 serverĪnd so on 2. Install PostgreSQL service sudo yum install - y postgresql12 postgresql12 - server Import Yum source sudo yum install - y https : ///pub/repos/yum/reporpms/EL-7-x86_64/ 1. Environmental information and scope of applicationĢ、 PostgreSQL installation 1. PostgreSQL 12 remote access configurationĢ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |