|
1 | 1 | # Quickstart guide |
2 | 2 |
|
3 | | -In this guide you will learn to install Percona Distribution for PostgreSQL with tested open source extensions and tooling designed to work together reliably on Debian and RHEL. This guide quickly gets you up and running with: |
| 3 | +This guide shows how to install and start Percona Distribution for PostgreSQL on Debian- and RHEL-based Linux systems. After completing this guide, you will have: |
4 | 4 |
|
5 | | -* Install Percona Distribution for PostgreSQL using a Package Manager |
6 | | -* Connect to PostgreSQL using the `psql` interactive terminal |
7 | | -* Interact with PostgreSQL with basic commands |
8 | | -* Manipulate data in PostgreSQL |
| 5 | +- PostgreSQL running locally |
| 6 | +- A database named `test` |
| 7 | +- A table named `customers` |
| 8 | +- One inserted row you can query |
9 | 9 |
|
10 | | -## Preconditions |
11 | | - |
12 | | -Install `curl` for [Telemetry](telemetry.md), this is optional. |
| 10 | +## Fast path (2-minute install) |
13 | 11 |
|
14 | 12 | ```{.bash data-prompt="$"} |
15 | | - $ sudo apt install curl |
| 13 | + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb |
| 14 | + sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb |
| 15 | + sudo percona-release setup ppg-18 |
| 16 | + sudo apt install percona-postgresql-18 |
| 17 | + sudo -i -u postgres psql |
| 18 | + ``` |
| 19 | +After psql starts, run the following SQL commands: |
| 20 | + |
| 21 | + ```sql |
| 22 | + CREATE DATABASE test; |
| 23 | + \c test |
| 24 | + CREATE TABLE customers (first_name VARCHAR(50), last_name VARCHAR(50), email VARCHAR(100)); |
| 25 | + INSERT INTO customers VALUES ('John','Doe','john.doe@example.com'); |
| 26 | + SELECT * FROM customers; |
| 27 | + \q |
16 | 28 | ``` |
17 | 29 |
|
| 30 | +For a step-by-step explanation, continue below. |
| 31 | + |
18 | 32 | ## Install on Debian / Ubuntu (APT) {.power-number} |
19 | 33 |
|
20 | 34 | 1. Fetch the `percona-release` package: |
21 | 35 |
|
22 | | - ```{.bash data-prompt="$"} |
23 | | - wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb |
24 | | - sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb |
25 | | - ``` |
| 36 | + ```{.bash data-prompt="$"} |
| 37 | + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb |
| 38 | + sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb |
| 39 | + ``` |
26 | 40 |
|
27 | 41 | 2. Enable the repository and install the package: |
28 | 42 |
|
29 | | - ```{.bash data-prompt="$"} |
30 | | - sudo percona-release setup ppg-18 |
31 | | - sudo apt install percona-postgresql-18 |
32 | | - ``` |
| 43 | + ```{.bash data-prompt="$"} |
| 44 | + sudo percona-release setup ppg-18 |
| 45 | + sudo apt install percona-postgresql-18 |
| 46 | + ``` |
33 | 47 |
|
34 | 48 | The installation process automatically initializes and starts the default database. |
35 | 49 |
|
36 | | -3. Switch to a postgres user and open the psql interactive terminal: |
| 50 | +3. Switch to the `postgres` user and open the psql interactive terminal: |
37 | 51 |
|
38 | | - ```{.bash data-prompt="$"} |
39 | | - sudo su postgres |
40 | | - psql |
41 | | - ``` |
| 52 | + ```{.bash data-prompt="$"} |
| 53 | + sudo -i -u postgres |
| 54 | + psql |
| 55 | + ``` |
42 | 56 |
|
43 | 57 | 4. Create a database and make a table in the database: |
44 | 58 |
|
45 | | - ```{.bash data-prompt="$"} |
46 | | - CREATE DATABASE test; |
47 | | - CREATE TABLE customers (first_name VARCHAR(50), last_name VARCHAR(50), email VARCHAR(100)); |
48 | | - ``` |
| 59 | + ```sql |
| 60 | + CREATE DATABASE test; |
| 61 | + \c test |
| 62 | + CREATE TABLE customers (first_name VARCHAR(50), last_name VARCHAR(50), email VARCHAR(100)); |
| 63 | + ``` |
49 | 64 |
|
50 | | -5. Insert data in the customers table and query the data insertion: |
| 65 | +5. Insert data in the customers table and query the data insertion: |
51 | 66 |
|
52 | | - ```{.bash data-prompt="$"} |
53 | | - INSERT INTO customers (first_name, last_name, email) VALUES ('John', 'Doe', 'john.doe@example.com'); |
54 | | - SELECT * FROM customers; |
55 | | - ``` |
| 67 | + ```sql |
| 68 | + INSERT INTO customers (first_name, last_name, email) VALUES ('John', 'Doe', 'john.doe@example.com'); |
| 69 | + SELECT * FROM customers; |
| 70 | + \q |
| 71 | + ``` |
56 | 72 |
|
57 | | -Congratulations! You have installed Percona Distribution for PostgreSQL and created your first database. |
| 73 | +Congratulations! Percona Distribution for PostgreSQL is now running and you have created your first database. |
58 | 74 |
|
59 | 75 | For detailed installation steps and further instructions on Debian and Ubuntu, see the [Install Percona Distribution for PostgreSQL on Debian and Ubuntu](apt.md). |
60 | 76 |
|
61 | 77 | For detailed installation steps and further instructions on Red Hat Enterprise Linux and derivatives, see the [Install Percona Distribution for PostgreSQL on Red Hat Enterprise Linux and derivatives](yum.md). |
62 | 78 |
|
63 | | -## Install Percona Distribution for PostgreSQL |
| 79 | +## What's next |
64 | 80 |
|
65 | | -You can select from multiple easy-to-follow installation options, however **we strongly recommend using a Package Manager** for a convenient and quick way to try the software first. |
| 81 | +Now that your PostgreSQL server is running, you can explore additional capabilities of Percona Distribution for PostgreSQL. |
66 | 82 |
|
67 | | -=== ":octicons-terminal-16: Package manager" |
| 83 | +<div data-grid markdown><div data-banner markdown> |
68 | 84 |
|
69 | | - Percona provides installation packages in `DEB` and `RPM` format for 64-bit Linux distributions. Find the full list of supported platforms and versions on the [Percona Software and Platform Lifecycle page :octicons-link-external-16:](https://www.percona.com/services/policies/percona-software-support-lifecycle#pgsql). |
| 85 | +### Learn PostgreSQL basics { .title } |
70 | 86 |
|
71 | | - If you are on Debian or Ubuntu, use `apt` for installation. |
| 87 | +Connect with `psql` and run SQL commands, manage users, roles, and configure authentication. |
72 | 88 |
|
73 | | - If you are on Red Hat Enterprise Linux or compatible derivatives, use `yum`. |
| 89 | +[Manipulate data in PostgreSQL :material-arrow-right:](crud.md){ .md-button } |
74 | 90 |
|
75 | | - [Install via apt :material-arrow-right:](apt.md){.md-button} |
76 | | - [Install via yum :material-arrow-right:](yum.md){.md-button} |
| 91 | +</div><div data-banner markdown> |
77 | 92 |
|
78 | | -=== ":simple-docker: Docker" |
| 93 | +### Enable extensions { .title } |
79 | 94 |
|
80 | | - Get our image from Docker Hub and spin up a cluster on a Docker container for quick evaluation. |
| 95 | +Percona Distribution for PostgreSQL includes tested open source extensions, such as `pg_stat_monitor` for query performance monitoring, `pg_tde` for protecting data at rest and more. |
81 | 96 |
|
82 | | - Check below to get access to a detailed step-by-step guide. |
83 | | - |
84 | | - [Run in Docker :material-arrow-right:](docker.md){.md-button} |
| 97 | +[See Extensions :material-arrow-right:](extensions.md){ .md-button } |
85 | 98 |
|
86 | | -=== ":simple-kubernetes: Kubernetes" |
| 99 | +</div><div data-banner markdown> |
87 | 100 |
|
88 | | - **Percona Operator for Kubernetes** is a controller introduced to simplify complex deployments that require meticulous and secure database expertise. |
| 101 | +### Configure backups { .title } |
89 | 102 |
|
90 | | - Check below to get access to a detailed step-by-step guide. |
| 103 | +For production deployments we recommend configuring backups. |
91 | 104 |
|
92 | | - [Get started with Percona Operator :octicons-link-external-16:](https://docs.percona.com/percona-operator-for-postgresql/2.0/quickstart.html){.md-button} |
| 105 | +[See Backup and disaster recovery in Percona :material-arrow-right:](solutions/backup-recovery.md){.md-button} |
| 106 | +</div><div data-banner markdown> |
93 | 107 |
|
94 | | -=== ":octicons-download-16: Tar download (not recommended)" |
| 108 | +### Configure high availability with Patroni { .title } |
95 | 109 |
|
96 | | - If installing the package (the **recommended** method for a safe, secure, and reliable setup) is not an option, refer to the link below for step-by-step instructions on installing from tarballs using the provided download links. |
| 110 | +Deploy a highly available PostgreSQL cluster using Patroni to prevent service interruptions. |
97 | 111 |
|
98 | | - In this scenario, you must ensure that all dependencies are met. Failure to do so may result in errors or crashes. |
99 | | - |
100 | | - !!! note |
| 112 | +[See High Availability in PostgreSQL :material-arrow-right:](solutions/high-availability.md){.md-button} |
101 | 113 |
|
102 | | - This method is **not recommended** for mission-critical environments. |
103 | | - [Install from tarballs :material-arrow-right:](tarball.md){.md-button} |
| 114 | +</div> |
| 115 | +</div> |
0 commit comments