This commit is contained in:
2024-11-20 16:42:57 +03:00
parent 43c02b90ea
commit 38e2bd26aa
10 changed files with 15 additions and 20 deletions
-1
View File
@@ -2,7 +2,6 @@
title : Hello World
description : Hello world
date : 2022-11-04
author : Ian Andwati
tags : [hugo, blog, go]
---
@@ -1,7 +1,6 @@
---
title : Django Secret Key Tutorial
description : Managing secrets
author : Ian Andwati
date : 2022-11-11
tags : [tutorial, django, python, .env]
---
-1
View File
@@ -2,7 +2,6 @@
title : Integrating Netlify CMS
description : Integrating netlify cms
date : 2022-11-24
author : Ian Andwati
tags : [blog, hugo, netlify,netlify-cms,github]
---
@@ -2,7 +2,6 @@
title: Semantic Versioning(SemVer) and Conventional Commits
description : Adopting best practices in your git and build workflows.
date: 2023-01-24
author : Ian Andwati
tags: [git, semver,workflow, conventional commits]
---
@@ -2,7 +2,6 @@
title : Install PostgreSQL 15 on Arch | Manjaro | Garuda Linux
description : Installing postgresql
date : 2023-02-16
author : Ian Andwati
tags : [postgresql, archlinux, manjaro, garuda, linux]
---
@@ -46,12 +45,12 @@ Postgres offers a lot of advantages that make it an excellent choice for highly
Now with all that fluff out of the way, let's get to business. The steps have been tested on Arch Linux with the KDE desktop.
> **Note:** Commands that should be run as the *postgres* user are prefixed by `[postgres]$` in this article.
> **Note:** Commands that should be run as the *postgres* user are prefixed by `[postgres]` in this article.
## Step 1: Installing the PostgreSQL Package
```sh
$ sudo pacman -Syu postgresql
sudo pacman -Syu postgresql
```
This command will update the package database and update all packages on the system then install the PostgreSQL package from your distribution mirrors. Never install a package without updating the system first. On a rolling release, this can lead to an unbootable system. Installing the package will also create a system user called *postgres*. You can now switch to the *postgres* user using a privilege elevation program.
@@ -61,13 +60,13 @@ You can switch to the PostgreSQL user by executing the following command:
- If you have sudo and are in sudoers
```sh
$ sudo -iu postgres
sudo -iu postgres
```
- Otherwise using su:
```sh
$ su
su
# su -l postgres
```
@@ -78,20 +77,20 @@ Before PostgreSQL can function correctly, the database cluster must be initializ
### 2.1 We can confirm the installed PostgreSQL version by running:
```sh
$ postgres --version ─╯
postgres --version ─╯
postgres (PostgreSQL) 15.1
```
### 2.2 Set applicable entries in **/etc/locale.gen**
```sh
$ echo "en_US.UTF-8 UTF-8" | sudo tee /etc/locale.gen
echo "en_US.UTF-8 UTF-8" | sudo tee /etc/locale.gen
```
### 2.3 Then run **\*\*locale-gen\*\*** to generate locale settings
```sh
$ sudo locale-gen
sudo locale-gen
Generating locales...
en_US.UTF-8... done
Generation complete.
@@ -116,7 +115,7 @@ sudo su - postgres
### 3.1 Check PostgreSQL status with the following command:
```sh
$ systemctl status postgresql ─╯
systemctl status postgresql ─╯
postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; preset: disabled)
Active: inactive (dead)
@@ -131,13 +130,13 @@ sudo systemctl start postgresql
### 3.3 Enable the PostgreSQL service to start automatically at boot by running the following command:
```sh
$ sudo systemctl enable postgresql
sudo systemctl enable postgresql
```
### 3.4 Verify that PostgreSQL is running by running the following command:
```sh
$ sudo systemctl status postgresql ─╯
sudo systemctl status postgresql ─╯
● postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; preset: disabled)
Active: active (running) since Thu 2023-02-16 22:52:43 EAT; 20s ago
@@ -154,6 +153,11 @@ $ sudo systemctl status postgresql
└─26112 "postgres: logical replication launcher "
```
# Change postgres User Password
```sh
sudo -u postgres psql -c "ALTER USER postgres PASSWORD '$PGPASSWORD';"
```
# Resources
- [Arch Linux Wiki](https://wiki.archlinux.org/title/PostgreSQL)
@@ -2,7 +2,6 @@
title: Subresource Integrity
description : Understanding Subresource Integrity
date: 2023-04-29
author : Ian Andwati
tags: [subresource integrity, csp, cors]
---
@@ -1,7 +1,6 @@
---
title : A Fresh Coat Of Paint
description : Migrating to Zola
author : Ian Andwati
date : 2023-08-24
tags : [zola, blog, tera, rust]
---
-1
View File
@@ -1,7 +1,6 @@
---
title : What say you?
description : Adding a comment system by utterances
author : Ian Andwati
date : 2023-08-24
tags : [blog, utterances]
---
-1
View File
@@ -1,7 +1,6 @@
---
title : Setting up Obsidian sync in Windows
description : Syncing Obsidian in Windows with Windows Task Scheduler with git
author : Ian Andwati
date : 2023-10-01
tags : [obsidian, git,sync, windows, cron, task scheduler, powershell]
---
@@ -1,6 +1,5 @@
---
title : Export default and module.exports in Javascript
author : Ian Andwati
date : 2024-01-17
tags : [javascript, node]
---