ssh [username]@[server_ip_address]<\/pre>\nBe sure to replace “username” with the account name of a root user found on the server (or the root user itself), and replace “server_ip” with the IP address of your server.<\/p>\n
Before starting with the installation, it is recommended to update Ubuntu packages to their latest versions:<\/p>\n
apt-get update\r\napt-get upgrade<\/pre>\nEnsure the required dependencies are installed by running the following command:<\/p>\n
apt-get install software-properties-common build-essential unzip wget -y<\/pre>\n<\/span>Installing the LAMP Stack<\/span><\/h2>\n1. Installing Apache2<\/h3>\n
Apache2 is the recommended web server for Vtiger. To install it, execute the following command:<\/p>\n
apt-get install apache2<\/pre>\nOnce installed, it is best to enable the automatic startup of the Apache2 service in case of a system reboot:<\/p>\n
systemctl enable apache2<\/pre>\nTo check if your Apache2 service is running, use the following command:<\/p>\n
systemctl status apache2<\/pre>\nYou should see the following output:<\/p>\n
\u25cf apache2.service - The Apache HTTP Server\r\nLoaded: loaded (\/lib\/systemd\/system\/apache2.service; enabled; vendor preset: enabled)<\/pre>\nAn Apache module called “rewrite” should be enabled:<\/p>\n
a2enmod rewrite<\/pre>\nRestart the apache2 service to apply the changes we made:<\/p>\n
systemctl restart apache2<\/pre>\n2. Installing PHP v7.2<\/h3>\n
Vtiger CMS supports the latest stable version of PHP, which is PHP 7.2. Unfortunately, this is not yet the default version of PHP installed on Ubuntu 18.04, therefore we must add an additional repository. To proceed, use the following commands:<\/p>\n
add-apt-repository ppa:ondrej\/php\r\napt-get update<\/pre>\nAfter updating the repository, use the following command to install PHP 7.2 and all libraries required for this tutorial:<\/p>\n
apt install libapache2-mod-php7.2 php7.2 php7.2-cli php7.2-mysql php7.2-common php7.2-zip php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-curl php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-ldap php7.2-imap php7.2-json<\/pre>\nTo verify that you are using PHP 7.2, type the following command:<\/p>\n
php\u00a0-v<\/pre>\nYou should see the following text:<\/p>\n
PHP 7.2.15-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb 8 2019 15:38:01) ( NTS )\r\nCopyright (c) 1997-2018 The PHP Group\r\nZend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies\r\n with Zend OPcache v7.2.15-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies\r\n<\/pre>\nAdditional changes in Apache’s loaded default configuration file for PHP is required by Vtiger.<\/p>\n
nano\u00a0\/etc\/php\/7.2\/apache2\/php.ini<\/pre>\nModify the following lines:<\/p>\n
max_execution_time = 120\r\nmax_input_vars = 2000\r\nmemory_limit = 256M\r\npost_max_size = 32M\r\nupload_max_filesize = 64M\r\nfile_uploads = On\r\nallow_url_fopen = On\r\ndisplay_errors = On\r\nshort_open_tags = Off\r\nlog_errors = Off\r\nerror_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT<\/pre>\nSave the configuration and restart the Apache web server service to apply the changes:<\/p>\n
systemctl restart apache2<\/pre>\n3. Installing MariaDB Server<\/h3>\n
To install the MariaDB server, use the following command.<\/p>\n
apt-get install mariadb-server<\/pre>\nAfter a successful installation, we have to apply basic security settings by using the built-in security script provided by MariaDB.<\/p>\n
mysql_secure_installation<\/pre>\nFor all questions aside from setting the new password, answer the prompts with:<\/p>\n
Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y\r\nDisallow root login remotely? (Press y|Y for Yes, any other key for No) : Y\r\nRemove test database and access to it? (Press y|Y for Yes, any other key for No) : Y\r\nReload privilege tables now? (Press y|Y for Yes, any other key for No) : Y<\/pre>\nTo verify the version of MySQL currently installed, type the following command:<\/p>\n
mysql -V<\/pre>\nYou should see the following text:<\/p>\n
mysql Ver 15.1 Distrib 10.1.38-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2<\/pre>\n3. Creating our Vtiger CRM Database<\/h3>\n
After setting up the database server, we can now continue by creating and setting up our database.<\/p>\n
Log in to MariaDB’s CLI:<\/p>\n
mysql -u root -p<\/pre>\nUse the following lines to create the database (vtiger_db) and assign the user (vtiger_user) to the newly created database.<\/p>\n
Always remember to use a strong password.\u00a0Generally, a password utilizing at least 12 characters including alphanumeric and grammatical symbols is sufficient. Never use passwords based upon dictionary words or significant dates.<\/p>\n
CREATE DATABASE vtiger_db;\r\nCREATE USER 'vtiger_user'@'localhost' IDENTIFIED BY '[password]';\r\nGRANT ALL PRIVILEGES ON vtiger_db.* TO 'vtiger_user'@'localhost' IDENTIFIED BY '[password]' WITH GRANT OPTION;\r\nALTER DATABASE vtiger_db CHARACTER SET utf8 COLLATE utf8_general_ci;\r\nFLUSH PRIVILEGES;\r\nEXIT;<\/pre>\nDo not forget to replace “[password]” with your strong password.<\/p>\n
To verify that we can access the newly created database with the new database user, run the following command:<\/p>\n
mysql -u vtiger_user -p vtiger_db<\/pre>\nIt will ask for your database user password; once logged in you should be able to see MariaDB CLI.<\/p>\n
To exit the CLI, type:<\/p>\n
quit<\/pre>\n