Archive:FreePBX Distribution: Difference between revisions

From ThinkServer
m Sam moved page AsteriskNOW! to FreePBX Distribution: Distribution name change
Saved progress, major rework for FreePBX
Line 1: Line 1:
AsteriskNOW! is a fully fledged VoIP server allowing complete customisation to your needs and works with most setups. It is an appliance, with a complete Linux setup and web manager to allow easy administration.
FreeBPX Distribution is a fully fledged VoIP server allowing complete customisation to your needs and works with most setups. It is an appliance, with a complete Linux setup and web manager to allow easy administration.


On the server, we have implemented AsteriskNOW! 6.12.65-26 distribution and Asterisk 13.x series. This is the latest version of Asterisk and is a LTS release so will be supported well into the future with fixes (slated to be supported until 2018). This is a complete distribution and so needs to be installed on a machine. We will be using Linux tools to install the distribution as a virtual machine.
We have implemented FreePBX 15 (SNG7-PBX-64bit-2011-5) and Asterisk 17. This is the latest version of Asterisk and is a LTS release so will be supported well into the future with fixes (slated to be supported until 2024). This is a complete distribution and so needs to be installed on a machine. We will be setting this up on a separate computer rather than the main server.


== Preparing the host machine ==
== Prerequisites ==


=== Enable Intel VT-d extensions ===
* Download the latest FreePBX ISO image. This is currently FreePBX 15 available [https://downloads.freepbxdistro.org/ISO/SNG7-FPBX-64bit-2011-5.iso here directly] or at [https://www.freepbx.org/downloads/ this website].
With this method we need Intel VT-d extensions enabled so we can add the physical network card to the virtual machine
* This will need burning to a CD or writing to a USB stick. We use a USB stick and Rufus under windows to write it to a USB stick (use DD mode). This guide will cover the USB method but the CD method is very similar.


# Enable Intel VT-d in the system BIOS. It may be called Intel Virtaulization Extensions or something similar. We must enabled both Intel VT-x and Intel VT-d. Intel VT-d is a later version of Intel VT-x and allows physical hardware to be taken over and used by a virtual machine and there other memory and performance enhancements also. Intel VT-d may only be available if you have a recent machine.
== Booting the installation system ==
# The extensions need to be enabled in the system kernel on the host machine as by default they are not enabled. Boot the machine, login and open YaST. Type your root password if needed.
# Insert the USB stick into the computer.
# Under 'System', open 'Boot Loader'
# Power on the machine.
# Change to the 'Kernel Parameters' tab
# Press the key to bring up the boot device menu.
# After the last option on 'Optional Kernel Command Line Parameter', add <code>intel_iommu=on</code>.
# Select the USB stick that is inserted.
# Click 'Accept'
# When the boot menu appears, select 'FreePBX 15 Advanced Installation'.
# Reboot the machine
# Next, select 'Advanced Installation with Normal Video'.
# Next, select 'Advanced Install with Asterisk 17 via Standard Video'. The system will now boot to the Linux installer.


=== Install Virtual Machine components ===
== Configuring the FreePBX installation ==
# Login and open YaST. Type your root password if needed.
# Under 'Virtualization', click 'Install Hypervisor and Tools'
# Under 'KVM Hypervisor', tick both 'KVM server' and 'KVM tools'
# Click 'Accept'. The components will install.
# When finished, reboot the machine as kernel components will have been changed.


== Preparing the Virtual Machine ==
We will be using a dedicated computer with an empty hard drive. This guide will show you all the main options that need to be changed - there are other options if you wish to customise the installation but this is the bare minimum that I will be using to install the system.


=== KVM Connection ===
=== Setting the date, time and time zone ===
# On the Kickstart Menu, type 'virt'. When displayed, open 'Virtual Machine Manager'
# Type in the root password if needed.
# First we need to create the connection. Click the 'File' menu then click '+ Add Connection'
# Make sure 'QEMU/KVM' is selected. No other options are needed. Then click 'Connect'
# You should now see 'QEMU/KVM' in the list with nothing underneath.


=== Adding the virtual machine ===
# Click 'DATE & TIME' to select the correct time zone and set the date & time.
# To make a virtual machine, click the 'File' menu then clock 'New virtual machine'.
# In the 'Region:' box, type or select 'Europe'.
# As we will be installing AsteriskNOW! from a DVD image we downloaded, under 'Choose how you would like to install the operating system', select 'Local install media (ISO image or CDROM)'. In the 'Architecture' dropdown, make sure 'x86_64' is selected. Then click '> Forward'.
# In the 'City:' box, change 'Amsterdam' by typing of selecting 'London'.
# Under 'Locate your install media', select 'Use ISO image' then click 'Browse'
# If you are already connected to a network, ensure that the 'Network Time' switch is 'On'. This is important as this server will be used to set the times on the phones and needs accurate time to function correctly.
# Click 'Browse Local'. Goto your Downloads directory and select the AsteriskNOW! image, the click 'Open'.
# Click 'Done'
# Make sure the image is still selected in the list and click 'Choose Volume'.
# As this is a customised version of Linux, we cannot use the automatic detection to find the operating system. Unselect 'Automatically detect operating system based on install media' (will have 'OS type: unknown' and 'Version: unknown' underneath).
# In OS type, select 'Linux'. In Version, select 'CentOS 6.5'. Then click 'Forward'.
# Under 'Choose Memory and CPU settings', in 'Memory (RAM)', add '2048 MiB'. Under 'CPUs', make sure it says '1'. Then click 'Forward'.
# Make sure 'Enable storage for this virtual machine' is selected. Under 'Create a disk image for the virtual machine' add '20.0 GiB'. Then click 'Forward'.
# Under 'Name', type 'AsteriskNOW' (don't add the exclamation point - this causes problems later!)
# Under the 'Network Selection' dropdown, select any 'Host Device xxxxx: macvtap'. This doesn't matter which one is selected, but one must be selected to get the machine started. Press 'Finish'.
# If all is well, you should see a quick progress bar and then the machine will start, booting from the DVD image.
# At this point, select the Power dropdown menu from the top and select 'Force off'. You will see a warning, press 'Yes' to stop the machine. You will now see 'Guest not running'.


=== Configuring the machine ===
=== Setting the keyboard layout ===


# Press the 'i' button at the top to switch from display to settings
# Click 'KEYBOARD'
# Under 'CPUs', check under 'Configuration' that the Model is 'Haswell-noTSX'.
# Click the '+' button to add a new keyboard layout. We must add the new keyboard layout before removing the one we don't want.
# Click 'NIC :xx:xx:xx'. Click 'Remove' at the bottom to remove the network emulation and click 'Yes' to agree. We will be adding the separate physical network card next.
# Type 'UK' in the search box.
# Click '+ Add Hardware'. Click 'PCI Host Device'. You will need to find in the list the network card you want the guest to use and then click 'Finish'. It will be added down the side as 'PCI xxxx:xx:xx.x'.
# Click 'English (UK)'.
# We won't be needing a sound card. Click 'Sound: ich6' and then 'Remove'. Click 'Yes' to agree.
# Click 'Add'.
# Goto 'IDE CDROM 1' and click 'Connect' if it is there. If not skip to the next step. Locate the AsteriskNOW image and click 'Choose Volume'.
# Select 'English (US)' from the list.
# Goto 'Boot Options'. Make sure that the CD-ROM drive is at the top of the list.
# Click the '-' button to remove this layout.
# Once done, the machine is configured and ready to go. Click 'Apply' if it isn't greyed out. Press the screen icon next to the 'i' button at the top and then click the play button to start the machine up.
# You may test the layout in the box on the right. I usually check that the '£' and '#' symbols come up when I press these keys.
# Click 'Done'.


== Installing AsteriskNOW! on the virtual machine ==
=== Setting language support ===
 
# Click 'LANGUAGE SUPPORT'
# Tick 'English (United Kingdom).
#* Unfortunately, we cannot unselect 'English (United States)'.
# Click 'Done'
 
=== Setting the hard drive partitioning ===
 
As this is a new install, we will be configuring FreePBX to use the whole drive. We would like to use the BtrFS file system so this is slightly different to usual.
 
# Click 'INSTALLATION DESTINATION'.
# Check that the hard drive we want to use has a tick on it.
# Under 'Partitioning', select 'I will configure partitioning'.
# Click 'Done'.
# Under 'New mount point will use the following partitioning scheme', change 'LVM' to 'Btrfs'.
# If there are already any partitions on the disk, you will have to select each one and click '-' on each one until the disk is empty.
# We want to use the whole drive. At the top of the list, click 'Click here to create them automatically'. This will automatically create the correct partitions using the whole drive.
# Click 'Done'.
# A list of what will be done during the installation will appear which you can review. If you are happy, click 'Accept Changes'.
 
=== Disable kdump ===
 
I have no use for kdump so will be disabling it.
 
# Click 'KDUMP'.
# Untick the 'Enable kdump' box.
# Click 'Done'
 
=== Starting the installation ===
 
# If there is any problems preventing installation, there will be a yellow bar at the bottom of the screen saying where the problem is and the section that has the problem will have a yellow exclamation mark. These sections will need fixing before you can continue.
# I have added a picture of what the screen should look like for reference once everything is configured.
# If you are happy with all of the settings, click 'Begin Installation'.
 
=== Entering a root password ===
 
The installation will start. While the installation continues, we need to set the root password. This will not stop the installation while you are setting this up but must be done before the installation is finished.
 
# Click 'ROOT PASSWORD'.
# Type a password for the root user in the 'Root Password:' box.
# Retype the password in the 'Confirm:' box.
# Click 'Done'.


# On the host machine, download the latest 64-bit DVD image of AsteriskNOW! (http://www.asterisk.org/downloads/asterisknow}
# Attached the DVD images to a free optical drive on the virtual machine.
# Change the boot order so that the optical drive is at the top of the boot list.
# Start the virtual machine.
# When the boot menu appears, Under 'FreePBX 6.12.65 with Asterisk 13 - EXPERIMENTAL!' header, select 'Full Install -- No RAID'.
#* Disregard the experimental header. When this version was released, Asterisk 13 was new and considered experimental. Once updated, Asterisk 13 is pretty mature and not considered experimental anymore.
#* There is no need to choose RAID if using a virtual machine unless you are using a virtual machine or have an exotic setup to make the hard drives on 2 different physical hard drives.
# Once the system is booted, you will be presented with options to configure your network
#* Make sure 'Enable IPv4 support' and 'Dynamic IP configuration (DHCP)' are both selected.
#* Unselect 'Enable IPv6 support'
#* Hit 'OK'
# On the next option, select the correct time zone
#* As this virtual machine is installed on a Linux host, select 'System clock uses UTC'
#* Select Europe/London (tip: press 'E' on the keyboard to jump down to 'E' on the list.)
#* Hit 'OK'
# On the next option, type in a password to use for the system.
# After you hit 'OK', the system will start to install. This may take a long while. The installer may look as though it has frozen at certain points. However it is important to be patient as a few of the packages take a long time to install.
# When the install is finished, the machine will reboot. When it comes up with the boot menu, this will be the installation discs boot menu.
#* 'Force Off' the virtual machine. This is safe as the machine is not fully running yet.
#* From the boot order, remove the optical drive and make sure the hard drive is placed to the top.
#* Start the virtual machine again.
# On first boot, it will start downloading updates for FreePBX. This may take a while.
# Once finished, it will leave you at the command prompt. Type '<code>root</code>' for the username and the password you selected during install for password.
# That's it, AsteriskNOW! is installed!


== First time run of the web interface ==
== First time run of the web interface ==

Revision as of 15:51, 21 March 2021

FreeBPX Distribution is a fully fledged VoIP server allowing complete customisation to your needs and works with most setups. It is an appliance, with a complete Linux setup and web manager to allow easy administration.

We have implemented FreePBX 15 (SNG7-PBX-64bit-2011-5) and Asterisk 17. This is the latest version of Asterisk and is a LTS release so will be supported well into the future with fixes (slated to be supported until 2024). This is a complete distribution and so needs to be installed on a machine. We will be setting this up on a separate computer rather than the main server.

Prerequisites

  • Download the latest FreePBX ISO image. This is currently FreePBX 15 available here directly or at this website.
  • This will need burning to a CD or writing to a USB stick. We use a USB stick and Rufus under windows to write it to a USB stick (use DD mode). This guide will cover the USB method but the CD method is very similar.

Booting the installation system

  1. Insert the USB stick into the computer.
  2. Power on the machine.
  3. Press the key to bring up the boot device menu.
  4. Select the USB stick that is inserted.
  5. When the boot menu appears, select 'FreePBX 15 Advanced Installation'.
  6. Next, select 'Advanced Installation with Normal Video'.
  7. Next, select 'Advanced Install with Asterisk 17 via Standard Video'. The system will now boot to the Linux installer.

Configuring the FreePBX installation

We will be using a dedicated computer with an empty hard drive. This guide will show you all the main options that need to be changed - there are other options if you wish to customise the installation but this is the bare minimum that I will be using to install the system.

Setting the date, time and time zone

  1. Click 'DATE & TIME' to select the correct time zone and set the date & time.
  2. In the 'Region:' box, type or select 'Europe'.
  3. In the 'City:' box, change 'Amsterdam' by typing of selecting 'London'.
  4. If you are already connected to a network, ensure that the 'Network Time' switch is 'On'. This is important as this server will be used to set the times on the phones and needs accurate time to function correctly.
  5. Click 'Done'

Setting the keyboard layout

  1. Click 'KEYBOARD'
  2. Click the '+' button to add a new keyboard layout. We must add the new keyboard layout before removing the one we don't want.
  3. Type 'UK' in the search box.
  4. Click 'English (UK)'.
  5. Click 'Add'.
  6. Select 'English (US)' from the list.
  7. Click the '-' button to remove this layout.
  8. You may test the layout in the box on the right. I usually check that the '£' and '#' symbols come up when I press these keys.
  9. Click 'Done'.

Setting language support

  1. Click 'LANGUAGE SUPPORT'
  2. Tick 'English (United Kingdom).
    • Unfortunately, we cannot unselect 'English (United States)'.
  3. Click 'Done'

Setting the hard drive partitioning

As this is a new install, we will be configuring FreePBX to use the whole drive. We would like to use the BtrFS file system so this is slightly different to usual.

  1. Click 'INSTALLATION DESTINATION'.
  2. Check that the hard drive we want to use has a tick on it.
  3. Under 'Partitioning', select 'I will configure partitioning'.
  4. Click 'Done'.
  5. Under 'New mount point will use the following partitioning scheme', change 'LVM' to 'Btrfs'.
  6. If there are already any partitions on the disk, you will have to select each one and click '-' on each one until the disk is empty.
  7. We want to use the whole drive. At the top of the list, click 'Click here to create them automatically'. This will automatically create the correct partitions using the whole drive.
  8. Click 'Done'.
  9. A list of what will be done during the installation will appear which you can review. If you are happy, click 'Accept Changes'.

Disable kdump

I have no use for kdump so will be disabling it.

  1. Click 'KDUMP'.
  2. Untick the 'Enable kdump' box.
  3. Click 'Done'

Starting the installation

  1. If there is any problems preventing installation, there will be a yellow bar at the bottom of the screen saying where the problem is and the section that has the problem will have a yellow exclamation mark. These sections will need fixing before you can continue.
  2. I have added a picture of what the screen should look like for reference once everything is configured.
  3. If you are happy with all of the settings, click 'Begin Installation'.

Entering a root password

The installation will start. While the installation continues, we need to set the root password. This will not stop the installation while you are setting this up but must be done before the installation is finished.

  1. Click 'ROOT PASSWORD'.
  2. Type a password for the root user in the 'Root Password:' box.
  3. Retype the password in the 'Confirm:' box.
  4. Click 'Done'.


First time run of the web interface

Updating the server

Updating the distribution

The latest version of AsteriskNOW! available from the website is not the latest version of the distribution. The distribution must be updated manually to get up to the latest version.

We will start off on the 6.12.65 track. As of 31st December 2015, this has reached its End of Life. We will be upgrading to the 10.13.66 track which is the latest. To look for the latest version, the website is http://wiki.freepbx.org/display/PPS/FreePBX-Distro-10.13.66

  1. Login to your system as root with SSH or go to the Virtual Machine Manager, open the machine and login.
  2. Type cd ~. This will take you to the home directory where we can download.
  3. Type mkdir upgradescripts then cd upgradescripts. This will make a new directory and take you into the new directory.
  4. Type wget https://upgrades.freepbxdistro.org/stable/10.13.66/upgrade-10.13.66-1.sh. This will download the script to update the distribution to the new track. You can also download this from this server by typing wget http://192.168.0.24/hpserver/images/2/24/Upgrade-10.13.66-1.sh then rename it to lowercase by typing mv Upgrade-10.13.66-1.sh upgrade-10.13.66-1.sh.
  5. Type chmod +x upgrade-10.13.66-1.sh. This changes the permissions so we can execute the file.
  6. Type ./upgrade-10.13.66-1.sh to run the script.
  7. While the script is running, you may see some errors. These are normal and as long as the script runs through to the end, you can safely ignore these.
  8. When the script is finished, it will say REBOOT YOUR BOX NOW. Follow these instructions and type reboot.
    Once the machine has rebooted, we will need to update to the latest version of the track (At the time of writing, it was 10.12.66-10, we will use this as an example. Use the latest version available at http://wiki.freepbx.org/display/PPS/FreePBX-Distro-10.13.66).
  9. Login in again as root.
    We did a lot of the legwork in the last example so it makes it easier this time round.
  10. You should already be in the home directory so type cd upgradescripts to move to the upgradescript folder we made earlier.
  11. Look on the FreePBX site, then with the lastest script, type wget https://upgrades.freepbxdistro.org/stable/10.13.66/upgrade-10.13.66-10.sh, changing the last part to whatever the latest version is.
  12. Type chmod +x upgrade-10.13.66-10.sh to make the script executable.
  13. Type cd /. This will take us to the root directory. Due to the way this script works, you must run it from the top root directory.
  14. Type ./root/upgradescripts/upgrade-10.13.66-10.sh to run the script.
  15. Once again, errors that don't stop the script are normal and can be ignored.
  16. Once you have reached REBOOT YOUR BOX NOW, reboot the machine by typing reboot.

NOTE

It is a good idea to keep an eye on the FreePBX website for updates from time to time. You can use the second half of the tutorial to do the minor updates at any time, substituting the example script version for the latest.

General updates

As with any Linux distribution, from time to time there are updates to the system. We will show you how to check these and install them.

  1. Login to the system as root
  2. Type yum update
  3. After downloading from the internet, a list may be shown showing the latest updates available. If No Packages marked for Update is shown, there are no updates available right now and you can continue to the next step.
  4. Type y to accept the changes. The updates will then be downloaded and installed. Some packages take a long time to install and the system will look like it has hung. Be patient, they will eventually install.
  5. It is recommended that once the update is finished, you reboot the machine so that any updates downloaded get used. Type reboot

Updating FreePBX modules