Install VitalPBX 4 Using Debian
Given to the End-of-Life of CentOS 7, and CentOS practically disappearing, the VitalPBX Team decided to migrate to Debian 11 (Bullseye). This allows us to have VitalPBX 4 be multi-architecture capable and be able to install on ARM or X86 platforms.
To install VitalPBX 4 from an ISO we offer a couple of alternatives:
- Download the net-install ISO from the Debian website: https://www.debian.org/distrib/netinst
- Download a custom Debian ISO from the VitalPBX website, that includes pre-configured features that will ease our installation.
In this article, we will explain how to install from the ISO that the VitalPBX team has prepared for our users.
First, we will proceed to download the ISO from the VitalPBX website, you can click on the following link, http://repo.vitalpbx.org/vitalpbx/isos/vpbx4-0-1-amd64-netinst.iso.
Now, if you are installing on dedicated hardware, you must flash a USB flash drive or load the ISO into a virtualizer if you are using a Virtual Machine.
In the case you are installing on dedicated hardware, we recommend the Balena Etcher application to flash your USB flash drive, https://www.balena.io/etcher/.
When you first boot into the ISO image, you will be greeted by a menu that allows you to choose the installation type. We recommend the non-graphic install since it is faster, and does not require a mouse.
Now, we select our installation language.
Afterward, we will select our country. This option is important since we are going to be asked for our Time Zone later, based on this location.
Next, we select our keyboard type.
Then, we enter the root password twice. We must choose a complex password to stop intruders.
Now, it will ask us to create a new user. We will need to enter the user’s full name, username, and password twice. This user can be used as an alternate SSH user. This is an obligatory step.
Now, we must select our Time Zone.
Next, we are asked for the storage partitions, for which, we will leave everything in default.
We use the entire disk.
Select the storage unit you wish to use. In our case, since it is a virtual disk, it will appear as follows. This value may vary depending on each installation.
Now, we select, “All files in one partition…”
We will then confirm our selections and choose, “Finish partitioning and write changes to disk.”
Lastly, we confirm once again, write the changes, and the installation will proceed.
Before the installation can finish, we are asked for our preferred archive mirror country and server. This is where our Debian installation will retrieve the installation packages.
And finally, we are asked to enter our Proxy Server, in case we need one to connect to the internet. In most cases, this can be left blank.
Remote access with the root user.
As a security measure, the root user is not allowed to remote access the server. If you wish to unblock it, remember to set a complex password, and perform the following steps.
- Enter the Command Line Console with the root user directly on your server with the password you set up earlier.
- Edit the following file using nano, /etc/ssh/sshd_config.
root@vitalpbx:~# nano /etc/ssh/sshd_config
Change the following line
Save and Exit
- Lastly, restart the sshd service.
root@vitalpbx:~# systemctl restart sshd
Additionally, you can keep the root user from having SSH access permission and use the additional user you create to access your server remotely. You will simply need to use the command “sudo su” and enter the user’s password to get root privileges. In this case, make sure that the additional user is part of the “sudoers group.” To do so, you can simply run the following command as root from the Command Line Console directly on your server:
root@vitalpbx:~# usermod -aG sudo username
Changing your IP Address to a static address
By default, our system’s IP address in Debian is obtained through DHCP, however, you can modify it and assign it a static IP address using the following steps:
- Edit the following file with nano, /etc/network/interfaces.
root@vitalpbx:~# nano /etc/network/interfaces
#The primary network interface allow-hotplug eth0 iface eth0 inet dchp
With the following.
#The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.1.200 netmask 255.255.255.0 gateway 192.168.1.1
Save and Exit
- Enable the interface.
root@vitalpbx:~# ifup eth0
- Restart the network service.
root@vitalpbx:~# systemctl restart networking service
Keep in mind that your network interface name may vary from eth0 to another name.
Once the Debian installation is finished, we will proceed to enter the Command Line Console using the root user and the password we created earlier.
Run the following command and wait a couple of minutes as VitalPBX Finishes its installation:
You will see the CLI as follows.
login as: root firstname.lastname@example.org's password: Linux vitalpbx 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sat Jun 4 08:06:08 2022 from 192.168.11.250 root@vitalpbx:~# install_vpbx4
Now, we access the CLI once again, and we will be shown the IP address with which we can access it through a browser.
When entering for the first time through our browser, we will be asked for the admin password, so we create one.
With this new way to install from an ISO, we can guarantee that you will always install the latest version and most stable version of VitalPBX. Since the installation packages from VitalPBX are obtained directly from our servers.