##Google Analz## ##Microsoft## ##Googel## Swanand: Basic shell script for installing ViciDial version 11

Friday 6 October 2023

Basic shell script for installing ViciDial version 11

 Basic shell script for installing ViciDial version 11. This script assumes you are using a supported Linux distribution (e.g., CentOS, Debian, Ubuntu) and that you have root or sudo privileges on your server. Please adjust the script as needed for your specific environment.


#!/bin/bash


# Update the system

echo "Updating system..."

sudo apt update && sudo apt upgrade -y   # For Ubuntu/Debian

# OR

# sudo yum update -y   # For CentOS


# Install required dependencies

echo "Installing required packages..."

sudo apt install -y build-essential perl libpri-dev libapache2-mod-php mariadb-server mariadb-client bison flex php php-mysql php-pear php-curl php-intl php-gd php-mbstring php-gettext php-xml php-json php-pear php-fpm curl sox lame libncurses5-dev libssl-dev libmysqlclient-dev mpg123 sendmail unzip   # For Ubuntu/Debian

# OR

# sudo yum install -y gcc gcc-c++ make automake autoconf libtool openssl-devel ncurses-devel libxml2-devel unixODBC unixODBC-devel libsrtp libsrtp-devel libogg libvorbis libvorbis-devel zlib-devel libtheora libtheora-devel libtool-ltdl libtool-ltdl-devel sqlite-devel mariadb mariadb-server mariadb-devel sox newt-devel libuuid-devel gtk2-devel jansson jansson-devel binutils-devel libXslt libXslt-devel mpg123-devel mysql-connector-odbc libtiff-tools alsa-lib-devel httpd php php-mysql php-pear php-mbstring tftp-server httpd make ncurses-devel libtermcap tftp-server httpd php-mysql php-pear php-mbstring php-xml php-json php-gd php-curl sendmail-cf sox lame

# libnewt libnewt-devel ncurses-devel libstdc++ libstdc++-devel libxml2 libxml2-devel kernel-devel gcc-c++ sqlite-devel


# Secure MySQL and create the ViciDial database and user

echo "Securing MySQL and creating the ViciDial database..."

sudo mysql_secure_installation

mysql -u root -p <<EOF

CREATE DATABASE vicidialdb;

CREATE USER 'vicidialuser'@'localhost' IDENTIFIED BY 'your_password';

GRANT ALL PRIVILEGES ON vicidialdb.* TO 'vicidialuser'@'localhost';

FLUSH PRIVILEGES;

EXIT;

EOF


# Download and extract ViciDial

echo "Downloading and extracting ViciDial..."

wget http://download.vicidial.com/vicidial-upgrade/vicidial-2.14-764a.tgz

tar -xvzf vicidial-2.14-764a.tgz

cd vicidial-2.14


# Run the ViciDial installation script

echo "Running ViciDial installation script..."

./install.pl


# Configure Apache Virtual Host

echo "Configuring Apache Virtual Host..."

cat <<EOF | sudo tee /etc/apache2/sites-available/vicidial.conf

<VirtualHost *:80>

    ServerAdmin webmaster@yourdomain.com

    DocumentRoot /var/www/html/vicidial

    ServerName yourdomain.com

    ErrorLog ${APACHE_LOG_DIR}/error.log

    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

EOF


# Enable the Virtual Host and restart Apache

sudo a2ensite vicidial.conf

sudo systemctl restart apache2


echo "ViciDial installation completed!"


This script automates the installation steps outlined in the previous response. Before running it, make sure to replace 'your_password' with the actual password you want to set for the MySQL user.


Remember to review and adapt the script to your specific needs and environment. Additionally, always ensure that you are using the latest ViciDial version and consult the official documentation for any updates or specific configurations required for your use case.


No comments:

Post a Comment

Featured post

Vicidial With WebRTC

Vicidial With WebRTC VICIDial is well known open source call center software. It has been in use by many small to large scaled con...