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 title : Hello World
description : Hello world description : Hello world
date : 2022-11-04 date : 2022-11-04
author : Ian Andwati
tags : [hugo, blog, go] tags : [hugo, blog, go]
--- ---
@@ -1,7 +1,6 @@
--- ---
title : Django Secret Key Tutorial title : Django Secret Key Tutorial
description : Managing secrets description : Managing secrets
author : Ian Andwati
date : 2022-11-11 date : 2022-11-11
tags : [tutorial, django, python, .env] tags : [tutorial, django, python, .env]
--- ---
-1
View File
@@ -2,7 +2,6 @@
title : Integrating Netlify CMS title : Integrating Netlify CMS
description : Integrating netlify cms description : Integrating netlify cms
date : 2022-11-24 date : 2022-11-24
author : Ian Andwati
tags : [blog, hugo, netlify,netlify-cms,github] tags : [blog, hugo, netlify,netlify-cms,github]
--- ---
@@ -2,7 +2,6 @@
title: Semantic Versioning(SemVer) and Conventional Commits title: Semantic Versioning(SemVer) and Conventional Commits
description : Adopting best practices in your git and build workflows. description : Adopting best practices in your git and build workflows.
date: 2023-01-24 date: 2023-01-24
author : Ian Andwati
tags: [git, semver,workflow, conventional commits] tags: [git, semver,workflow, conventional commits]
--- ---
@@ -2,7 +2,6 @@
title : Install PostgreSQL 15 on Arch | Manjaro | Garuda Linux title : Install PostgreSQL 15 on Arch | Manjaro | Garuda Linux
description : Installing postgresql description : Installing postgresql
date : 2023-02-16 date : 2023-02-16
author : Ian Andwati
tags : [postgresql, archlinux, manjaro, garuda, linux] 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. 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 ## Step 1: Installing the PostgreSQL Package
```sh ```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. 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 - If you have sudo and are in sudoers
```sh ```sh
$ sudo -iu postgres sudo -iu postgres
``` ```
- Otherwise using su: - Otherwise using su:
```sh ```sh
$ su su
# su -l postgres # 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: ### 2.1 We can confirm the installed PostgreSQL version by running:
```sh ```sh
$ postgres --version ─╯ postgres --version ─╯
postgres (PostgreSQL) 15.1 postgres (PostgreSQL) 15.1
``` ```
### 2.2 Set applicable entries in **/etc/locale.gen** ### 2.2 Set applicable entries in **/etc/locale.gen**
```sh ```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 ### 2.3 Then run **\*\*locale-gen\*\*** to generate locale settings
```sh ```sh
$ sudo locale-gen sudo locale-gen
Generating locales... Generating locales...
en_US.UTF-8... done en_US.UTF-8... done
Generation complete. Generation complete.
@@ -116,7 +115,7 @@ sudo su - postgres
### 3.1 Check PostgreSQL status with the following command: ### 3.1 Check PostgreSQL status with the following command:
```sh ```sh
$ systemctl status postgresql ─╯ systemctl status postgresql ─╯
postgresql.service - PostgreSQL database server postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; preset: disabled) Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; preset: disabled)
Active: inactive (dead) 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: ### 3.3 Enable the PostgreSQL service to start automatically at boot by running the following command:
```sh ```sh
$ sudo systemctl enable postgresql sudo systemctl enable postgresql
``` ```
### 3.4 Verify that PostgreSQL is running by running the following command: ### 3.4 Verify that PostgreSQL is running by running the following command:
```sh ```sh
$ sudo systemctl status postgresql ─╯ sudo systemctl status postgresql ─╯
● postgresql.service - PostgreSQL database server ● postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; preset: disabled) 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 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 " └─26112 "postgres: logical replication launcher "
``` ```
# Change postgres User Password
```sh
sudo -u postgres psql -c "ALTER USER postgres PASSWORD '$PGPASSWORD';"
```
# Resources # Resources
- [Arch Linux Wiki](https://wiki.archlinux.org/title/PostgreSQL) - [Arch Linux Wiki](https://wiki.archlinux.org/title/PostgreSQL)
@@ -2,7 +2,6 @@
title: Subresource Integrity title: Subresource Integrity
description : Understanding Subresource Integrity description : Understanding Subresource Integrity
date: 2023-04-29 date: 2023-04-29
author : Ian Andwati
tags: [subresource integrity, csp, cors] tags: [subresource integrity, csp, cors]
--- ---
@@ -1,7 +1,6 @@
--- ---
title : A Fresh Coat Of Paint title : A Fresh Coat Of Paint
description : Migrating to Zola description : Migrating to Zola
author : Ian Andwati
date : 2023-08-24 date : 2023-08-24
tags : [zola, blog, tera, rust] tags : [zola, blog, tera, rust]
--- ---
-1
View File
@@ -1,7 +1,6 @@
--- ---
title : What say you? title : What say you?
description : Adding a comment system by utterances description : Adding a comment system by utterances
author : Ian Andwati
date : 2023-08-24 date : 2023-08-24
tags : [blog, utterances] tags : [blog, utterances]
--- ---
-1
View File
@@ -1,7 +1,6 @@
--- ---
title : Setting up Obsidian sync in Windows title : Setting up Obsidian sync in Windows
description : Syncing Obsidian in Windows with Windows Task Scheduler with git description : Syncing Obsidian in Windows with Windows Task Scheduler with git
author : Ian Andwati
date : 2023-10-01 date : 2023-10-01
tags : [obsidian, git,sync, windows, cron, task scheduler, powershell] tags : [obsidian, git,sync, windows, cron, task scheduler, powershell]
--- ---
@@ -1,6 +1,5 @@
--- ---
title : Export default and module.exports in Javascript title : Export default and module.exports in Javascript
author : Ian Andwati
date : 2024-01-17 date : 2024-01-17
tags : [javascript, node] tags : [javascript, node]
--- ---