how to install postgresql on Linux
So KDE is your desktop. It could be used on almost any operating system, and probably doesn't determine your install. It's more about distros/OS that you're on. So, what OS are you on? Wild guess Fedora or Ubuntu. Here are the install guides for each:
Fedora: https://fedoraproject.org/wiki/PostgreSQL
Ubuntu: https://www.postgresql.org/download/linux/ubuntu/
Neither is as bad as it seems. Just take them step by step.
BTW, in the Linux world the command line is king. At first, this will seem daunting, but after a while, you'll find it faster for many things. Maybe Learn Enough Command Line to Be Dangerous would help.
Install Postgres on removable volume on linux?
This works just fine. It is not really any different to starting and stopping PostgreSQL and not removing the disk. There are a couple of things to consider though.
You have to make sure it is stopped + writing synced before unmounting the volume. Obvious enough, and I can't believe you'd be able to unmount before sync completed, but worth repeating.
You will want the same version of PostgreSQL, probably on the same version of operating system with the same locales too. Different distributions might compile it with different options.
Although you can put configuration and data in the same directory hierarchy, most distros tend to put config in /etc. If you compile from source yourself this won't be a problem. Alternatively, you can usually override the default locations or, and this is probably simpler, bind-mount the data and config directories into the places your distro expects.
Note that if your storage allows you to connect the same volume to multiple hosts in some sort of "read only" mode that won't work.
Edit: steps from comment moved into body for easier reading.
- start up PG, create a table put one row in it.
- Stop PG.
- Mount your volume at /mnt/db
- rsync /var/lib/postgresql/NN/main to /mnt/db/pg_data and /etc/postgresql/NN/main to /mnt/db/pg_etc
- rename /var/lib/postgresql/NN/main and add .OLD to the name and do the same with the /etc
- bind-mount the dirs from /mnt to replace them
- restart PG
- Test
- Repeat
- Return to step 8 until you are happy
Related Topics
Reliably Kill Sleep Process After Usr1 Signal
Prevent Fork() from Copying Sockets
Pyinstaller on 32-Bit Linux - Importerror: The 'six' Package Is Required
X86 Assembly, Little Endianness Not Being Followed(Or Is It) (Linux)
How to Programatically Change an Executable Name (Ucmd) of a Unix Process
Intel Fortran Composer 2011 and Linux Mint 12
Does Grub Switch to Protected Mode
Why Is Git Creating Read-Only (444) Files
Is Anyone Using Netlink for Ipc
Bash Script: Can Not Properly Handle Sigtstp
How to Run Jprofiler from Windows Machine to Remote Linux Jvm
Xargs and Find, Rm Complaining About \N (Newline) in Filename
Output Data Register Value in Nasm
Why Are There Global Offset Tables and Procedure Linkage Tables in Statically Linked Executables