Table of Contents | ||
---|---|---|
|
Info |
---|
You |
...
can skip the steps on this |
...
page, if your environment matches the |
...
following dependencies. In this case continue with "Installing translate5") |
The setup requires root access privileges. You need to open the command line and enter the listed commands. After each command press ENTER.
Set locale
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.
Install Apache
sudo apt-get install apache2
...
Anchor | ||||
---|---|---|---|---|
|
...
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:
innodb_ft_min_token_size=1
After changing this values the indexes must be rebuild:
Rebuild the index if you just changed some of the above settings:
Code Block | ||
---|---|---|
| ||
set GLOBAL innodb_optimize_fulltext_only=ON;
OPTIMIZE TABLE terms_term; |
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!
Timezone
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:
Code Block |
---|
SELECT @@global.time_zone, @@session.time_zone;
-- or more easier to read:
SELECT TIME_FORMAT(TIMEDIFF(utc_timestamp(), NOW()), '%H:%i') gmtshift; |
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
...
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.
...
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.
Increase innodb_buffer_pool_size
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
See also here and https://stackoverflow.com/questions/6901108/the-total-number-of-locks-exceeds-the-lock-table-size
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 It is also recommended to increase the config value max_allowed_packet to a higher value (about 32 - 64M) if you try to import bigger files, especially when you receive MySQL gone away errors on import..
The same was for the Also increase innodb_log_file_size, which should be increased to the same value. (at At least 10x the size of the biggest sdlxliff/xlf compressed file) file. Check also Also the size of innodb_buffer_pool_size .Best solution would be TRANSLATE-636: remove Skeletonfiles from DBwas advised to be checked.
Restart MySQL
If you made some changes to the MySQL configuration, please restart the database server:
/etc/init.d/mysql restart
Install
...
PHP 8.0 core
Please refresh your package list, the package names may be different, but it must be at least PHP 8.0.X at the moment.
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
and install php 58.60
sudo apt-get install php5php8.60
Check if you have the correct version of php installed
...
Code Block | ||||
---|---|---|---|---|
| ||||
post_max_size=600M upload_max_filesize=600M memory_limit=1024M #or higher, if possible for production instances and large files in imports to be on the save side max_execution_time=3600 #for production instances and large files in imports to be on the save side |
...
Install the extension dom, fileinfo, iconv, mbstring, zip, pdo_mysql,gd and gd curl
sudo apt-get install libapache2-mod-php5php8.60
php5php8.60-mysql
php5php8.60-gd php5php8.60-dom php5php8.60-mbstring php5.6-zip
...
php8.0-zip php8.0-curl php8.0-intl php8.0-json
- dom
- fileinfo
- gd with Freetype-Support
- iconv
- mbstring
- pdo_mysql
- zip
- curl
- xml
- intl
- json
- opcache
- soap
- sqlite3
Install openjdk-8-jdk
(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
Install unzip
...
sudo apt-get install
...
unzip