> For the complete documentation index, see [llms.txt](https://herrwinfried.gitbook.io/tr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://herrwinfried.gitbook.io/tr/os/opensuse/tumbleweed/yazilim-and-veritabani/postresql-kurulumu.md).

# PostreSQL Kurulumu

{% hint style="warning" %}
Bu rehber sırasında terminal kullanılacaktır.
{% endhint %}

{% hint style="info" %}
Güvenlik duvarı bu rehberimizde varsayınal olarak kapalı sayılacaktır.
{% endhint %}

## PostreSQL Yükleme

### PostreSQL Deposunu Ekleme

Lütfen terminale aşağıdaki komutları sırasıyla yazınız.

```bash
sudo zypper --non-interactive --quiet addrepo --refresh -p 90  http://download.opensuse.org/repositories/server:database:postgresql/openSUSE_Tumbleweed/ PostgreSQL
```

Depomuzdaki paketlerin güncelliğinden emin olmak için aşağıdaki komutu yazalım.

```bash
sudo zypper --gpg-auto-import-keys ref
```

### PostreSQL Yükleme

Aşağıdaki komutu yazalım.

```bash
sudo zypper --gpg-auto-import-keys in -y postgresql postgresql-server postgresql-contrib
```

### Ayarlamalar

{% hint style="success" %}
Bu kısımda anlatılcak olanlar localhost(127.0.0.1) içindir.
{% endhint %}

{% hint style="warning" %}
Genellikle varsayınal Konum `/var/lib/pgsql/data` olmaktadır.&#x20;

Bulamıyor musun?

```bash
sudo find / -name postgresql.conf
```

{% endhint %}

{% hint style="info" %}
nano yerine başka editorlerde tercih edebilirsiniz gedit kwrite kate vb..
{% endhint %}

Aşağıdaki komutları sırasıyla yazınız.

```bash
sudo su
```

```bash
cd /var/lib/pgsql/data
```

```bash
nano postgresql.conf
```

Aşağıdaki resimdeki gibi işaretlenen değerlerin başındaki `#` işaretini kaldırınız listen\_Addresses = '\*' değil ise düzeltin ve görseldeki gibi yapınız.

<figure><img src="/files/E7eG5hLm9hI16wzXhm2i" alt=""><figcaption></figcaption></figure>

ardından CTRL + X basıp Y yazıp enter tuşuna basınız.&#x20;

```bash
nano pg_hba.conf
```

{% hint style="danger" %}
Eklenecek IP değerleri Local için bile tehlikeli olabilir. Lütfen Sadece Local üzerinden çalışcaksa aşağıdaki IP'leri yazınız server için kullancaksanız lütfen daha farklı şekilde konfigurasyon yapınız.
{% endhint %}

Aşağıdaki resimde gösterilen yerin altına şu değerleri ekleyiniz

```bash
host    all             all             127.0.0.1/32            md5
host    all             all             ::1/128                 md5
```

<figure><img src="/files/vKPzJIXUnPKLALmN0ZI6" alt=""><figcaption></figcaption></figure>

ardından CTRL + X basıp Y yazıp enter tuşuna basınız.&#x20;

### Bilgilendirme

#### PostreSQL Başlatma

```bash
sudo systemctl start postgresql
```

#### Eğer sistemi her açtığınızda başlamasını isterseniz

<pre class="language-bash"><code class="lang-bash"><strong>sudo systemctl enable postgresql
</strong></code></pre>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://herrwinfried.gitbook.io/tr/os/opensuse/tumbleweed/yazilim-and-veritabani/postresql-kurulumu.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
