Version at: 17/02/2014, 14:43 vs. version at: 12/03/2014, 00:07 | ||
---|---|---|
1 | 1 | #How to Prepare a Development Environment for Tatoeba Using a Pre-made Virtual Machine |
2 | 2 | |
3 | ## Installing the VM | |
3 | 4 | * Grab the vm file [http://mirrors.bouah.net/pub/tatoeba/Tatovm/](http://mirrors.bouah.net/pub/tatoeba/Tatovm/) |
4 | 5 | |
5 | 6 | * Untar the file: |
6 | 7 | |
7 | 8 | On Windows: use 7zip [http://www.7-zip.org/] |
8 | 9 | |
9 | 10 | On Linux: use file-roller or from the terminal, type: |
10 | 11 | |
11 | 12 | tar -xvf vmfile |
12 | 13 | |
13 | 14 | * Get and install VirtualBox [https://www.virtualbox.org/wiki/Downloads] |
14 | 15 | |
15 | 16 | * Load the VM files in VirtualBox: |
16 | 17 | |
17 | 18 | From the GUI: Machine -> Add then browse to the location of the .vbox file |
18 | 19 | |
19 | 20 | From the command line: VBoxManage registervm /path/to/vm.vbox |
20 | 21 | |
22 | ## Accessing the VM | |
21 | 23 | * The default http port is 8080 and the default SSH port is 4242. |
22 | 24 | |
23 | 25 | * To SSH into the machine, use the username **tatoeba** and password **tatoeba**: |
24 | 26 | |
25 | 27 | ssh -p 4242 tatoeba@127.0.0.1 |
26 | 28 | |
27 | 29 | * Now you can see the website running in your browser by pointing it to the following address: |
28 | 30 | |
29 | 31 | 127.0.0.1:8080 |
30 | 32 | |
31 | 33 | * 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. |
32 | 34 | |
33 | 35 | * The MySQL user is **root** and password is **tatoeba** in case you need to do operations directly on the table or import more data. |
34 | 36 | |
35 | * To hack the codebase in your favorite editor in the comfort of your host computer, there are 3 ways: | |
37 | * To be able to access the codebase in your favorite editor in the comfort of your host computer, there are 3 ways: | |
36 | 38 | |
37 | 39 | * Mount a drive over SSH: |
38 | 40 | |
39 | 41 | * On Windows: download NetDrive [www.netdrive.net] and use the aforementioned credentials and port |
40 | 42 | |
41 | 43 | * On Linux: install SSHFS and then mount it using: |
42 | 44 | |
43 | 45 | sshfs tatoeba@127.0.0.1:4242 /path/to/mountpoint |
44 | 46 | |
45 | 47 | * Mount a drive over WebDAV: |
46 | 48 | |
47 | 49 | * On Windows: use NetDrive. The user and password are **tatoeba**, and the port is 8080. |
48 | 50 | |
49 | 51 | * On Linux: use your favorite file manager with WebDAV support, or install cadaver and connect using the above credentials. |
50 | 52 | |
51 | 53 | * Mount a shared file (slow and not recommended): |
52 | 54 | |
53 | 55 | * Set up Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions] |
54 | 56 | |
55 | 57 | * In the GUI select Devices -> Shared Folders -> Add |
56 | 58 | |
57 | 59 | * Browse to the folder you want to share from your host and select it |
58 | 60 | |
59 | 61 | * Select the Make permanent option |
60 | 62 | |
61 | 63 | * Now mount the shared file on the guest system: |
62 | 64 | |
63 | 65 | mount -t vboxfs /media/sharefoldername /path/to/mountpoint |
64 | 66 | |
65 | 67 | * You can also install a graphical environment (GNOME or any other development environment) to work directly from the VM: |
66 | 68 | |
67 | 69 | apt-get install task-gnome-desktop |
68 | 70 | |
69 | * If you do not already have SVN (Subversion) access, send e-mail to team@tatoeba.org to request it. | |
71 | ##Additional Configuration Steps | |
70 | 72 | |
71 | * Before coding anything, make sure your codebase is up to date by executing the following commands: | |
73 | * The current VM was assembled shortly before we made the transition from a Subversion repository on Assembla to a Git repository on GitHub. Eventually, we will make a new VM that has the Git repository ready to go, but in the meantime, execute the following steps: | |
72 | 74 | |
73 | cd ~/tatoeba-www | |
75 | * Rename ~/tatoeba-www to ~/tatoeba-www-bak . | |
76 | ||
77 | * In your home directory (~), pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2). | |
78 | ||
79 | * Your new directory ~/tatoeba-www should have the same directory structure as the old ~/tatoeba-www-bak. You can now delete ~/tatoeba-www-bak . | |
74 | 80 | |
75 | svn update | |
76 | ||
77 | * After you have changed the code enough and want to update the main repository, do the following: | |
78 | ||
79 | * Make sure your config files aren't being committed: | |
80 | ||
81 | svn ignore config/* | |
82 | ||
83 | * Double-check your changes: | |
84 | ||
85 | svn diff | |
86 | ||
87 | * Make sure you're still up to date, then commit your changes: | |
88 | ||
89 | svn update | |
90 | ||
91 | svn commit | |
diff view generated by jsdifflib |
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
version at: 12/03/2014, 00:07
#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 * 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 be able to access 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 ##Additional Configuration Steps * The current VM was assembled shortly before we made the transition from a Subversion repository on Assembla to a Git repository on GitHub. Eventually, we will make a new VM that has the Git repository ready to go, but in the meantime, execute the following steps: * Rename ~/tatoeba-www to ~/tatoeba-www-bak . * In your home directory (~), pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2). * Your new directory ~/tatoeba-www should have the same directory structure as the old ~/tatoeba-www-bak. You can now delete ~/tatoeba-www-bak .