Version at: 16/03/2014, 02:54 vs. version at: 16/03/2014, 17:39
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
8 On Windows: use 7zip [http://www.7-zip.org/]
8 * On Windows:
99
10 On Linux: use file-roller or from the terminal, type:
10 * Download both the vbox and the gz file
11
12 * Use 7zip [http://www.7-zip.org/] to extract Tatovm.vmdk file from the gz file (using the "Extract here" item from the right-click menu)
13
14 * On Linux: use file-roller or from the terminal, type:
1115
1216 tar -xvf vmfile
1317
1418* Get and install VirtualBox [https://www.virtualbox.org/wiki/Downloads]
1519
1620* Load the VM files in VirtualBox:
1721
1822 From the GUI: Machine -> Add then browse to the location of the .vbox file
1923
2024 From the command line: VBoxManage registervm /path/to/vm.vbox
2125
2226## Accessing the VM
2327* The default http port is 8080 and the default SSH port is 4242.
2428
2529* To SSH into the machine, use the username **tatoeba** and password **tatoeba**:
2630
2731 ssh -p 4242 tatoeba@127.0.0.1
2832
2933* Now you can see the website running in your browser by pointing it to the following address:
3034
3135 127.0.0.1:8080
3236
3337* Steps such as installing packages require superuser privileges. Prior to such steps, execute:
3438
3539 su -
3640
3741 Type in the password **tatovm** when prompted.
3842
3943 After performing your operation, execute "exit" to end superuser access.
4044
4145* The MySQL user is **root** and password is **tatoeba** in case you need to do operations directly on the table or import more data.
4246
4347
4448##Performing Additional Configuration Steps
4549
4650These steps will eventually be folded into a new VM, but for now, they must be performed after the VM is installed.
4751
4852* 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:
4953
5054 * Install the git package if "which git" does not show you that you already have it installed. This requires superuser privileges.
5155
5256 * Rename /var/http/tatoeba to /var/http/tatoeba-bak .
5357
5458 * In the /var/http directory, pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2) as follows:
5559
5660 git clone https://github.com/Tatoeba/tatoeba2.git /var/http/tatoeba
5761
5862 * 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 .
5963
6064* Execute SQL scripts as follows:
6165
6266 mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-05-31.sql
6367
6468 mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-08-13.sql
6569
6670 mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/scripts/create_fill_langStats.sql
6771
6872* 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:
6973
7074 mysqldump -u root -ptatoeba -A > /backup/all_dbs.sql
7175
7276* Install curl using these commands (which will require superuser permissions, so you'll need to use "su -" beforehand and "exit" afterwards):
7377
7478 apt-get update
7579
7680 apt-get install php5-curl
7781
7882* As root, install poedit and bzr for use with UI translations stored on Launchpad (which uses a Bazaar repository):
7983
8084 apt-get install poedit
8185
8286 apt-get install bzr
8387
8488* Optional: add the following to .bashrc:
8589
8690 export TERM=xterm-256color
8791
8892## Customizing Your Installation
8993* There are three ways to access the codebase via your favorite editor in the comfort of your host computer:
9094
9195 * Mount a drive over SSH:
9296
9397 * On Windows: download NetDrive [www.netdrive.net] and use the aforementioned credentials and port
9498
9599 * On Linux: install SSHFS and then mount it using:
96100
97101 sshfs tatoeba@127.0.0.1:4242 /path/to/mountpoint
98102
99103 * Mount a drive over WebDAV:
100104
101105 * On Windows: use NetDrive. The user and password are **tatoeba**, and the port is 8080.
102106
103107 * On Linux: use your favorite file manager with WebDAV support, or install cadaver and connect using the above credentials.
104108
105109 * Mount a shared file (slow and not recommended):
106110
107111 * Set up Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions]
108112
109113 * In the GUI select Devices -> Shared Folders -> Add
110114
111115 * Browse to the folder you want to share from your host and select it
112116
113117 * Select the Make permanent option
114118
115119 * Now mount the shared file on the guest system:
116120
117121 mount -t vboxfs /media/sharefoldername /path/to/mountpoint
118122
119123* You can also install a graphical environment (GNOME or any other development environment) to work directly from the VM:
120124
121125 apt-get install task-gnome-desktop
122126
123127##Logging Into Tatoeba on the VM
124128
125129The users provided by default are:
126130
127131 admin
128132 corpus_maintainer
129133 advanced_contributor
130134 contributor
131135 inactive
132136 spammer
133137
134138The default password for each user is '123456'.
135139
136140In addition, you can register new users.
diff view generated by jsdifflib

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.

version at: 16/03/2014, 17:39

#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: 

        * Download both the vbox and the gz file

        * Use 7zip [http://www.7-zip.org/] to extract Tatovm.vmdk file from the gz file (using the "Extract here" item from the right-click menu)

   * 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.