Version at: 19/01/2014, 01:20 vs. version at: 09/02/2014, 12:53
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
7 on windows: use 7zip [http://www.7-zip.org/]
7 On Windows: use 7zip [http://www.7-zip.org/]
88
9 on linux: use file-roller or from the terminal:
9 On Linux: use file-roller or from the terminal, type:
1010
1111 tar -xvf vmfile
1212
13 * Get and install virtual box [https://www.virtualbox.org/wiki/Downloads]
13* Get and install VirtualBox [https://www.virtualbox.org/wiki/Downloads]
1414
15 * Load the vm files in virtualbox:
15* Load the VM files in VirtualBox:
1616
17 from the GUI: Machine -> Add then browse to the location of the .vbox file
17 From the GUI: Machine -> Add then browse to the location of the .vbox file
1818
19 from the commandline: VBoxManage registervm /path/to/vm.vbox
19 From the command line: VBoxManage registervm /path/to/vm.vbox
2020
21 * The default http port is 8080 and the default ssh port is 4242
21* The default http port is 8080 and the default SSH port is 4242.
2222
23 * To ssh into the machine use the username tatoeba and password tatoeba:
23* To SSH into the machine, use the username **tatoeba** and password **tatoeba**:
2424
25 ssh -p 4242 tatoeba@127.0.0.1
25 ssh -p 4242 tatoeba@127.0.0.1
2626
27 * Now you can see the website running in your browser, just point it to the following address:
27* 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
31 * The mysql user is root and password is tatoeba in case you need to do operations directly on the table or import more data
31* The mysql user is **root** and password is **tatoeba** in case you need to do operations directly on the table or import more data.
3232
33 * To hack the codebase in your favorite editor in the comfort of your host computer there's 3 ways:
33* To hack the codebase in your favorite editor in the comfort of your host computer, there are 3 ways:
3434
35 * Mount a drive over ssh:
35 * Mount a drive over SSH:
3636
37 * on windows: download netdrive [www.netdrive.net] and use the aforementioned credentials and port
37 * On Windows: download NetDrive [www.netdrive.net] and use the aforementioned credentials and port
3838
39 * on linux: install sshfs and then mount it using:
39 * On Linux: install SSHFS and then mount it using:
4040
4141 sshfs tatoeba@127.0.0.1:4242 /path/to/mountpoint
4242
43 * Mount a drive over webdav:
43 * Mount a drive over WebDAV:
4444
45 * on windows: use netdrive, the user and password is tatoeba the port is 8080
45 * On Windows: use NetDrive. The user and password are **tatoeba**, and the port is 8080.
4646
47 * on linux: use your favorite file manager with webdav support, or install cadaver and connect using the above credentials
47 * On Linux: use your favorite file manager with WebDAV support, or install cadaver and connect using the above credentials.
4848
49 * Mount a shared file (slow and not recommended):
49 * Mount a shared file (slow and not recommended):
5050
51 * Setup Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions]
51 * Set up Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions]
5252
53 * In the GUI select Devices -> Shared Folders -> Add
53 * In the GUI select Devices -> Shared Folders -> Add
5454
55 * browse to the folder you want to share from your host and select it
55 * Browse to the folder you want to share from your host and select it
5656
57 * Select the Make permanent option
57 * Select the Make permanent option
5858
59 * Now mount the shared file on the guest system:
59 * Now mount the shared file on the guest system:
6060
6161 mount -t vboxfs /media/sharefoldername /path/to/mountpoint
6262
63* You can also install a graphical environment (gnome or any other DE) to work directly from the vm:
63* You can also install a graphical environment (GNOME or any other development environment) to work directly from the VM:
6464
6565 apt-get install task-gnome-desktop
6666
67* Make sure your codebase is up to date before coding anything with:
67* Before coding anything, make sure your codebase is up to date by executing the following commands:
6868
6969 cd ~/tatoeba-www
7070
7171 svn update
7272
73* After you have hacked the code enough and would want to update the main repository do the following:
73* After you have changed the code enough and want to update the main repository, do the following:
7474
75 * make sure your config files aren't being commited:
75 * Make sure your config files aren't being committed:
7676
77 svn ingore config/*
77 svn ignore config/*
7878
79 * make sure you're still up to date then commit your changes:
79 * Double-check your changes:
80
81 svn diff
82
83 * Make sure you're still up to date, then commit your changes:
8084
8185 svn update
8286
8387 svn commit
diff view generated by jsdifflib

Version at: 19/01/2014, 01:20

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

   tar -xvf vmfile

 * Get and install virtual box [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 commandline: 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, just point it to the following address:

   127.0.0.1:8080

 * 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's 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 is tatoeba 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):

     * Setup 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 DE) to work directly from the vm:

  apt-get install task-gnome-desktop

* Make sure your codebase is up to date before coding anything with:

  cd ~/tatoeba-www

  svn update

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

  * make sure your config files aren't being commited:

    svn ingore config/* 

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

    svn update

    svn commit

version at: 09/02/2014, 12:53

#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

* 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

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