The setup requires root access privileges. You need to open the command line and enter the listed commands. After each command press ENTER.
Ensure that the system (and after installation apache too) is using a UTF8 capable locale. The current system locale is set either with the tool "update-locale" or directly in the file /etc/default/locale.
The available locales can be listed with "locale -a". For apache this may be configured separately in the apache config files. For Ubuntu in /etc/apache2/envvars.
For details see: https://www.thomas-krenn.com/de/wiki/Locales_unter_Ubuntu_konfigurieren.
sudo apt-get install apache2
Enable Additional Modules for Apache
Apache web server needs to be fine tuned for translate5 to work properly. Switch to Apache directory with
and enter these commands to enable required Apache submodules
sudo a2enmod rewrite filter deflate headers expires
sudo apache2ctl restart
Last command is mandatory for changes to take effect. If you see, upon issuing sudo apache2ctl restart, the following warning:
Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
do not worry, it’s not important.
sudo apt-get install mysql-server mysql-client
The installation process will prompt a few times for a new root password access for MySQL. Please provide a password, when prompted. Please ensure you type the same password every time. If you omit a password you could get problems with a MySQL version greater 5.7, in this case follow the instructions in: http://askubuntu.com/a/801950/428011
You can test the reachability of the database by issuing at a terminal:
mysql -u root -p
If you specified a password during MySQL setup, type it when prompted; otherwise, just hit Return. It is possible that you have to use "sudo" or be root to connect to mysql as root with an empty password on newer systems.
If everything went fine, you should see the greeting message and the shell prompt:
Leave mysql shell prompt with
In general you will find the mysql configuration in "/etc/mysql/mysql.conf.d/mysqld.cnf" or in "/etc/mysql/my.cnf" or a similar file.
Charset and Collation
The charset is set on creation of the concrete DB in the next step.
Full text index optimization
For proper functionality of the termportal search the minimum index token length must be set to 1:
After changing this values the indexes must be rebuild:
Rebuild the index if you just changed some of the above settings:
On MySQL 5.7 the innodb_optimize_fulltext_only flag should be kept disabled, since there the rebuild of the index does not properly work!
Ensure that the timezone of MySQL is the same as the timezone configured in apache php and CLI php.
To get the MySQLs timezone call:
Not allowed SQL Modes
The following SQL Mode must not be set: ONLY_FULL_GROUP_BY, NO_ZERO_IN_DATE, NO_ZERO_DATE, STRICT_TRANS_TABLES
Executing the following command in mysql lists the current SQL modes:
SHOW VARIABLES WHERE Variable_name = 'sql_mode';
To achieve this, you can add / change the following setting to your mysql configuration file:
sql_mode = "ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
For MySQL 8 this would be:
sql_mode = "ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
See http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html for further information.
Binary Logging and unprivileged DB users
If you are connecting translate5 with an unprivileged (non root) user to the Database, please ensure that no binary logging or the less safe option "log_bin_trust_function_creators" is set.
To set it just add
log_bin_trust_function_creators = 1
to your mysql config file.
See https://dev.mysql.com/doc/refman/5.7/en/stored-programs-logging.html for further information.
InnoDB files per table
Also it is recommended to enable the mysql config
innodb_file_per_table so that each Table is stored in an own file. This is very useful if you plan to import many huge projects.
You find Instructions for that in the MySQL documentation and in the cpanel forum.
Since some tables contain a lot of data, the innodb_buffer_pool_size should be increased to 64MB. Background are multiple issues. One is described below with the import of huge files.
Another issue could be migration scripts which affects tables containing a lot of data, like LEK_segment_data. Migration scripts working with that table can run into the following or similar error:
exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1206 The total number of locks exceeds the lock table size' in /webs/in cludes/ZendFramework-1.12.9-minimal/library/Zend/Db/Statement/Pdo.php:228
Solution is here:
- edit /etc/my.cnf
- add / change the line
innodb_buffer_pool_size=512MB # the suitable value depends on several points, see here.
- Restart the MySQL server
MySQL gone away errors on import
The following changes should not be needed anymore. We keep the advice as hint, if we receive similar problems again.
In an older version of translate5 the imported packages were store in the DB. This led to MySQL gone away errors on the import process. It was recommended to increase the config value max_allowed_packet to a higher value (about 32 - 64M).
The same was for the innodb_log_file_size, which should be increased to the same value. (At least 10x the size of the biggest sdlxliff/xlf compressed file). Also the size of innodb_buffer_pool_size was advised to be checked.
If you made some changes to the MySQL configuration, please restart the database server:
Install PHP 7.3 core
Please refresh your package list
sudo apt-get update
and install php 7.3
sudo apt-get install php7.3
Check if you have the correct version of php installed
Change PHP configuration
If you plan to upload project files bigger than 2MB, you have to change the following settings in the php.ini file.
Please edit therefore the php.ini file which should be located in /etc/php5/apache2/php.ini.
Search for the below settings and change their values to 600M to allow file uploads until 600 Megabytes.
Also consider to set the error_log configuration to get application properly logged.
Install php extensions
Install the extension dom, fileinfo, iconv, mbstring, zip, pdo_mysql,gd and curl
sudo apt-get install libapache2-mod-php7.3
php7.3-mysqlphp7.3-gd php7.3-dom php7.3-mbstring php7.3-zip php7.3-curl php7.3-intl php7.3-json
- gd with Freetype-Support
(needed by openTMStermTagger, which is used by translate5; a newer java version does not work; financial or work support to make OpenTMSTermTagger run under a newer java version is welcome )
sudo apt install openjdk-8-jdk
sudo apt-get install unzip