Version at: 15/03/2014, 20:38 vs. version at: 16/03/2014, 02:54
11#How to Prepare a Development Environment for Tatoeba Using a Pre-made Virtual Machine
22
33## Installing the VM
44* Grab the vm file [http://mirrors.bouah.net/pub/tatoeba/Tatovm/](http://mirrors.bouah.net/pub/tatoeba/Tatovm/)
55
66* Untar the file:
77
88 On Windows: use 7zip [http://www.7-zip.org/]
99
1010 On Linux: use file-roller or from the terminal, type:
1111
1212 tar -xvf vmfile
1313
1414* Get and install VirtualBox [https://www.virtualbox.org/wiki/Downloads]
1515
1616* Load the VM files in VirtualBox:
1717
1818 From the GUI: Machine -> Add then browse to the location of the .vbox file
1919
2020 From the command line: VBoxManage registervm /path/to/vm.vbox
2121
2222## Accessing the VM
2323* The default http port is 8080 and the default SSH port is 4242.
2424
2525* To SSH into the machine, use the username **tatoeba** and password **tatoeba**:
2626
2727 ssh -p 4242 tatoeba@127.0.0.1
2828
2929* Now you can see the website running in your browser by pointing it to the following address:
3030
3131 127.0.0.1:8080
3232
3333* Steps such as installing packages require superuser privileges. Prior to such steps, execute:
3434
3535 su -
3636
3737 Type in the password **tatovm** when prompted.
3838
3939 After performing your operation, execute "exit" to end superuser access.
4040
4141* The MySQL user is **root** and password is **tatoeba** in case you need to do operations directly on the table or import more data.
4242
4343
4444##Performing Additional Configuration Steps
4545
4646These steps will eventually be folded into a new VM, but for now, they must be performed after the VM is installed.
4747
4848* The current VM was assembled shortly before we made the transition from a Subversion repository on Assembla to a Git repository on GitHub, so execute the following steps to update your code from the new repository:
4949
5050 * Install the git package if "which git" does not show you that you already have it installed. This requires superuser privileges.
5151
5252 * Rename /var/http/tatoeba to /var/http/tatoeba-bak .
5353
5454 * In the /var/http directory, pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2) as follows:
5555
5656 git clone https://github.com/Tatoeba/tatoeba2.git /var/http/tatoeba
5757
5858 * Your new directory /var/http/tatoeba should have the same directory structure as the old /var/http/tatoeba-bak. You can now delete /var/http/tatoeba-bak .
5959
6060* Execute SQL scripts as follows:
6161
6262 mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-05-31.sql
6363
6464 mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-08-13.sql
6565
6666 mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/scripts/create_fill_langStats.sql
6767
6868* You may find it useful at this point to back up your databases so that you can return them to their virgin state. Make a directory (for instance, /backup ; this may require root permission) and then execute a command such as this one:
6969
7070 mysqldump -u root -ptatoeba -A > /backup/all_dbs.sql
7171
7272* Install curl using these commands (which will require superuser permissions, so you'll need to use "su -" beforehand and "exit" afterwards):
7373
7474 apt-get update
7575
7676 apt-get install php5-curl
7777
7878* As root, install poedit and bzr for use with UI translations stored on Launchpad (which uses a Bazaar repository):
7979
8080 apt-get install poedit
81
8182 apt-get install bzr
8283
8384* Optional: add the following to .bashrc:
8485
8586 export TERM=xterm-256color
8687
8788## Customizing Your Installation
8889* There are three ways to access the codebase via your favorite editor in the comfort of your host computer:
8990
9091 * Mount a drive over SSH:
9192
9293 * On Windows: download NetDrive [www.netdrive.net] and use the aforementioned credentials and port
9394
9495 * On Linux: install SSHFS and then mount it using:
9596
9697 sshfs tatoeba@127.0.0.1:4242 /path/to/mountpoint
9798
9899 * Mount a drive over WebDAV:
99100
100101 * On Windows: use NetDrive. The user and password are **tatoeba**, and the port is 8080.
101102
102103 * On Linux: use your favorite file manager with WebDAV support, or install cadaver and connect using the above credentials.
103104
104105 * Mount a shared file (slow and not recommended):
105106
106107 * Set up Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions]
107108
108109 * In the GUI select Devices -> Shared Folders -> Add
109110
110111 * Browse to the folder you want to share from your host and select it
111112
112113 * Select the Make permanent option
113114
114115 * Now mount the shared file on the guest system:
115116
116117 mount -t vboxfs /media/sharefoldername /path/to/mountpoint
117118
118119* You can also install a graphical environment (GNOME or any other development environment) to work directly from the VM:
119120
120121 apt-get install task-gnome-desktop
121122
122123##Logging Into Tatoeba on the VM
123124
124125The users provided by default are:
125126
126127 admin
127128 corpus_maintainer
128129 advanced_contributor
129130 contributor
130131 inactive
131132 spammer
132133
133134The default password for each user is '123456'.
134135
135136In addition, you can register new users.
diff view generated by jsdifflib

Version at: 15/03/2014, 20:38

#How to Prepare a Development Environment for Tatoeba Using a Pre-made Virtual Machine

## Installing the VM
* Grab the vm file [http://mirrors.bouah.net/pub/tatoeba/Tatovm/](http://mirrors.bouah.net/pub/tatoeba/Tatovm/)

* Untar the file:

   On Windows: use 7zip [http://www.7-zip.org/]

   On Linux: use file-roller or from the terminal, type:

   tar -xvf vmfile

* Get and install VirtualBox [https://www.virtualbox.org/wiki/Downloads]

* Load the VM files in VirtualBox:

  From the GUI: Machine -> Add then browse to the location of the .vbox file

  From the command line: VBoxManage registervm /path/to/vm.vbox

## Accessing the VM
* The default http port is 8080 and the default SSH port is 4242.

* To SSH into the machine, use the username **tatoeba** and password **tatoeba**:

   ssh -p 4242 tatoeba@127.0.0.1

* Now you can see the website running in your browser by pointing it to the following address:

   127.0.0.1:8080

* Steps such as installing packages require superuser privileges. Prior to such steps, execute:

   su -   

   Type in the password **tatovm** when prompted.

   After performing your operation, execute "exit" to end superuser access.

* The MySQL user is **root** and password is **tatoeba** in case you need to do operations directly on the table or import more data.


##Performing Additional Configuration Steps

These steps will eventually be folded into a new VM, but for now, they must be performed after the VM is installed. 

* The current VM was assembled shortly before we made the transition from a Subversion repository on Assembla to a Git repository on GitHub, so execute the following steps to update your code from the new repository:

    * Install the git package if "which git" does not show you that you already have it installed. This requires superuser privileges.

    * Rename /var/http/tatoeba to /var/http/tatoeba-bak .
 
    * In the /var/http directory, pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2) as follows:

    git clone https://github.com/Tatoeba/tatoeba2.git /var/http/tatoeba
 
    * Your new directory /var/http/tatoeba should have the same directory structure as the old /var/http/tatoeba-bak. You can now delete /var/http/tatoeba-bak .

* Execute SQL scripts as follows:

    mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-05-31.sql

    mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-08-13.sql

    mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/scripts/create_fill_langStats.sql

* You may find it useful at this point to back up your databases so that you can return them to their virgin state. Make a directory (for instance, /backup ; this may require root permission) and then execute a command such as this one:

    mysqldump -u root -ptatoeba -A > /backup/all_dbs.sql

* Install curl using these commands (which will require superuser permissions, so you'll need to use "su -" beforehand and "exit" afterwards):
    
    apt-get update

    apt-get install php5-curl

* As root, install poedit and bzr for use with UI translations stored on Launchpad (which uses a Bazaar repository):

    apt-get install poedit
    apt-get install bzr

* Optional: add the following to .bashrc:

    export TERM=xterm-256color
 
## Customizing Your Installation
* There are three ways to access the codebase via your favorite editor in the comfort of your host computer:

   * Mount a drive over SSH:

       * On Windows: download NetDrive [www.netdrive.net] and use the aforementioned credentials and port

       * On Linux: install SSHFS and then mount it using:

       sshfs tatoeba@127.0.0.1:4242 /path/to/mountpoint

    * Mount a drive over WebDAV:

        * On Windows: use NetDrive. The user and password are **tatoeba**, and the port is 8080.

        * On Linux: use your favorite file manager with WebDAV support, or install cadaver and connect using the above credentials.

    * Mount a shared file (slow and not recommended):

        * Set up Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions]

        * In the GUI select Devices -> Shared Folders -> Add

        * Browse to the folder you want to share from your host and select it

        * Select the Make permanent option

        * Now mount the shared file on the guest system:

       mount -t vboxfs /media/sharefoldername /path/to/mountpoint

* You can also install a graphical environment (GNOME or any other development environment) to work directly from the VM:

  apt-get install task-gnome-desktop

##Logging Into Tatoeba on the VM

The users provided by default are:

    admin
    corpus_maintainer
    advanced_contributor
    contributor
    inactive
    spammer

The default password for each user is '123456'.

In addition, you can register new users.

version at: 16/03/2014, 02:54

#How to Prepare a Development Environment for Tatoeba Using a Pre-made Virtual Machine

## Installing the VM
* Grab the vm file [http://mirrors.bouah.net/pub/tatoeba/Tatovm/](http://mirrors.bouah.net/pub/tatoeba/Tatovm/)

* Untar the file:

   On Windows: use 7zip [http://www.7-zip.org/]

   On Linux: use file-roller or from the terminal, type:

   tar -xvf vmfile

* Get and install VirtualBox [https://www.virtualbox.org/wiki/Downloads]

* Load the VM files in VirtualBox:

  From the GUI: Machine -> Add then browse to the location of the .vbox file

  From the command line: VBoxManage registervm /path/to/vm.vbox

## Accessing the VM
* The default http port is 8080 and the default SSH port is 4242.

* To SSH into the machine, use the username **tatoeba** and password **tatoeba**:

   ssh -p 4242 tatoeba@127.0.0.1

* Now you can see the website running in your browser by pointing it to the following address:

   127.0.0.1:8080

* Steps such as installing packages require superuser privileges. Prior to such steps, execute:

   su -   

   Type in the password **tatovm** when prompted.

   After performing your operation, execute "exit" to end superuser access.

* The MySQL user is **root** and password is **tatoeba** in case you need to do operations directly on the table or import more data.


##Performing Additional Configuration Steps

These steps will eventually be folded into a new VM, but for now, they must be performed after the VM is installed. 

* The current VM was assembled shortly before we made the transition from a Subversion repository on Assembla to a Git repository on GitHub, so execute the following steps to update your code from the new repository:

    * Install the git package if "which git" does not show you that you already have it installed. This requires superuser privileges.

    * Rename /var/http/tatoeba to /var/http/tatoeba-bak .
 
    * In the /var/http directory, pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2) as follows:

    git clone https://github.com/Tatoeba/tatoeba2.git /var/http/tatoeba
 
    * Your new directory /var/http/tatoeba should have the same directory structure as the old /var/http/tatoeba-bak. You can now delete /var/http/tatoeba-bak .

* Execute SQL scripts as follows:

    mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-05-31.sql

    mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-08-13.sql

    mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/scripts/create_fill_langStats.sql

* You may find it useful at this point to back up your databases so that you can return them to their virgin state. Make a directory (for instance, /backup ; this may require root permission) and then execute a command such as this one:

    mysqldump -u root -ptatoeba -A > /backup/all_dbs.sql

* Install curl using these commands (which will require superuser permissions, so you'll need to use "su -" beforehand and "exit" afterwards):
    
    apt-get update

    apt-get install php5-curl

* As root, install poedit and bzr for use with UI translations stored on Launchpad (which uses a Bazaar repository):

    apt-get install poedit

    apt-get install bzr

* Optional: add the following to .bashrc:

    export TERM=xterm-256color
 
## Customizing Your Installation
* There are three ways to access the codebase via your favorite editor in the comfort of your host computer:

   * Mount a drive over SSH:

       * On Windows: download NetDrive [www.netdrive.net] and use the aforementioned credentials and port

       * On Linux: install SSHFS and then mount it using:

       sshfs tatoeba@127.0.0.1:4242 /path/to/mountpoint

    * Mount a drive over WebDAV:

        * On Windows: use NetDrive. The user and password are **tatoeba**, and the port is 8080.

        * On Linux: use your favorite file manager with WebDAV support, or install cadaver and connect using the above credentials.

    * Mount a shared file (slow and not recommended):

        * Set up Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions]

        * In the GUI select Devices -> Shared Folders -> Add

        * Browse to the folder you want to share from your host and select it

        * Select the Make permanent option

        * Now mount the shared file on the guest system:

       mount -t vboxfs /media/sharefoldername /path/to/mountpoint

* You can also install a graphical environment (GNOME or any other development environment) to work directly from the VM:

  apt-get install task-gnome-desktop

##Logging Into Tatoeba on the VM

The users provided by default are:

    admin
    corpus_maintainer
    advanced_contributor
    contributor
    inactive
    spammer

The default password for each user is '123456'.

In addition, you can register new users.

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.