We will use Virtualbox on our personal Windows PC to create the readymade Elastix image (eg. elastix.img file)
We should prepare the Virtualbox VM about less than 100 MB storage from our Cloud VPS.
Suppose, if the Cloud VPS storage is 25 GB, then we will create Virtualbox VM with 24.90 GB
1) Run Virtualbox on Windows and create a new VM
Section > Name and Operating System;
Name: elastix
Folder: C:\Users\User Name\Documents\Virtual Machines
ISO Image: C:\Users\User Name\Downloads\elastix4.iso
Type: Linux
Subtype: Red Hat
Version: Red Hat 7.x (64-bit)
Section > Unattended Install
Do nothing in this section
Section > Hardware
Memory: 2048 MB
Processors: 1 CPU
* Do not enable EFI
Section > Hard Disk
Location: C:\Users\User Name\Documents\Virtual Machines\elastix\elastix.vhd
Size: 24.90 GB (less than 100 MB of your Cloud VPS storage)
Type: VHD (do not enable Pre-allocate)
FINISH
Do not Start VM until remaining settings
2) Go to VM Settings
System > Acceleration
Paravirtualization Interface: KVM
Network > Adapter 1
MAC Address: your cloud vps mac address (12 characters without colon)
OK/Save
3) Start the VM and start installation
NETWORK & HOSTNAME > Configure…
General: [enable] Automatically connect
IPv4 Settings: Method: Automatic (DHCP); Additional DNS servers: 1.1.1.1,8.8.8.8
IPv6 Settings: Method: Ignore
SAVE
NETWORK & HOSTNAME > Hostname
Hostname: ippbx.yourdomain.com
Done/save
KEYBOARD > English US > Done
DATE & TIME > Click on your Country Map > Done
INSTALLATION DESTINATION >
(enable) I will configure partitioning.
Done
Select Standard Partition (not LVM)
Click the “+” sign to create new partition
swap = 2 gb
biosboot = 2 mb
/boot = 500 mb
/var/log = 1 gb
/ = all remaining space
Done > Accept
Begin Installation
4) Set Passwords in Install Progress
Set the root password, then MySQL root password, then admin password
Save the information to your Gmail, for future reference
5) Login to Elastix terminal
Make sure the system getting internet
ping google.com
Stop Elastix Update
service elastix-updaterd stop chkconfig elastix-updaterd off
Initial repository adjustment; final adjust will be later
rm -f /etc/yum.repos.d/* cat <<EOF | tee /etc/yum.repos.d/community-archive.repo [base] name=CentOS7 Community Archive baseurl=http://archive.kernel.org/centos-vault/7.0.1406/os/\$basearch/ gpgcheck=1 gpgkey=http://archive.kernel.org/centos-vault/RPM-GPG-KEY-CentOS-7 enabled=1 EOF yum clean all yum repolist yum install -y nano
Now, inject virtio drivers (important)
dracut --force --add-drivers "virtio virtio_pci virtio_blk virtio_scsi virtio_net" /boot/initramfs-$(uname -r).img $(uname -r)
Edit network configuration
Find the network interface name
ls /etc/sysconfig/network-scripts/
It may be “ifcfg-enp0s3”
Edit the network interface
nano /etc/sysconfig/network-scripts/ifcfg-enp0s3
Make it look like below: (must remove mac-address and uuid)
TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=no IPV6_FAILURE_FATAL=no NAME=enp0s3 ONBOOT=yes DNS1=1.1.1.1 DNS2=8.8.8.8 PEERDNS=yes PEERROUTES=yes
Save and exit
Then poweroff the VM
poweroff
6) Convert the VM disk to image
Exit Virtualbox program
Open Windows Powershell (Run as Administrator), and run the command;
cd "C:\Program Files\Oracle\VirtualBox" .\VBoxManage.exe clonehd "C:\Users\User Name\Documents\Virtual Machines\elastix\elastix.vhd" "C:\Users\User Name\Downloads\elastix.img" --format RAW
Wait about 5 minutes, then elastix.img image is ready to your Downloads folder
Install 7-Zip to your Windows PC
Right-click on the elastix.img file and select 7-Zip > Add to “elastix.zip”
Wait about 30 minutes to complete the process !
7) Make a Downloadable URL
Upload elastix.zip file to Amazon AWS S3 bucket or an FTP server
Example: https://ftp.yourdomain.com/downloads/elastix.zip
8) Login to your Cloud VPS VNC Console
Use your Cloud Console (not PuTTy)
apt install -y unzip
cd /dev/shm
wget https://ftp.yourdomain.com/downloads/elastix.zip
funzip elastix.zip | dd of=/dev/vda bs=1M status=progress && sync
Wait about 30 minutes, until all Copy process ends !
9) Hard Reboot the Cloud VPS
Login with Elastix root password, and adjust the remaining Elastix settings
Enjoy Elastix !
