Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel4

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

...

Apache web server needs to be fine tuned for translate5 to work properly. Switch to Apache directory with

cd /etc/apache2

...

and enter these commands to enable required Apache submodules

...

Anchor
mysqlconfig
mysqlconfig
MySQL configuration

...

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
languagesql
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

...

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.

...

Solution is here:

  • edit /etc/my.cnf
  • add / change the line
    innodb_buffer_pool_size=64MB512MB    # 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
languagetext
title/etc/php/php57.3/apache2/php.ini
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 curl

sudo apt-get install libapache2-mod-php5php8.60 php5php8.60-mysql php5php8.60-gd php5php8.60-dom php5php8.60-mbstring php5php8.60-zip php5.6-curl

...

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; Oracle Java 10 a newer java version does not work; financial or work support to make OpenTMSTermTagger run under Oracle Java 10 a newer java version is welcome )

sudo

...

apt install openjdk-

...

8-jdk


Install unzip

...

sudo apt-get install 

...

unzip