This manual requires a server environment, which matches the mandatory dependencies.
Table of Contents
MySQL
Translate5 needs a own database with character set utf8mb4. Connect to mysql
Code Block | ||
---|---|---|
| ||
mysql -h localhost -u root -p |
Then create the database, for example "translate5":
Code Block | ||
---|---|---|
| ||
CREATE DATABASE IF NOT EXISTS `translate5` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; |
Hostname
If you are using translate5 locally, you have to to specify a hostname for your local configuration.
Please add the following line to the /etc/hosts file, so that your browser can reach Translate5.
We assume "translate5.local" as hostname here.
Code Block | ||||
---|---|---|---|---|
| ||||
127.0.0.1 translate5.local |
Please ensure on pasting the above line, that between "127.0.0.1" and "translate5.local" is a TAB and not multiple spaces. In the latter case it is possible, that the name resolution does not work properly!
Configure translate5 apache vhost
Create the apache vhost config file
Code Block | ||
---|---|---|
| ||
sudo touch /etc/apache2/sites-available/translate5.conf
sudo chmod 660 /etc/apache2/sites-available/translate5.conf
sudo ln -s .. |
Install Zend Framework
Download the Zend Framework version currently used by translate5 from
http://www.translate5.net/downloads/Zend.zip
Unzip the file.
Move the contained folder "Zend" to "/usr/share/php". The resulting path should look like
/usr/share/php/Zend
Open your php.ini-file for editing (on Ubuntu it resides in /etc/php5/apache2/php.ini)
Look for a line starting with
;include_path = "
Uncomment it (remove the starting ";") and make sure it contains the path /usr/share/php. It should look like this:
include_path = ".:/usr/share/php"
Save the php.ini file
Configure translate5 apache vhost
Create translate5 directory
sudo mkdir /var/www/translate5
sudo chown apache:apache /var/www/translate5
Create config file
...
/sites-available/translate5.conf |
...
|
...
/etc/apache2/sites- |
...
enabled/translate5.conf |
Open Edit the config file and paste the following content to it
Code Block | ||||
---|---|---|---|---|
| ||||
<VirtualHost *:80> |
...
DocumentRoot "/var/www/translate5/public" |
...
ServerAlias translate5. |
...
local SetEnv APPLICATION_ENV application |
...
php_value include_path .:/var/www/translate5/library/zend/:/usr/share/php5:/usr/share/php <Directory "/var/www/translate5/public"> |
...
AllowOverride All |
...
Options Indexes FollowSymLinks |
...
Order allow,deny |
...
Allow from all |
...
Require all granted |
...
</Directory> |
...
</VirtualHost> |
Save the file.
If you use an already existing virtual host, please add at least the following setting:
SetEnv APPLICATION_ENV application
PHP include path in the php.ini
Check that the PHP include path contains at least "." and the PHP system paths. So should be something like:
include_path .:/usr/share/php
Since translate5 needs no change here, just use the system default in doubt.
Please be aware, that you have to check your webserver and this apache configuration regarding security, if you oppose your translate5 instance to the internet. Your security is your responsibility and can not be covered by this manual.
Install git
The easiest way to install and update translate5 with its submodules and dependencies is so use git.
sudo apt-get update
sudo apt-get install git
Install translate5
Install files from git
The public git master branch of translate5 will always contain the latest stable version of the master branch. New features may not be in the master branch for a longer time, though.
Restart apache
You have to restart apache to apply all changes made to configuration.
Code Block | ||
---|---|---|
| ||
sudo /etc/init.d/apache2 restart |
Download and install Translate5
First create a translate5 directory:
Code Block | ||
---|---|---|
| ||
sudo mkdir /var/www/translate5 |
Download the Translate5 core package from
URL has been removed here, since this path of installation is deprecated. Please go the docker-based way.
save and unzip it directly in the above directory.
Since apache must be able to create files in the translate5 directory, the permissions have to be changed:
Code Block | ||
---|---|---|
| ||
sudo chown -R www-data:www-data /var/www/translate5 |
Then run the Translate5 "installation and update" script as www-data user, follow the instructions in the script.
Code Block | ||
---|---|---|
| ||
cd /var/www/translate5 |
...
Change your user to the Linux apache user, to give the files the correct rights from the start
su apache
Get translate5
git clone https://bitbucket.org/mittagqi/translate5_released.git .
The trailing "." is important, otherwise you will get another directory inside your directory.
git submodule sync
git submodule update --init
git submodule foreach git checkout master
git submodule foreach git pull
Get the submodules of the ZfExtended library and the translate5 editor module
cd library/ZfExtended
git submodule sync
git submodule update --init
git submodule foreach git checkout master
git submodule foreach git pull
cd /var/www/translate5/application/modules/editor
git submodule sync
git submodule update --init
git submodule foreach git checkout master
git submodule foreach git pull
Import database bootstrap
Download database bootstrap from
sudo -u www-data bash ./install-and-update.sh |
In the "Translate5 Installation" step the script will ask you for the database credentials.
If your database is set up as described in configuration from scratch, then all default values can be used.
The script asks also for the virtual host hostname, this must be the same hostname as specified above for the /etc/hosts file.
The example name "translate5.local" is also the default in the script.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Checking server for updates and packages: ========================================= Downloader: Downloading Translate5 X.Y.Z from http://www.translate5.net/downloads/translate5.zip Downloader: Updated application translate5 Downloader: Downloading translate5 DB init from http://www.translate5.net/downloads/translate5-DB-init.zip Downloader: Fetched dependency translate5-DB-init Downloader: Installed dependency translate5-DB-init [... more dependency downloads ...] Translate5 Installation ======================= Please enter the MySQL database settings, the database must already exist. Default character set must be utf8. This can be done for example with the following command: CREATE DATABASE IF NOT EXISTS `translate5` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; Please enter the DB host (default: localhost): Please enter the DB username (default: root): Please enter the DB password: Please enter the DB database (default: translate5): Creating the database base layout... Translate5 tables created. DB Config successfully stored in ./application/config/installation.ini! Please enter the hostname of the virtual host which will serve Translate5 (default: translate5.local): Updating Translate5 database scheme =================================== DB Update OK New statement files: 14 Modified statement files: 21 Translate5 installation / update done. Please visit http://translate5.local/ to enjoy Translate5. In case of errors on installation / update please contact please visit http://confluence.translate5.net or post a message in translate5 user group, which is linked from http://www.translate5.net/index/ |
...
Unzip it. On the command line change to the directory with the extracted DbInit.sql
cd /path_to_your_dir/
Import the DbInit.sql to your MySQL
mysql -u root -p < DbInit.sql
Restart apache
You have to restart apache to apply all changes made to configuration.
usage/. |
Configure sending of mails in translate5
translate5 does send emails to users in different cases, e.g. when asking for a new password or on change of workflow status.
By default, sending of emails is deactivated, when using the translate5 installation-and-update-script. The reason for this is, that many users do not have an active mailserver on the machine, on which they want to test-install translate5.
If you have a mailserver running, please refer to the installation specific configuration options for information on how to configure translate5 mail sending.
Install and configure direct dependencies
Install and configure all direct dependencies to get a fully functional translate5 installation:
Page Tree | ||
---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Depending on the usage of translate5 the setup of a cronjob / task scheduler for recurring actions is needed. Therefor exists two URLs in translate5 which must be called via cron / task scheduler.
Warning |
---|
To be able to use the cron job system, the IP Address of the system which triggers the below mentioned URLs must be configured. This is done via the config "runtimeOptions.cronIP". |
Daily
The URL http://translate5.example.org/editor/cron/daily should be called once a day. This triggers some date specific workflow actions, like notification of overdued tasks or deleting of old unused tasks.
Periodical
The URL http://translate5.example.org/editor/cron/periodical should be called each 15 Minutes. Currently this some garbage collection in translate5 and the deadline reminders. If this cronjob is not configured, the clean up is triggered by each request to translate5 once in each 15 minutes. Same for deadline reminders (which means, that without a cron periodical defined in instances with low traffic it will happen, that deadline reminders are not send at all). For performance and reliability reasons the invocation via cron job should be preferred on production systems. If the periodical cron URL was called once, translate5 reconfigures itself to use always the garbage clean up via cron, the request based trigger is automatically deactivated.
Code Block | ||||
---|---|---|---|---|
| ||||
# m h dom mon dow command
30 23 * * * wget --no-verbose --content-on-error -O - https://example.translate5.net/editor/cron/daily 2>&1 | grep -iz "warn\|fehl\|failed\|error\|wrong"
*/15 * * * * wget --no-verbose --content-on-error -O - https://example.translate5.net/editor/cron/periodical 2>&1 | grep -iz "warn\|fehl\|failed\|error\|wrong"
# in the example the daily cron is called at 23:30 in late evening and the periodical each 15 minutes
# the result is filters for errors only, so that cron e-mails are sent only on failures |
...
You are done
Open your browser and
...
call http://translate5.
...
local (or whatever hostname you have configured) and have fun with translate5.
Remove demo users from login page
For convenience of demo installations the default translate5 demo users are displayed at the login page.
To remove this go to /client-specific/views/default/scripts/login/index.phtml and remove the HTML that displays these users (or delete the index.phtml file completely).