![]() You can now start using PostgreSQL for your database needs. ![]() ConclusionĬongratulations! You have successfully installed PostgreSQL 13 on your Ubuntu 20.04 system. If everything went well, you should see that the service is active (running). This command shows the status of the PostgreSQL service. Step 5: Verifying InstallationĪfter the installation is complete, verify that PostgreSQL 13 is installed and running with the command: sudo systemctl status postgresql The -y option automatically answers ‘yes’ to all prompts, allowing the installation to proceed without your intervention. ![]() Now, you can install PostgreSQL 13 by running: sudo apt-get -y install postgresql-13 This command fetches the latest updates from all repositories, including the newly added PostgreSQL repository. Step 3: Updating Package ListĪfter adding the repository and its key, update your system’s package list using the following command: sudo apt-get update The wget command fetches the key, and sudo apt-key add - adds it to your system’s list of trusted keys. Run the following command to import this key: wget -quiet -O - | sudo apt-key add. The PostgreSQL packages are signed by a key to ensure their authenticity. Next, we need to import the repository signing key. The $(lsb_release -cs) part automatically fetches your Ubuntu version. This command adds the PostgreSQL apt repository to your system’s sources list. Open your terminal and execute the following command: sudo sh -c 'echo "deb $(lsb_release -cs)-pgdg main" > /etc/apt//pgdg.list' To install PostgreSQL 13, we need to add the PostgreSQL apt repository manually. However, Ubuntu 20.04 includes PostgreSQL 12 by default. PostgreSQL is available in all Ubuntu versions by default. If you’re using a personal system, you should be the superuser. Step 2: Importing Repository Signing Keyīefore starting, ensure that you have superuser (root) access to your Ubuntu 20.04 system.Step 1: Adding PostgreSQL Apt Repository.To continue your PostgreSQL journey, head back to our index that lists our full PostgreSQL guide. If you have installed from source, you should just be able to install the next minor release and remain compatible with your existing data, but again, it’s always a good idea to back up first. Updating PostgreSQL on Other Linux Distributions Or on older versions of Red Hat (6/7) run: yum update postgresql-server On Fedora and Red Hat 8 run: dnf update postgresql-server Update PostgreSQL on Red Hat-based distributions by running the following commands. Updating PosgreSQL on Redhat/Centos/Fedora To update PostgreSQL installed from the default Arch software repository, re-run the installation: pacman -S postgresql If you installed from the PostgreSQL apt repository, run: sudo apt update If you installed from the default apt repository, run: sudo apt update Whether you opted to install PostgreSQL on your Debian system using the default Debian software repository, or added the PostgreSQL repository and installed from there, the update process is the same – the package names just differ: From the Default apt Repository Updating PostgreSQL on Debian and Ubuntu Linux Be sure to back up your data (preferably your whole system!) before upgrading so there are no unintended consequences and so that you can roll back if necessary.Ĭheck out our article on exporting PostgreSQL data here. Before you do update, however check which version will be installed and ensure it is compatible with the software you are connecting to the database. This will not upgrade to the next major release. Note that this article is about updating the PostgreSQL package from your software repository. If you’re looking to install PostgreSQL server on your Linux system, follow our instructions here. ![]() This article will instruct you how to update the PostgreSQL database server on Linux – Redhat, Ubuntu, Debian, and Arch Linux.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |