![]() rpm Install PostgreSQL: sudo yum install -y postgresql15-server Optionally initialize the database and enable automatic start: sudo / usr / pgsql-15 / bin / postgresql-15. org / pub / repos / yum / reporpms / EL-7-x8664 / pgdg-redhat-repo-latest. For additional help or useful information, we recommend you check the official PostgreSQL website. Install the repository RPM: sudo yum install -y https: / / download. Thanks for using this tutorial for installing PostgreSQL on CentOS 8 systems. ![]() Sudo -u postgres createdb -O mailana meilanadbĬongratulations! You have successfully installed PostgreSQL. Sudo -u postgres createuser -D -A -P meilana It will return you back to the Ubuntu command prompt: postgres-# \qĬreate new user and database: # For example, let us create a new user called “mailana” with password “meilanamaria”, and database called “meilanadb”. To disconnect from the PostgreSQL database command prompt just type the below command and press enter. To check login info use the following command from a database command prompt: postgres-# \conninfo Now you are logged in to the PostgreSQL database server. So to connect to the Postgres server, log in to your system as a user of Postgres and connect database: su - postgres It also creates a system account with the same name ‘ postgres’. Accessing PostgreSQL command prompt.Īfter installing the PostgreSQL database server, by default, it creates a user ‘ postgres’ with role ‘ postgres’. You can verify the installation using the below command: $ sudo -u postgres psql -c "SELECT version() " Start the PostgreSQL service and enable it to start on boot: sudo systemctl enable -now postgresql To make your database installation complete, you need to perform the following steps: Once the installation is complete, the PostgreSQL installation will not be enabled for automatic start or have the database initialized automatically. Now, Install PostgreSQL packages using the following command: sudo dnf install dnf install postgresql-contrib PostgreSQL is available in the default repositories. First, let’s start by ensuring your system is up-to-date. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |