Version at: 13/02/2015, 06:34 vs. version at: 13/02/2015, 06:34
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:
55
66 [Mirror 1](http://www.aloneonmars.info/public/lool0/Tatovm/) |
77 [Torrent(mirror 1)](http://www.aloneonmars.info/public/lool0/Tatovm/Tatovm.torrent) |
88 [Magnet link](https://dl.dropboxusercontent.com/u/3186185/magnet.html)
99
1010 [Mirror 2](https://mirrors.bouah.net/pub/tatoeba/Tatovm/) |
1111 [Torrent(mirror2)](https://mirrors.bouah.net/pub/tatoeba/Tatovm/Tatovm.torrent)
12
13(https certificate sha1 fingerprint:
12 (https certificate sha1 fingerprint:
141355:70:43:DD:4E:90:71:10:A8:B4:16:23:F6:B5:46:EF:6B:33:B1:C2)
1514
1615
1716* Untar the file:
1817
1918 * On Windows:
2019
2120 * Download both the vbox and the xz file
2221
2322 * Use [7zip](http://www.7-zip.org/) to extract Tatovm.vmdk file from the xz file (using the "Extract here" item from the right-click menu)
2423
2524 * On Linux: use file-roller or from the terminal, type:
2625
2726 xz -d Tatovm.vmdk.xz
2827
2928### Using VirtualBox
3029
3130* Get and install [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
3231
3332* Load the VM files in VirtualBox:
3433
3534 From the GUI: **Machine -> Add**, then browse to the location of the .vbox file
3635
3736 From the command line: VBoxManage registervm /path/to/vm.vbox
3837
3938### Using Qemu
4039
4140* Get and install [qemu](http://en.wikibooks.org/wiki/QEMU/Installing_QEMU)
4241
4342* Run the following command: (tweak the -m flag for more ram)
4443
4544 qemu-system-i386 Downloads/Tatovm.vmdk -smp 4 -m 512 -enable-kvm -net nic -net user -redir tcp:8080::80 -redir tcp:4242::22 -redir tcp:8081::81
4645
4746## Accessing the VM
4847* The default http port is **8080**, the default SSH port is **4242**, and the default webdav port is **8081**.
4948
5049* On Windows, you may want to download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) as your SSH GUI.
5150
5251* To SSH into the machine, use the username **tatoeba**, password **tatoeba**, and port **4242**:
5352
5453 ssh -p 4242 tatoeba@127.0.0.1
5554
5655* Now you can see the website running in your browser by pointing it to the following address:
5756
5857 127.0.0.1:8080
5958
6059* Steps such as installing packages require superuser privileges. Prefix these commands with sudo or run:
6160
6261 sudo su
6362
6463 Then type in the password **tatoeba** when prompted.
6564
6665 After performing your operation, execute "exit" to end superuser access.
6766
6867* The MySQL user is **root** and password is **tatoeba** in case you need to do operations directly on the table or import more data. Getting to a mysql shell or excuting a mysql script is as easy as:
6968
7069 mysql -u root -ptatoeba tatoeba
7170
7271 mysql -u root -ptatoeba tatoeba < script.sql
7372
7473##Performing Additional Configuration Steps
7574
7675* If you will be committing code, configure your user.name and user.email. (You can do this retroactively after your first commit, but it's better to do it beforehand.) For instance, if your username at GitHub is ghuser, and your e-mail address is address@example.com, you'll execute:
7776
7877 git config --global user.name "ghuser"
7978
8079 git config --global user.email address@example.com
8180
8281* It's also a good idea to set your time correctly, especially if you're going to be committing code. Otherwise, the time stamps on your commits will be wrong, and it will look as if you're committing code days before or after you actually do. Try installing the ntp package. See [this page](https://wiki.debian.org/DateTime) for more information.
8382
8483* 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:
8584
8685 mysqldump -u root -ptatoeba -A > /backup/all_dbs.sql
8786
8887## Customizing Your Installation
8988* There are three ways to access the codebase via your favorite editor in the comfort of your host computer:
9089
9190 * Mount a drive over SSH:
9291
9392 * On Windows: download NetDrive [www.netdrive.net] and use the aforementioned credentials and port
9493
9594 * On Linux: install SSHFS and then mount it using:
9695
9796 sshfs tatoeba@127.0.0.1:4242 /path/to/mountpoint
9897
9998 * Mount a drive over WebDAV:
10099
101100 * On Windows: use NetDrive. The user and password are **tatoeba**, and the port is **8081**.
102101
103102 * On Linux: use your favorite file manager with WebDAV support, or install cadaver and connect using the above credentials.
104103
105104 * Mount a shared file (slow and not recommended):
106105
107106 * Set up Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions]
108107
109108 * In the GUI select Devices -> Shared Folders -> Add
110109
111110 * Browse to the folder you want to share from your host and select it
112111
113112 * Select the Make permanent option
114113
115114 * Now mount the shared file on the guest system:
116115
117116 mount -t vboxfs /media/sharefoldername /path/to/mountpoint
118117
119118* You can also install a graphical environment (GNOME or any other development environment) to work directly from the VM:
120119
121120 apt-get install task-gnome-desktop
122121
123122##Logging Into Tatoeba on the VM
124123
125124The users provided by default are:
126125
127126 admin
128127
129128 corpus_maintainer
130129
131130 advanced_contributor
132131
133132 contributor
134133
135134 inactive
136135
137136 spammer
138137
139138The default password for each user is '123456'.
140139
141140In addition, you can register new users.
diff view generated by jsdifflib

Version at: 13/02/2015, 06:34

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

## Installing the VM
* Grab the vm file:

    [Mirror 1](http://www.aloneonmars.info/public/lool0/Tatovm/) |
    [Torrent(mirror 1)](http://www.aloneonmars.info/public/lool0/Tatovm/Tatovm.torrent) |
    [Magnet link](https://dl.dropboxusercontent.com/u/3186185/magnet.html)

    [Mirror 2](https://mirrors.bouah.net/pub/tatoeba/Tatovm/) |
    [Torrent(mirror2)](https://mirrors.bouah.net/pub/tatoeba/Tatovm/Tatovm.torrent)

(https certificate sha1 fingerprint:
55:70:43:DD:4E:90:71:10:A8:B4:16:23:F6:B5:46:EF:6B:33:B1:C2)


* Untar the file:

   * On Windows: 

        * Download both the vbox and the xz file

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

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

        xz -d Tatovm.vmdk.xz

### Using VirtualBox

* 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

### Using Qemu

* Get and install [qemu](http://en.wikibooks.org/wiki/QEMU/Installing_QEMU)

* Run the following command: (tweak the -m flag for more ram)

  qemu-system-i386 Downloads/Tatovm.vmdk -smp 4 -m 512 -enable-kvm -net nic -net user -redir tcp:8080::80 -redir tcp:4242::22 -redir tcp:8081::81

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

* On Windows, you may want to download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) as your SSH GUI.

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

   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. Prefix these commands with sudo or run:

   sudo su

   Then type in the password **tatoeba** 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. Getting to a mysql shell or excuting a mysql script is as easy as:

  mysql -u root -ptatoeba tatoeba

  mysql -u root -ptatoeba tatoeba < script.sql

##Performing Additional Configuration Steps

* If you will be committing code, configure your user.name and user.email. (You can do this retroactively after your first commit, but it's better to do it beforehand.) For instance, if your username at GitHub is ghuser, and your e-mail address is address@example.com, you'll execute:

        git config --global user.name "ghuser"

        git config --global user.email address@example.com

* It's also a good idea to set your time correctly, especially if you're going to be committing code. Otherwise, the time stamps on your commits will be wrong, and it will look as if you're committing code days before or after you actually do. Try installing the ntp package. See [this page](https://wiki.debian.org/DateTime) for more information.

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

        * 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: 13/02/2015, 06:34

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

## Installing the VM
* Grab the vm file:

    [Mirror 1](http://www.aloneonmars.info/public/lool0/Tatovm/) |
    [Torrent(mirror 1)](http://www.aloneonmars.info/public/lool0/Tatovm/Tatovm.torrent) |
    [Magnet link](https://dl.dropboxusercontent.com/u/3186185/magnet.html)

    [Mirror 2](https://mirrors.bouah.net/pub/tatoeba/Tatovm/) |
    [Torrent(mirror2)](https://mirrors.bouah.net/pub/tatoeba/Tatovm/Tatovm.torrent)
    (https certificate sha1 fingerprint:
55:70:43:DD:4E:90:71:10:A8:B4:16:23:F6:B5:46:EF:6B:33:B1:C2)


* Untar the file:

   * On Windows: 

        * Download both the vbox and the xz file

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

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

        xz -d Tatovm.vmdk.xz

### Using VirtualBox

* 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

### Using Qemu

* Get and install [qemu](http://en.wikibooks.org/wiki/QEMU/Installing_QEMU)

* Run the following command: (tweak the -m flag for more ram)

  qemu-system-i386 Downloads/Tatovm.vmdk -smp 4 -m 512 -enable-kvm -net nic -net user -redir tcp:8080::80 -redir tcp:4242::22 -redir tcp:8081::81

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

* On Windows, you may want to download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) as your SSH GUI.

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

   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. Prefix these commands with sudo or run:

   sudo su

   Then type in the password **tatoeba** 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. Getting to a mysql shell or excuting a mysql script is as easy as:

  mysql -u root -ptatoeba tatoeba

  mysql -u root -ptatoeba tatoeba < script.sql

##Performing Additional Configuration Steps

* If you will be committing code, configure your user.name and user.email. (You can do this retroactively after your first commit, but it's better to do it beforehand.) For instance, if your username at GitHub is ghuser, and your e-mail address is address@example.com, you'll execute:

        git config --global user.name "ghuser"

        git config --global user.email address@example.com

* It's also a good idea to set your time correctly, especially if you're going to be committing code. Otherwise, the time stamps on your commits will be wrong, and it will look as if you're committing code days before or after you actually do. Try installing the ntp package. See [this page](https://wiki.debian.org/DateTime) for more information.

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

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