Download from https://sourceforge.net/projects/vtigercrm/
Extract the downloaded file.
My environment: PHP 7.3 FPM, MySQL 5.7, Nginx
SETUP LOCAL WITH NGINX
|
1 |
sudo gedit /etc/nginx/sites-available/vtigercrm.test |
content:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
server { listen 80; listen [::]:80; root /home/teddy/Documents/works/vtigercrm; #your document root server_name www.vtigercrm.test vtigercrm.test ; # Your server name index index.php index.html index.htm ; # Webfonts,fonts location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ { add_header "Access-Control-Allow-Origin" "*"; expires 1y; access_log off; add_header Cache-Control "public"; } # Media: images, icons, video, audio, HTC location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { expires 1y; access_log off; add_header Cache-Control "public"; } # Js, Css location ~* \.(?:css|js)$ { expires 1y; access_log off; add_header Cache-Control "public"; } # Serve static files without touching php location / { try_files $uri $uri/ /index.php?$args; } # pass requests for dynamic content to site location ~ [^/]\.php(/|$) { try_files $uri /index.php; fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_buffers 1024 4k; fastcgi_read_timeout 600s; fastcgi_connect_timeout 600s; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #include fastcgi_params; #FOR DEVELOPMENT MODE ONLY - BEGIN fastcgi_param MAGE_IS_DEVELOPER_MODE true; fastcgi_param PHP_VALUE display_startup_errors=on; fastcgi_param PHP_VALUE display_errors=on; fastcgi_param PHP_VALUE html_errors=on; fastcgi_param PHP_VALUE log_errors=on; fastcgi_param PHP_VALUE error_log=/home/teddy/Documents/works/vtigercrm/var/log/system.log; #FOR DEVELOPMENT MODE ONLY - END include fastcgi_params; } gzip on; gzip_disable "msie6"; gzip_comp_level 6; gzip_min_length 1100; gzip_buffers 16 8k; gzip_proxied any; gzip_types text/plain text/css text/js text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/xml+rss image/svg+xml; gzip_vary on; # Banned locations (only reached if the earlier PHP entry point regexes don't match) location ~* (\.php$|\.htaccess$|\.git) { deny all; } } |
- Enable file config
1sudo ln -s /etc/nginx/sites-available/vtigercrm.test /etc/nginx/sites-enabled/vtigercrm.test - Register the host on my system
1sudo gedit /etc/hosts
Like this:
123...127.0.0.1 vtigercrm.test... - CHECK THE NGINX SETTING AND RESTART IT:
123teddy@teddy:~$ sudo nginx -tnginx: the configuration file /etc/nginx/nginx.conf syntax is oknginx: configuration file /etc/nginx/nginx.conf test is successful
1sudo service nginx restart
- Set file permission and owner:
1teddy@teddy:~/Documents/works$ sudo chown www-data:www-data -R vtigercrm/
CREATE A NEW DATABASE: vtigercrm COLLATION utf8mb4_general_ciTest: http://vtigercrm.test/ –> INSTALLATION WORKING. THE INSTALLATION TOOK SAME TIME
Admin
username: admin
password: AdmtigerBUT I GOT THIS ERROR:
12MySQL Server should be configured with:sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
DEBUG STEP:
/vtigercrm/languages/en_us/Install.php:
1'ERR_DB_SQLMODE_NOTFRIENDLY' => 'MySQL Server should be configured with:<br> sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION',
/vtigercrm/modules/Install/models/Utils.php:
1234567891011121314151617181920212223242526272829303132333435363738394041424344...public static function checkDbConnection($db_type, $db_hostname, $db_username, $db_password, $db_name, $create_db=false, $create_utf8_db=true, $root_user='', $root_password='') {...$db_sqlmode_support = false; // does the database having friendly sql_mode?//Checking for database connection parametersif($db_type) {...if(@$conn->Connect($db_hostname,$db_username,$db_password)) {...$db_sqlmode_support = self::isMySQLSqlModeFriendly($conn);if($create_db && $db_sqlmode_support) {...}...}}...if(!$db_type_status || !$db_server_status) {...} elseif(!$db_sqlmode_support) {$error_msg = getTranslatedString('ERR_DB_SQLMODE_NOTFRIENDLY', 'Install');} elseif($db_creation_failed) {...}...}...public static function isMySQLSqlModeFriendly($conn) {$rs = $conn->Execute("SHOW VARIABLES LIKE 'sql_mode'");if ($rs && ($row = $rs->fetchRow())) {$values = explode(',', strtoupper($row['Value']));$unsupported = array('ONLY_FULL_GROUP_BY', 'STRICT_TRANS_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE');foreach ($unsupported as $check) {if (in_array($check, $values)) {return false;}}}return true;}...
SOLUTION: MODIFY THE MYSQL SETTING IN /etc/mysql/my.cnf
1sudo gedit /etc/mysql/my.cnf
MODIFY THE ‘sql_mode’ VALUES: –> PLS READ: https://www.percona.com/blog/2016/10/18/upgrading-to-mysql-5-7-beware-of-the-new-strict-mode/
1234...#sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"sql_mode = "ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"...
SAVE AND THE RESTART MYSQL SERVICE
1sudo service mysql restart