Now, let’s configure packages and install dependencies:

Install Apache and MySQL, tools and packages

    1. Install Apache2
      apt-get install apache2 -y
    2. Install required packages:
      apt-get install libxml-simple-perl libcompress-zlib-perl libdbi-perl libdbd-mysql-perl libapache-dbi-perl libnet-ip-perl libsoap-lite-perl libarchive-zip-perl make build-essential php-pclzip php7.0 libapache2-mod-php7.0 php7.0-common php-pear php7.0-cli php7.0-ldap libxml-simple-perl libio-compress-lzma-perl php7.0-gd php7.0-curl php-soap libsoap-lite-perl libmojolicious-perl libplack-perl php-mbstring php-zip -y
    3. Install CPAN and dependencies:
      cpan
      install CPAN
      reload cpan
      install XML::Entities
      exit
    4. Now Install MySql and packages:
      apt install -y mysql-server php7.0-mysql
    5. Configure SQL Server, we are creating new DB named ocsweb and user called ocsuser, also, we will setup a password for Root user:
      mysql -u root
      	SET PASSWORD FOR 'root'@'localhost' = PASSWORD('NEW_SQL_ROOT_PASSWORD');
      	CREATE DATABASE ocsweb;
      	CREATE USER 'ocsuser'@'%' IDENTIFIED BY 'NEW_DB_PASSWORD';
      	GRANT ALL PRIVILEGES ON ocsweb.* TO 'ocsuser'@'%' WITH GRANT OPTION;
      	FLUSH PRIVILEGES;
      exit