Skip to content

Instantly share code, notes, and snippets.

@rakibulinux
Last active January 24, 2023 14:12
Show Gist options
  • Save rakibulinux/3a6107a0266cf8d7e04eacb49ed125e8 to your computer and use it in GitHub Desktop.
Save rakibulinux/3a6107a0266cf8d7e04eacb49ed125e8 to your computer and use it in GitHub Desktop.
How To Install vTiger CRM on Ubuntu
#!/bin/sh
sudo apt update
sudo apt install -y php php-cli php-mysql php-common php-zip php-mbstring php-xmlrpc php-curl php-soap php-gd php-xml php-intl php-ldap
sudo apt install -y apache2 libapache2-mod-php
sudo apt-get install mariadb-server
sudo systemctl start mariadb
sudo systemctl enable mariadb
# Add those line on php.ini file. Remember that file path depend on your PHP -V
sudo nano /etc/php/7.2/apache2/php.ini
#file_uploads = On
#allow_url_fopen = On
#memory_limit = 1024M
#upload_max_filesize = 1024M
#max_execution_time = 3000
#display_errors = Off
#max_input_vars = 15000
#date.timezone = America/Chicago
wget https://tenet.dl.sourceforge.net/project/vtigercrm/vtiger%20CRM%207.1.0/Core%20Product/vtigercrm7.1.0.tar.gz
tar xvf vtigercrm7.1.0.tar.gz
sudo mv vtigercrm /srv/vtigercrm
sudo apt -y install apache2
sudo a2enmod rewrite
sudo systemctl restart apache2
sudo chown -R www-data:www-data /srv/vtigercrm
#Add those line on Apache conf file
sudo nano /etc/apache2/sites-enabled/vtigercrm.conf
<VirtualHost *:80>
ServerAdmin webmaster@website.com
ServerName crm.website.com
ServerAlias www.crm.website.com
DocumentRoot /srv/vtigercrm/
<Directory /srv/vtigercrm/>
Options +FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/apache2/vtigercrm_error.log
CustomLog /var/log/apache2/vtigercrm_access.log combined
</VirtualHost>
#Verify file syntax
sudo apachectl -t
# If it's show Syntax OK then restart Apache
sudo systemctl restart apache2
#Now Create a Databases
sudo mysql -u root -p
CREATE DATABASE rakib1 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALL ON rakib1.* TO 'rakib1'@'localhost' IDENTIFIED BY 'E@kS$D2019P@';
FLUSH PRIVILEGES;
EXIT;
#Finish the installation by opening http://crm.website.com in your browser.
#If you got error this error "MySQL Server should be configured with: sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" then follow this:
#For Ubuntu - Run command:
sudo nano /etc/mysql/my.cnf
#Add the following part to the bottom:
[mysqld]
sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
#Run command to restart MySQL Service:
sudo service mysql restart
#You will also need to change Database Collation to "utf8_general_ci" in phpmyadmin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment