Overview
PostgreSQL 16 is the latest major release of the popular open source relational database. It comes with many new features and improvements...
For further actions, you may consider blocking this person and/or reporting abuse
I think there is a typo. It is:
sudo apt install gnupg2 wget vim
Should be:
sudo apt install gnupg2 wget nano
I mean you do use nano, thankfully 😉
Updated, Thank you! HAHA Yeah , takes me minutes to exit vim , hehe
In my case, it was
sudo apt install gnupg2 wget gedit
GUI for the win.
I run this to create a
root
role (to match with myroot
user on ubuntu 20.04) so I don't have to switch topostgres
user to usepg_restore
.I enjoy installing PostgreSQL directly on bare metal servers, without any additional overhead from Docker containers, to get pure bare metal performance.
nice post:)
hi sorry for the n00b question, but how do i change the default data directory? as i am looking to install a 1TB db that will exceed my boot/os drive
Sorry for the late reply
Edit the postgresql.conf file: Find the data_directory parameter and set it to the new path you want to use. For example:
data_directory = '/new/data/path'
To add on, you can run commands like
df -h
Show mounted filesystems along with disk usagelsblk
List all block devices along with information like mountpoints, size, typeyah that didnt quite work for me. I did end up figuring it out though, from virgin install to new custom directory took 27 steps :/
Haha , that is one of the reason why i started blogging because i realise i'm going through the same process multiple times these years. Glad you got it figured out!
is sudo ufw allow 5432/tcp a security risk? or listen_addresses = '*'?
Nope, for listen_addresses it's to allow remote connection, .e.g your wanna use PGADMIN to connect to DB, you kinda need that, make sure you see a good password
With regards to the firewall, you can always use your VPS's firewall too e.g. DigitalOcean / AWS , almost all service provider will provide firewall for free.