Version at: 13/04/2013, 14:04 vs. version at: 13/04/2013, 14:45
11NOTE: This is about installing the PHP version (i.e. current version) of Tatoeba.
22
33# Downloads
44
55## Required tools
66
77* Apache
88* PHP
99* MySQL
1010* SVN Client
1111
1212For those who are on Windows:
1313
1414* [XAMPP](http://www.apachefriends.org/en/xampp-windows.html) will do the trick for Apache/PHP/MySQL.
1515* [TortoiseSVN](http://tortoisesvn.net/downloads.html) for the SVN client
1616
1717## Source code
1818
1919The source code is hosted on a platform called Assembla:
2020[https://www.assembla.com/code/tatoeba2/subversion/nodes](https://www.assembla.com/code/tatoeba2/subversion/nodes)
2121
2222Repository URL:
2323[https://subversion.assembla.com/svn/tatoeba2/](https://subversion.assembla.com/svn/tatoeba2/)
2424
2525URL you'll want to checkout:
2626[https://subversion.assembla.com/svn/tatoeba2/trunk/](https://subversion.assembla.com/svn/tatoeba2/trunk/)
2727
2828
2929# Configuration
3030
3131## Virtual host
3232
3333You may set up a virtual host. I personally use http://tatoeba.dev/ as my local URL.
3434
3535To find out how to set up a virtual host on a Macintosh using XAMPP see the following page.
3636
3737[http://f6design.com/journal/2012/03/11/configuring-virtualhosts-in-xampp-on-mac/]
3838
3939
4040**TODO** More details on how to do that.
4141
4242
4343## mod_rewrite
4444
4545You need to have mod_rewrite enabled, it's necessary for CakePHP.
4646
4747**TODO** More details on how to do that.
4848
4949
5050## app/config/core.php
5151
5252In the file `app/config/core.php`, put into comments the part about XCache.
5353
5454 /*
5555 Cache::config('default', array(
5656 'engine' => 'Xcache', //[required]
5757 'duration'=> 3600, //[optional]
5858 'probability'=> 100, //[optional]
5959 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
6060 'user' => 'user', //user from xcache.admin.user settings
6161 'password' => 'password', //plaintext password (xcache.admin.pass)
6262 ));
6363 Cache::config('_cake_core_', array(
6464 'engine' => 'Xcache', //[required]
6565 'duration'=> 3600, //[optional]
6666 'probability'=> 100, //[optional]
6767 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
6868 'user' => 'user', //user from xcache.admin.user settings
6969 'password' => 'password', //plaintext password (xcache.admin.pass)
7070 ));
7171 */
7272
7373And uncomment the line to use the "File" cache engine:
7474
7575`Cache::config('default', array('engine' => 'File'));`
7676
7777
7878
7979## app/config/database.php
8080
8181In the file `app/config/database.php`, set your login, password and database in the $default array.
8282
8383 var $default = array(
8484 'driver' => 'mysql',
8585 'persistent' => false,
8686 'host' => 'localhost',
8787 'login' => 'root',
8888 'password' => 'somepassword',
8989 'database' => 'tatoeba',
9090 'prefix' => '',
9191 'encoding' => 'utf8'
9292 );
9393
9494
9595## app/models/sentence.php
9696
9797Tatoeba uses some other external tools that you won't necessarily need. These tools are:
9898
9999* the search engine (Sphinx)
100100* the tools for romanization
101101
102102If you're not going to work on the search or on the romanization and don't want to install these tools, you will have to uncomment a few things in the Sentence model (`app/models/sentence.php`).
103103
104104line 274: uncomment "return array(1)"
105105
106106 public function getSeveralRandomIds($lang = 'und', $numberOfIdWanted = 10)
107107 {
108108 // Uncomment the line below if you don't have sphinx installed.
109109 return array(1);`
110110
111111line 847: uncomment "return false"
112112
113113 public function generateMetas(&$sentenceArray)
114114 {
115115 // Uncomment the line below you don't have the Chinese
116116 // romanization tools installed.
117117 return false;`
118118    
119119## Make the following directory writable.
120120
121121/app/tmp/cache/
122
123## For XAMPP (at least on a Mac)
124
125You'll need to up the default thread_stack from 64K to 256K.
126(I tried 128K, but that wasn't enough.)
127
128/Applications/XAMPP/xamppfiles/etc/my.cnf
129
130thread_stack = 256K
122131
123132
124133# Database
125134
126135Now you need to create the database, and import the necessary things. The scripts you will need are in the `docs/database` folder.
127136
128137First, create the database. Make sure the name you use here is the name you've set in app/core/database.php. I'll name it `tatoeba`.
129138
130139 CREATE DATABASE tatoeba
131140 USE tatoeba
132141
133142Then execute the following scripts.
134143
1351441. This will create all the tables (they will be empty).
136145
137146 \. docs/database/database_20130406.sql
138147
1391482. These will create a minimal user base (one user in each group), and the associated access rights for each user.
140149
141150 \. docs/database/import/groups.sql
142151 \. docs/database/import/users.sql
143152 \. docs/database/import/acos.sql
144153 \. docs/database/import/aros.sql
145154 \. docs/database/import/aros_acos.sql
146155
1471563. This will import the list of countries. It's used in profile.
148157
149158 \. docs/database/import/countries.sql
150159
151160**TODO** Would probably be nice to have some data for sentences, comments, wall messages as well. Although they can be created manually once logged in.
152161
153162
154163
155164
156165# Logging in
157166
158167Now you should be able to go to your local Tatoeba URL (http://tatoeba.dev/ in my case), and be able to log in.
159168
160169The default usernames are:
161170
162171* admin
163172* corpus_maintainer
164173* advanced_contributor
165174* contributor
166175* inactive
167176* spammer
168177
169178The default password for each user is '123456'.
diff view generated by jsdifflib

Version at: 13/04/2013, 14:04

NOTE: This is about installing the PHP version (i.e. current version) of Tatoeba.

# Downloads

## Required tools

* Apache
* PHP
* MySQL
* SVN Client

For those who are on Windows:

* [XAMPP](http://www.apachefriends.org/en/xampp-windows.html) will do the trick for Apache/PHP/MySQL.
* [TortoiseSVN](http://tortoisesvn.net/downloads.html) for the SVN client

## Source code

The source code is hosted on a platform called Assembla:
[https://www.assembla.com/code/tatoeba2/subversion/nodes](https://www.assembla.com/code/tatoeba2/subversion/nodes)

Repository URL:
[https://subversion.assembla.com/svn/tatoeba2/](https://subversion.assembla.com/svn/tatoeba2/)

URL you'll want to checkout:
[https://subversion.assembla.com/svn/tatoeba2/trunk/](https://subversion.assembla.com/svn/tatoeba2/trunk/)


# Configuration

## Virtual host

You may set up a virtual host. I personally use http://tatoeba.dev/ as my local URL.

To find out how to set up a virtual host on a Macintosh using XAMPP see the following page.

[http://f6design.com/journal/2012/03/11/configuring-virtualhosts-in-xampp-on-mac/]


**TODO** More details on how to do that.


## mod_rewrite

You need to have mod_rewrite enabled, it's necessary for CakePHP.

**TODO** More details on how to do that.


## app/config/core.php

In the file `app/config/core.php`, put into comments the part about XCache.

    /*
    Cache::config('default', array(
        'engine' => 'Xcache', //[required]
        'duration'=> 3600, //[optional]
        'probability'=> 100, //[optional]
        'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
        'user' => 'user', //user from xcache.admin.user settings
        'password' => 'password', //plaintext password (xcache.admin.pass)
    ));
    Cache::config('_cake_core_', array(
        'engine' => 'Xcache', //[required]
        'duration'=> 3600, //[optional]
        'probability'=> 100, //[optional]
        'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
        'user' => 'user', //user from xcache.admin.user settings
        'password' => 'password', //plaintext password (xcache.admin.pass)
    ));
    */

And uncomment the line to use the "File" cache engine:

`Cache::config('default', array('engine' => 'File'));`



## app/config/database.php

In the file `app/config/database.php`, set your login, password and database in the $default array.

    var $default = array(
        'driver' => 'mysql',
        'persistent' => false,
        'host' => 'localhost',
        'login' => 'root',
        'password' => 'somepassword',
        'database' => 'tatoeba',
        'prefix' => '',
        'encoding' => 'utf8'
    );


## app/models/sentence.php

Tatoeba uses some other external tools that you won't necessarily need. These tools are:

* the search engine (Sphinx)
* the tools for romanization

If you're not going to work on the search or on the romanization and don't want to install these tools, you will have to uncomment a few things in the Sentence model (`app/models/sentence.php`).

line 274: uncomment "return array(1)"

    public function getSeveralRandomIds($lang = 'und',  $numberOfIdWanted = 10)
    {
        // Uncomment the line below if you don't have sphinx installed.
        return array(1);`

line 847: uncomment "return false"

    public function generateMetas(&$sentenceArray) 
    {
        // Uncomment the line below you don't have the Chinese
        // romanization tools installed.
        return false;`
	
## Make the following directory writable.

/app/tmp/cache/


# Database

Now you need to create the database, and import the necessary things. The scripts you will need are in the `docs/database` folder.

First, create the database. Make sure the name you use here is the name you've set in app/core/database.php. I'll name it `tatoeba`.

    CREATE DATABASE tatoeba
    USE tatoeba

Then execute the following scripts.

1. This will create all the tables (they will be empty).

        \. docs/database/database_20130406.sql

2. These will create a minimal user base (one user in each group), and the associated access rights for each user.

        \. docs/database/import/groups.sql
        \. docs/database/import/users.sql
        \. docs/database/import/acos.sql
        \. docs/database/import/aros.sql
        \. docs/database/import/aros_acos.sql

3. This will import the list of countries. It's used in profile.

        \. docs/database/import/countries.sql

**TODO** Would probably be nice to have some data for sentences, comments, wall messages as well. Although they can be created manually once logged in.




# Logging in

Now you should be able to go to your local Tatoeba URL (http://tatoeba.dev/ in my case), and be able to log in.

The default usernames are: 

* admin
* corpus_maintainer
* advanced_contributor
* contributor
* inactive
* spammer

The default password for each user is '123456'.

version at: 13/04/2013, 14:45

NOTE: This is about installing the PHP version (i.e. current version) of Tatoeba.

# Downloads

## Required tools

* Apache
* PHP
* MySQL
* SVN Client

For those who are on Windows:

* [XAMPP](http://www.apachefriends.org/en/xampp-windows.html) will do the trick for Apache/PHP/MySQL.
* [TortoiseSVN](http://tortoisesvn.net/downloads.html) for the SVN client

## Source code

The source code is hosted on a platform called Assembla:
[https://www.assembla.com/code/tatoeba2/subversion/nodes](https://www.assembla.com/code/tatoeba2/subversion/nodes)

Repository URL:
[https://subversion.assembla.com/svn/tatoeba2/](https://subversion.assembla.com/svn/tatoeba2/)

URL you'll want to checkout:
[https://subversion.assembla.com/svn/tatoeba2/trunk/](https://subversion.assembla.com/svn/tatoeba2/trunk/)


# Configuration

## Virtual host

You may set up a virtual host. I personally use http://tatoeba.dev/ as my local URL.

To find out how to set up a virtual host on a Macintosh using XAMPP see the following page.

[http://f6design.com/journal/2012/03/11/configuring-virtualhosts-in-xampp-on-mac/]


**TODO** More details on how to do that.


## mod_rewrite

You need to have mod_rewrite enabled, it's necessary for CakePHP.

**TODO** More details on how to do that.


## app/config/core.php

In the file `app/config/core.php`, put into comments the part about XCache.

    /*
    Cache::config('default', array(
        'engine' => 'Xcache', //[required]
        'duration'=> 3600, //[optional]
        'probability'=> 100, //[optional]
        'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
        'user' => 'user', //user from xcache.admin.user settings
        'password' => 'password', //plaintext password (xcache.admin.pass)
    ));
    Cache::config('_cake_core_', array(
        'engine' => 'Xcache', //[required]
        'duration'=> 3600, //[optional]
        'probability'=> 100, //[optional]
        'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
        'user' => 'user', //user from xcache.admin.user settings
        'password' => 'password', //plaintext password (xcache.admin.pass)
    ));
    */

And uncomment the line to use the "File" cache engine:

`Cache::config('default', array('engine' => 'File'));`



## app/config/database.php

In the file `app/config/database.php`, set your login, password and database in the $default array.

    var $default = array(
        'driver' => 'mysql',
        'persistent' => false,
        'host' => 'localhost',
        'login' => 'root',
        'password' => 'somepassword',
        'database' => 'tatoeba',
        'prefix' => '',
        'encoding' => 'utf8'
    );


## app/models/sentence.php

Tatoeba uses some other external tools that you won't necessarily need. These tools are:

* the search engine (Sphinx)
* the tools for romanization

If you're not going to work on the search or on the romanization and don't want to install these tools, you will have to uncomment a few things in the Sentence model (`app/models/sentence.php`).

line 274: uncomment "return array(1)"

    public function getSeveralRandomIds($lang = 'und',  $numberOfIdWanted = 10)
    {
        // Uncomment the line below if you don't have sphinx installed.
        return array(1);`

line 847: uncomment "return false"

    public function generateMetas(&$sentenceArray) 
    {
        // Uncomment the line below you don't have the Chinese
        // romanization tools installed.
        return false;`
	
## Make the following directory writable.

/app/tmp/cache/

## For XAMPP (at least on a Mac)

You'll need to up the default thread_stack from 64K to 256K.
(I tried 128K, but that wasn't enough.)

/Applications/XAMPP/xamppfiles/etc/my.cnf

thread_stack = 256K


# Database

Now you need to create the database, and import the necessary things. The scripts you will need are in the `docs/database` folder.

First, create the database. Make sure the name you use here is the name you've set in app/core/database.php. I'll name it `tatoeba`.

    CREATE DATABASE tatoeba
    USE tatoeba

Then execute the following scripts.

1. This will create all the tables (they will be empty).

        \. docs/database/database_20130406.sql

2. These will create a minimal user base (one user in each group), and the associated access rights for each user.

        \. docs/database/import/groups.sql
        \. docs/database/import/users.sql
        \. docs/database/import/acos.sql
        \. docs/database/import/aros.sql
        \. docs/database/import/aros_acos.sql

3. This will import the list of countries. It's used in profile.

        \. docs/database/import/countries.sql

**TODO** Would probably be nice to have some data for sentences, comments, wall messages as well. Although they can be created manually once logged in.




# Logging in

Now you should be able to go to your local Tatoeba URL (http://tatoeba.dev/ in my case), and be able to log in.

The default usernames are: 

* admin
* corpus_maintainer
* advanced_contributor
* contributor
* inactive
* spammer

The default password for each user is '123456'.

Note

The lines in green are the lines that have been added in the new version. The lines in red are those that have been removed.