# PostgreSQL Kurulumu

SSH bağlantısı ile sunucuya bağlantı sağladıktan sonra `sudo su` komutu ile tam yetki erişimini elde ediniz.

Linux sistemindeki paketler güncellenir.

```bash
sudo apt update
```

```bash
sudo apt upgrade
```

Yardımcı araçlar yüklenir.

```bash
sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https lsb-release curl -y
```

Kurulum paketi kontrol edilir.

```bash
curl -fSsL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /usr/share/keyrings/postgresql.gpg > /dev/null
```

```bash
echo deb [arch=amd64,arm64,ppc64el signed-by=/usr/share/keyrings/postgresql.gpg] http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main | sudo tee /etc/apt/sources.list.d/postgresql.list
```

Kararlı sürüm listesi indirilir.&#x20;

```bash
echo deb [arch=amd64,arm64,ppc64el signed-by=/usr/share/keyrings/postgresql.gpg] http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg-testing main | sudo tee /etc/apt/sources.list.d/postgresql.list
```

PostgreSQL 15 sürümü seçilir ve yüklenir. Kullanıcı oluşturma, yedek yükleme işlemleri için istemci kurulumu da yapılır.&#x20;

```bash
sudo apt install postgresql-client-15 postgresql-15
```

PostgreSQL servisinin durumuna bakılır.

```bash
systemctl status postgresql
```

Eğer pasif ise aktif hale getirilir.

Kurulum tamamlandıktan sonra  [PostgreSQL Konfigürasyonu](/kurulum-linux-server/postgresql-konfigurasyonu.md) sayfasında PostgreSQL için gerekli olan ayarlı yapabilirsiniz.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.oska.com.tr/kurulum-linux-server/postgresql-kurulumu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
