Installing Bitnami PostgreSQL 15 on Debian 11 using VirtualBox (Host: Disabled Remote Login)
In this article, we will walk you through the process of installing Bitnami PostgreSQL 15 on a Debian 11 system using VirtualBox as the host machine. We will also cover how to disable remote login for added security.
Prerequisites
Before we begin, make sure you have the following:
- A Debian 11 system
- Oracle VirtualBox installed on your host machine
- A Bitnami PostgreSQL 15 stack downloaded from the Bitnami website
Installing VirtualBox
If you haven't already, download and install VirtualBox on your host machine. Once installed, launch VirtualBox and click on the "New" button to create a new virtual machine.
Creating a New Virtual Machine
In the "Create Virtual Machine" window, enter the following information:
- Name: Debian 11
- Type: Linux
- Version: Debian (64-bit)
- Memory size: 2048 MB
- Hard drive: Create a virtual hard drive now
- Hard drive file type: VDI (VirtualBox Disk Image)
- Storage on physical hard drive: Dynamically allocated
- File location and size: Leave as default
Click "Create" to create the virtual machine.
Configuring the Virtual Machine
Select the newly created virtual machine and click on the "Settings" button. In the "Settings" window, make the following changes:
- System: Enable EFI (Enable this option if you plan to use the UEFI boot method)
- Storage: Add the Bitnami PostgreSQL 15 stack ISO file as the optical drive
Click "OK" to save the changes.
Installing Debian 11
With the virtual machine configured, click the "Start" button to begin the installation process. Select the "Install" option and follow the on-screen instructions to install Debian 11 on the virtual machine.
Installing Bitnami PostgreSQL 15
Once Debian 11 is installed, remove the ISO file from the optical drive and restart the virtual machine. After the virtual machine has restarted, log in and run the following command to start the Bitnami PostgreSQL 15 installation:
sudo /opt/bitnami/postgresql/scripts/install-postgresql.shFollow the on-screen instructions to complete the installation. Once the installation is complete, run the following command to start the PostgreSQL service:
sudo /opt/bitnami/postgresql/scripts/ctl.sh startDisabling Remote Login
For added security, we recommend disabling remote login. To do this, open the PostgreSQL configuration file:
sudo nano /opt/bitnami/postgresql/postgresql.confFind the following line:
#listen_addresses = 'localhost'And change it to:
listen_addresses = ''Save the changes and restart the PostgreSQL service:
sudo /opt/bitnami/postgresql/scripts/ctl.sh restart- Installed Debian 11 on a virtual machine using VirtualBox
- Installed Bitnami PostgreSQL 15 on the virtual machine
- Disabled remote login for added security