Version at: 03/04/2014, 01:56 vs. version at: 03/04/2014, 02:01
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:
5 [Mirror 1](http://www.aloneonmars.info/public/lool0/Tatovm/)
6 [Torrent(mirror 1)](http://www.aloneonmars.info/public/lool0/Tatovm/Tatovm.torrent)
5 [Mirror 1](http://www.aloneonmars.info/public/lool0/Tatovm/) |
6 [Torrent(mirror 1)](http://www.aloneonmars.info/public/lool0/Tatovm/Tatovm.torrent) |
77 [Magnet link](magnet:?xt=urn:btih:3b36fc35649e1c181a1aae99a13863f2735b75b1&dn=Tatovm)
88
99* Untar the file:
1010
1111 * On Windows:
1212
1313 * Download both the vbox and the xz file
1414
1515 * 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)
1616
1717 * On Linux: use file-roller or from the terminal, type:
1818 xz -d Tatovm.vmdk.xz
1919
2020### Using VirtualBox
2121
2222* Get and install [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
2323
2424* Load the VM files in VirtualBox:
2525
2626 From the GUI: **Machine -> Add**, then browse to the location of the .vbox file
2727
2828 From the command line: VBoxManage registervm /path/to/vm.vbox
2929
3030### Using Qemu
3131
3232* Get and install [qemu](http://en.wikibooks.org/wiki/QEMU/Installing_QEMU)
3333
3434* Run the following command: (tweak the -m flag for more ram)
3535
3636 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
3737
3838## Accessing the VM
3939* The default http port is **8080**, the default SSH port is **4242**, and the default webdav port is **8081**.
4040
4141* On Windows, you may want to download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) as your SSH GUI.
4242
4343* To SSH into the machine, use the username **tatoeba**, password **tatoeba**, and port **4242**:
4444
4545 ssh -p 4242 tatoeba@127.0.0.1
4646
4747* Now you can see the website running in your browser by pointing it to the following address:
4848
4949 127.0.0.1:8080
5050
5151* Steps such as installing packages require superuser privileges. Prefix these commands with sudo or run:
5252
5353 sudo su
5454
5555 Then type in the password **tatoeba** when prompted.
5656
5757 After performing your operation, execute "exit" to end superuser access.
5858
5959* 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:
6060
6161 mysql -u root -ptatoeba tatoeba
6262
6363 mysql -u root -ptatoeba tatoeba < script.sql
6464
6565##Performing Additional Configuration Steps
6666
6767* 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:
6868
6969 git config --global user.name "ghuser"
7070
7171 git config --global user.email address@example.com
7272
7373* 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.
7474
7575* 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:
7676
7777 mysqldump -u root -ptatoeba -A > /backup/all_dbs.sql
7878
7979## Customizing Your Installation
8080* There are three ways to access the codebase via your favorite editor in the comfort of your host computer:
8181
8282 * Mount a drive over SSH:
8383
8484 * On Windows: download NetDrive [www.netdrive.net] and use the aforementioned credentials and port
8585
8686 * On Linux: install SSHFS and then mount it using:
8787
8888 sshfs tatoeba@127.0.0.1:4242 /path/to/mountpoint
8989
9090 * Mount a drive over WebDAV:
9191
9292 * On Windows: use NetDrive. The user and password are **tatoeba**, and the port is **8081**.
9393
9494 * On Linux: use your favorite file manager with WebDAV support, or install cadaver and connect using the above credentials.
9595
9696 * Mount a shared file (slow and not recommended):
9797
9898 * Set up Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions]
9999
100100 * In the GUI select Devices -> Shared Folders -> Add
101101
102102 * Browse to the folder you want to share from your host and select it
103103
104104 * Select the Make permanent option
105105
106106 * Now mount the shared file on the guest system:
107107
108108 mount -t vboxfs /media/sharefoldername /path/to/mountpoint
109109
110110* You can also install a graphical environment (GNOME or any other development environment) to work directly from the VM:
111111
112112 apt-get install task-gnome-desktop
113113
114114##Logging Into Tatoeba on the VM
115115
116116The users provided by default are:
117117
118118 admin
119119
120120 corpus_maintainer
121121
122122 advanced_contributor
123123
124124 contributor
125125
126126 inactive
127127
128128 spammer
129129
130130The default password for each user is '123456'.
131131
132132In addition, you can register new users.
diff view generated by jsdifflib

Version at: 03/04/2014, 01:56

#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](magnet:?xt=urn:btih:3b36fc35649e1c181a1aae99a13863f2735b75b1&dn=Tatovm)

* 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: 03/04/2014, 02:01

#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](magnet:?xt=urn:btih:3b36fc35649e1c181a1aae99a13863f2735b75b1&dn=Tatovm)

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