Version at: 09/02/2014, 13:49 vs. version at: 17/02/2014, 14:43
11#How to Prepare a Development Environment for Tatoeba Using a Pre-made Virtual Machine
22
33* Grab the vm file [http://mirrors.bouah.net/pub/tatoeba/Tatovm/](http://mirrors.bouah.net/pub/tatoeba/Tatovm/)
44
55* Untar the file:
66
77 On Windows: use 7zip [http://www.7-zip.org/]
88
99 On Linux: use file-roller or from the terminal, type:
1010
1111 tar -xvf vmfile
1212
1313* Get and install VirtualBox [https://www.virtualbox.org/wiki/Downloads]
1414
1515* Load the VM files in VirtualBox:
1616
1717 From the GUI: Machine -> Add then browse to the location of the .vbox file
1818
1919 From the command line: VBoxManage registervm /path/to/vm.vbox
2020
2121* The default http port is 8080 and the default SSH port is 4242.
2222
2323* To SSH into the machine, use the username **tatoeba** and password **tatoeba**:
2424
2525 ssh -p 4242 tatoeba@127.0.0.1
2626
2727* Now you can see the website running in your browser by pointing it to the following address:
2828
2929 127.0.0.1:8080
3030
3131* If you see warning messages introduced by "Strict standards:", you probably have a version of PHP that is newer than 5.3, the version recommended for Tatoeba development. You can verify this by executing "php -v". To downgrade to PHP 5.3, execute "su -" (with password **tatovm**) and then follow [these instructions](http://blog.wpkg.org/2013/06/20/downgrading-to-php-5-3-on-debian-wheezy-7-0/). Once the operation is complete, type "exit" to end superuser access.
3232
3333* The MySQL user is **root** and password is **tatoeba** in case you need to do operations directly on the table or import more data.
3434
3535* To hack the codebase in your favorite editor in the comfort of your host computer, there are 3 ways:
3636
37 * Mount a drive over SSH:
37 * Mount a drive over SSH:
3838
39 * On Windows: download NetDrive [www.netdrive.net] and use the aforementioned credentials and port
39 * On Windows: download NetDrive [www.netdrive.net] and use the aforementioned credentials and port
4040
41 * On Linux: install SSHFS and then mount it using:
41 * On Linux: install SSHFS and then mount it using:
4242
4343 sshfs tatoeba@127.0.0.1:4242 /path/to/mountpoint
4444
45 * Mount a drive over WebDAV:
45 * Mount a drive over WebDAV:
4646
47 * On Windows: use NetDrive. The user and password are **tatoeba**, and the port is 8080.
47 * On Windows: use NetDrive. The user and password are **tatoeba**, and the port is 8080.
4848
49 * On Linux: use your favorite file manager with WebDAV support, or install cadaver and connect using the above credentials.
49 * On Linux: use your favorite file manager with WebDAV support, or install cadaver and connect using the above credentials.
5050
51 * Mount a shared file (slow and not recommended):
51 * Mount a shared file (slow and not recommended):
5252
53 * Set up Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions]
53 * Set up Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions]
5454
55 * In the GUI select Devices -> Shared Folders -> Add
55 * In the GUI select Devices -> Shared Folders -> Add
5656
57 * Browse to the folder you want to share from your host and select it
57 * Browse to the folder you want to share from your host and select it
5858
59 * Select the Make permanent option
59 * Select the Make permanent option
6060
61 * Now mount the shared file on the guest system:
61 * Now mount the shared file on the guest system:
6262
6363 mount -t vboxfs /media/sharefoldername /path/to/mountpoint
6464
6565* You can also install a graphical environment (GNOME or any other development environment) to work directly from the VM:
6666
6767 apt-get install task-gnome-desktop
6868
6969* If you do not already have SVN (Subversion) access, send e-mail to team@tatoeba.org to request it.
7070
7171* Before coding anything, make sure your codebase is up to date by executing the following commands:
7272
7373 cd ~/tatoeba-www
7474
7575 svn update
7676
7777* After you have changed the code enough and want to update the main repository, do the following:
7878
7979 * Make sure your config files aren't being committed:
8080
8181 svn ignore config/*
8282
8383 * Double-check your changes:
8484
8585 svn diff
8686
8787 * Make sure you're still up to date, then commit your changes:
8888
8989 svn update
9090
9191 svn commit
diff view generated by jsdifflib

Version at: 09/02/2014, 13:49

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

* 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

* 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

* If you see warning messages introduced by "Strict standards:", you probably have a version of PHP that is newer than 5.3, the version recommended for Tatoeba development. You can verify this by executing "php -v". To downgrade to PHP 5.3, execute "su -" (with password **tatovm**) and then follow [these instructions](http://blog.wpkg.org/2013/06/20/downgrading-to-php-5-3-on-debian-wheezy-7-0/). Once the operation is complete, type "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.

* To hack the codebase in your favorite editor in the comfort of your host computer, there are 3 ways:

 * 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

* If you do not already have SVN (Subversion) access, send e-mail to team@tatoeba.org to request it.

* Before coding anything, make sure your codebase is up to date by executing the following commands:

  cd ~/tatoeba-www

  svn update

* After you have changed the code enough and want to update the main repository, do the following:

  * Make sure your config files aren't being committed:

    svn ignore config/* 

  * Double-check your changes:

    svn diff

  * Make sure you're still up to date, then commit your changes:

    svn update

    svn commit

version at: 17/02/2014, 14:43

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

* 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

* 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

* If you see warning messages introduced by "Strict standards:", you probably have a version of PHP that is newer than 5.3, the version recommended for Tatoeba development. You can verify this by executing "php -v". To downgrade to PHP 5.3, execute "su -" (with password **tatovm**) and then follow [these instructions](http://blog.wpkg.org/2013/06/20/downgrading-to-php-5-3-on-debian-wheezy-7-0/). Once the operation is complete, type "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.

* To hack the codebase in your favorite editor in the comfort of your host computer, there are 3 ways:

   * 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

* If you do not already have SVN (Subversion) access, send e-mail to team@tatoeba.org to request it.

* Before coding anything, make sure your codebase is up to date by executing the following commands:

  cd ~/tatoeba-www

  svn update

* After you have changed the code enough and want to update the main repository, do the following:

  * Make sure your config files aren't being committed:

    svn ignore config/* 

  * Double-check your changes:

    svn diff

  * Make sure you're still up to date, then commit your changes:

    svn update

    svn commit

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.