Cannot connect to PostgreSQL (listening on port 5432) in Bitnami Django (VM VirtualBox)

Edit the postgresql.conf (in the folder /opt/bitnami/postgresql/conf), by adding this line
#-------------------------------------------
# CONNECTONS AND AUTHENTICATION
#-------------------------------------------
listen_addresses = '*'

postgresql.conf
Restart the service,
bitnami@debian:~$ sudo /opt/bitnami/ctlscript.sh restart postgresql
Check the remote connection again,
bitnami@debian:~$ pg_isready
postgresql_service

Ref:
Edit the postgresql.conf

git error: remote origin already exists

Sometime when we initialize the Local Repo, we get error: remote origin already exists.
The following step is solution.
Initialize the current folder as a Git repo:
bitnami@debian:~$ git init
bitnami@debian:~$ git remote add origin [email protected]:username/repostioryname.git
Then, error occurs:
error: remote origin already exists.
We need to remove the older origin by:
bitnami@debian:~$ git remote rm origin
Then, add the origin again:
bitnami@debian:~$ git remote add origin [email protected]:username/repostioryname.git
Add files:
bitnami@debian:~$ git add .
Commit with the descriptive message:
bitnami@debian:~$ git commit -m "Comment message"
Push the changes:
bitnami@debian:~$ git push -u origin master

Ref:
gitのエラー remote origin already existsの解決方法

Bitnami Django: Start or Stop Services (Apache, MariaDB, PostgreSQL)

Check the status of a service:
bitnami@debian:~$ sudo /opt/bitnami/ctlscript.sh status
Start, Stop, Restart all services:
bitnami@debian:~$ sudo /opt/bitnami/ctlscript.sh start
bitnami@debian:~$ sudo /opt/bitnami/ctlscript.sh stop
bitnami@debian:~$ sudo /opt/bitnami/ctlscript.sh restart
Restart a single service, such as Apache only, by passing the service name as argument:
bitnami@debian:~$ sudo /opt/bitnami/ctlscript.sh restart apache

Ref:
Start or Stop Services

How to add SSH Key to GitHub Account (application Bitnami Django)

Creat an SSH Key,
bitnami@debian:~$ ssh-keygen -t rsa -b 4096 -C "[email protected]"Substutute [email protected] with your email address.

・Press Enter to accept the default file location (/home/bitnami/.ssh/id_rsa).

・Enter the secure passphrase (password –> same as the GitHub account).

・Enter the command to display the contents of the generated public key,
bitnami@debian:~$ cat /home/bitnami/.ssh/id_rsa.pub
Add this public key to your GitHub Account.
Log into your GitHub Account.

・Click your avartar and choose settings.
BD_GitHub_SSH Key1

・Select SSH and GPG Keys
BD_GitHub_Add SSH Key_2

・Click New SSH Key button to create new SSH Key
BD_GitHub_SSH Key_3

・Enter the title in the Title filed and your public key from the above process in the Key field
BD_GitHub_SSH Key_4

Ref:
How to Add SSH Keys to Your GitHub Account

Now, you can process the commit your work.
bitnami@debian:~$ git status
bitnami@debian:~$ git add -A
bitnami@debian:~$ git commit -m "Any comment..."
bitnami@debian:~$ git push -u origin master

How to change Timezone in VirtualBox (Guest OS is Linux)

Ref: https://www.vpnttg.com/installation/virtualbox

List the Timezone
$ timedatectl list-timezones
Set the Timezone (e.g., Asia/Bangkok)
$ sudo timedatectl set-timezone Asia/Bangkok
Verify new setting by the following two commands,

  • date command: show date and current time
    $ date
  • ls -l /etc/localtime command: show Timezone info
    $ ls -l /ect/localtime

VMware vs. Virtual Box

VMware vs. Virtual Box: Comprehensive Comparison

Some conclusion:

  • If you need a free virtualization solution for a desktop, you can select VirtualBox.
  • If you need to have a free virtualization solution for running VMs on a server, select VirtualBox or VMware ESXi Free Edition.
  • If you need an ultimate solution for desktop with extended 3D graphics support and a wide list of settings, select VMware Workstation (or VMware Fusion for Mac computers).
  • If you need a free virtualization solution that only needs to run VMware VMs on desktop with basic options, you can select VMware Player.
  • If you need maximum integration between a VMware desktop solution and a VMware vSphere (vCenter server, ESXi hosts), select VMware Workstation or VMware Fusion Pro. You can use VMware Workstation or Fusion Pro for connecting to vCenter Server or ESXi host remotely, and can manage virtual machines residing on these resources. VMware provides a free VMware vCenter Converter for converting VMs of the Workstation format to VMs of the ESXi format (and vice versa).
  • If you have an old computer with a processor that does not support hardware virtualization technologies, select VirtualBox, which provides software virtualization.
  • If you need the ultimate enterprise-grade solution for deploying multiple servers, running a high number of VMs, using clustering features, etc., select VMware vSphere based on ESXi servers with vCenter.

More about virtualization solutions, compare VirtualBox with Hyper-V.