(you can skip this step, if your environment matches the above 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.
Install Apache
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
cd /etc/apache2
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.
Install MySQL
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:
mysql>
Leave mysql shell prompt with
exit;
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.
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 = "NO_AUTO_CREATE_USER,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.
MySQL gone away errors on import
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.
Also increase innodb_log_file_size to the same value.
Restart MySQL
If you made some changes to the MySQL configuration, please restart the database server:
/etc/init.d/mysql restart
Install PHP5 core
Please refresh your package list
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
and install php 5.6
sudo apt-get install php5.6
Check if you have the correct version of php installed
php -v
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.
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
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 and gd
sudo apt-get install libapache2-mod-php5.6
php5.6-mysql
php5.6-gd php5.6-dom php5.6-mbstring php5.6-zip
Install Oracle Java
(needed by openTMStermTagger, which is used by translate5)
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer