Here is a step-by-step installation guide for setting up VICIdial from scratch on Alma Linux 8 with Asterisk 18. This guide explains each point:
**Note**: This guide assumes you have a clean installation of Alma Linux 8 and that you have root or sudo privileges. Be sure to adapt the instructions to your specific environment.
1. Set the timezone to America/New_York:
```
timedatectl set-timezone Asia/Kolkata
```
2. Update the system and install essential packages:
```
yum check-update
yum update -y
yum -y install epel-release
yum update -y
yum install git -y
yum install -y kernel*
```
3. Disable SELinux by editing the SELINUX configuration file and reboot:
```
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
reboot
```
4. Set the default editor to nano:
```
echo "export EDITOR='nano'" >> /etc/bashrc
chmod +x /etc/rc.d/rc.local
systemctl enable rc-local
systemctl start rc-local
systemctl status rc-local
```
5. Install development tools, additional repositories, and required packages:
```
yum groupinstall "Development Tools" -y
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
yum -y install http://rpms.remirepo.net/enterprise/remi-release-8.rpm
yum -y install yum-utils
dnf module enable php:remi-7.4 -y
dnf -y install dnf-plugins-core
dnf config-manager --set-enabled powertools
```
6. Install PHP and various PHP modules, as well as other required packages:
```
yum install -y php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo php-opcache wget unzip make patch gcc gcc-c++ subversion php php-devel php-gd gd-devel readline-devel php-mbstring php-mcrypt php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel httpd libpcap libpcap-devel libnet ncurses ncurses-devel screen kernel* mutt glibc.i686 certbot python3-certbot-apache mod_ssl openssl-devel newt-devel libxml2-devel kernel-devel sqlite-devel libuuid-devel sox sendmail lame-devel htop iftop perl-File-Which php-opcache libss7 mariadb-devel libss7* libopen*
yum -y install sqlite-devel
```
7. Configure Apache to serve VICIdial recordings:
```
nano /etc/httpd/conf/httpd.conf
```
Add the following lines to the configuration file:
```apache
CustomLog /dev/null common
Alias /RECORDINGS/MP3 "/var/spool/asterisk/monitorDONE/MP3/"
<Directory "/var/spool/asterisk/monitorDONE/MP3/">
Options Indexes MultiViews
AllowOverride None
Require all granted
</Directory>
```
8. Configure PHP settings:
```
nano /etc/php.ini
```
Update the php.ini file with the following values:
```apache
error_reporting = E_ALL & ~E_NOTICE
memory_limit = 448M
short_open_tag = On
max_execution_time = 3330
max_input_time = 3360
post_max_size = 448M
upload_max_filesize = 442M
default_socket_timeout = 3360
date.timezone = America/New_York
```
9. Restart the Apache web server to apply the changes:
```
systemctl restart httpd
```
10. Install MariaDB and configure it:
```
dnf install -y mariadb-server mariadb
dnf -y install dnf-plugins-core
dnf config-manager --set-enabled powertools
systemctl enable mariadb
cp /etc/my.cnf /etc/my.cnf.original
```
Create or edit the my.cnf file with the provided configuration.
11. Install Perl and Perl modules:
```
yum install perl-CPAN -y
yum install perl-YAML -y
yum install perl-libwww-perl -y
yum install perl-DBI -y
yum install perl-DBD-MySQL -y
yum install perl-GD -y
```
Install various Perl modules using cpan and cpanm.
12. Install the Asterisk Perl module:
```
cd /usr/src
wget http://download.vicidial.com/required-apps/asterisk-perl-0.08.tar.gz
tar xzf asterisk-perl-0.08.tar.gz
cd asterisk-perl-0.08
perl Makefile.PL
make all
make install
```
13. Install other required libraries and tools like Lame and Jansson.
14. Install Dahdi, LibPRI, and Asterisk. Configure and compile Asterisk with the required modules.
15. Set up MySQL users and databases for VICIdial.
16. Install VICIdial:
```
mkdir /usr/src/astguiclient
cd /usr/src/astguiclient
svn checkout svn://svn.eflo.net:3690/agc_2-X/trunk
cd trunk
perl install.pl
```
17. Update area codes and IP settings as needed.
18. Configure `/etc/rc.local` and add various scripts for system maintenance and startup.
19. Schedule various cron jobs for VICIdial, database maintenance, and other tasks.
20. Reboot the system.
You can now access VICIdial through your web browser using the provided URLs.