Version at: 15/03/2014, 15:39 vs. version at: 15/03/2014, 15:42 | ||
---|---|---|
1 | 1 | #How to Prepare a Development Environment for Tatoeba Using a Pre-made Virtual Machine |
2 | 2 | |
3 | 3 | ## Installing the VM |
4 | 4 | * Grab the vm file [http://mirrors.bouah.net/pub/tatoeba/Tatovm/](http://mirrors.bouah.net/pub/tatoeba/Tatovm/) |
5 | 5 | |
6 | 6 | * Untar the file: |
7 | 7 | |
8 | 8 | On Windows: use 7zip [http://www.7-zip.org/] |
9 | 9 | |
10 | 10 | On Linux: use file-roller or from the terminal, type: |
11 | 11 | |
12 | 12 | tar -xvf vmfile |
13 | 13 | |
14 | 14 | * Get and install VirtualBox [https://www.virtualbox.org/wiki/Downloads] |
15 | 15 | |
16 | 16 | * Load the VM files in VirtualBox: |
17 | 17 | |
18 | 18 | From the GUI: Machine -> Add then browse to the location of the .vbox file |
19 | 19 | |
20 | 20 | From the command line: VBoxManage registervm /path/to/vm.vbox |
21 | 21 | |
22 | 22 | ## Accessing the VM |
23 | 23 | * The default http port is 8080 and the default SSH port is 4242. |
24 | 24 | |
25 | 25 | * To SSH into the machine, use the username **tatoeba** and password **tatoeba**: |
26 | 26 | |
27 | 27 | ssh -p 4242 tatoeba@127.0.0.1 |
28 | 28 | |
29 | 29 | * Now you can see the website running in your browser by pointing it to the following address: |
30 | 30 | |
31 | 31 | 127.0.0.1:8080 |
32 | 32 | |
33 | * If you see warning messages introduced by "Strict standards:", you probably have a version of PHP that is newer than 5.3.3, the version recommended for Tatoeba development. You can verify this by executing "php -v". To downgrade to PHP 5.3.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. | |
33 | * Steps such as installing packages require superuser privileges. Prior to such steps, execute: | |
34 | ||
35 | su - | |
36 | ||
37 | The password is **tatovm**. | |
38 | ||
39 | Then execute "exit" afterwards to end superuser access. | |
34 | 40 | |
35 | 41 | * The MySQL user is **root** and password is **tatoeba** in case you need to do operations directly on the table or import more data. |
36 | 42 | |
37 | 43 | |
38 | 44 | ##Performing Additional Configuration Steps |
39 | 45 | |
40 | 46 | These steps will eventually be folded into a new VM, but for now, they must be performed after the VM is installed. |
41 | 47 | |
42 | 48 | * The current VM was assembled shortly before we made the transition from a Subversion repository on Assembla to a Git repository on GitHub, so execute the following steps to update your code from the new repository: |
43 | 49 | |
44 | 50 | * Install the git package if "which git" does not show you that you already have it installed. This requires superuser privileges. |
45 | 51 | |
46 | 52 | * Rename ~/tatoeba-www to ~/tatoeba-www-bak . |
47 | 53 | |
48 | 54 | * In your home directory (~), pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2) as follows: |
49 | 55 | |
50 | 56 | git clone https://github.com/Tatoeba/tatoeba2.git ~tatoeba/tatoeba-www |
51 | 57 | |
52 | 58 | * Your new directory ~/tatoeba-www should have the same directory structure as the old ~/tatoeba-www-bak. You can now delete ~/tatoeba-www-bak . |
53 | 59 | |
54 | 60 | * Execute the two SQL scripts 2013-05-31.sql and 2013-08-13.sql as follows: |
55 | 61 | |
56 | 62 | mysql -u root -ptatoeba tatoeba < /home/tatoeba/tatoeba-www/docs/database/updates/2013-05-31.sql |
57 | 63 | |
58 | 64 | mysql -u root -ptatoeba tatoeba < /home/tatoeba/tatoeba-www/docs/database/updates/2013-08-13.sql |
59 | 65 | |
60 | 66 | * 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: |
61 | 67 | |
62 | 68 | mysqldump -ptatoeba -A > /backup/all_dbs.sql |
63 | 69 | |
64 | 70 | * Install curl using these commands (which will require superuser permissions, so you'll need to use "su -" beforehand and "exit" afterwards): |
65 | 71 | |
66 | 72 | apt-get update |
67 | 73 | |
68 | 74 | apt-get install php5-curl |
69 | 75 | |
70 | 76 | * As root, install poedit and bzr for use with UI translations stored on Launchpad (which uses a Bazaar repository): |
71 | 77 | apt-get install poedit |
72 | 78 | apt-get install bzr |
73 | 79 | |
74 | 80 | * Optional: add the following to .bashrc: |
75 | 81 | export TERM=xterm-256color |
76 | 82 | |
77 | 83 | ## Customizing Your Installation |
78 | 84 | * There are three ways to access the codebase via your favorite editor in the comfort of your host computer: |
79 | 85 | |
80 | 86 | * Mount a drive over SSH: |
81 | 87 | |
82 | 88 | * On Windows: download NetDrive [www.netdrive.net] and use the aforementioned credentials and port |
83 | 89 | |
84 | 90 | * On Linux: install SSHFS and then mount it using: |
85 | 91 | |
86 | 92 | sshfs tatoeba@127.0.0.1:4242 /path/to/mountpoint |
87 | 93 | |
88 | 94 | * Mount a drive over WebDAV: |
89 | 95 | |
90 | 96 | * On Windows: use NetDrive. The user and password are **tatoeba**, and the port is 8080. |
91 | 97 | |
92 | 98 | * On Linux: use your favorite file manager with WebDAV support, or install cadaver and connect using the above credentials. |
93 | 99 | |
94 | 100 | * Mount a shared file (slow and not recommended): |
95 | 101 | |
96 | 102 | * Set up Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions] |
97 | 103 | |
98 | 104 | * In the GUI select Devices -> Shared Folders -> Add |
99 | 105 | |
100 | 106 | * Browse to the folder you want to share from your host and select it |
101 | 107 | |
102 | 108 | * Select the Make permanent option |
103 | 109 | |
104 | 110 | * Now mount the shared file on the guest system: |
105 | 111 | |
106 | 112 | mount -t vboxfs /media/sharefoldername /path/to/mountpoint |
107 | 113 | |
108 | 114 | * You can also install a graphical environment (GNOME or any other development environment) to work directly from the VM: |
109 | 115 | |
110 | 116 | apt-get install task-gnome-desktop |
111 | 117 | |
diff view generated by jsdifflib |
Version at: 15/03/2014, 15:39
#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.3, the version recommended for Tatoeba development. You can verify this by executing "php -v". To downgrade to PHP 5.3.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. ##Performing Additional Configuration Steps These steps will eventually be folded into a new VM, but for now, they must be performed after the VM is installed. * The current VM was assembled shortly before we made the transition from a Subversion repository on Assembla to a Git repository on GitHub, so execute the following steps to update your code from the new repository: * Install the git package if "which git" does not show you that you already have it installed. This requires superuser privileges. * Rename ~/tatoeba-www to ~/tatoeba-www-bak . * In your home directory (~), pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2) as follows: git clone https://github.com/Tatoeba/tatoeba2.git ~tatoeba/tatoeba-www * Your new directory ~/tatoeba-www should have the same directory structure as the old ~/tatoeba-www-bak. You can now delete ~/tatoeba-www-bak . * Execute the two SQL scripts 2013-05-31.sql and 2013-08-13.sql as follows: mysql -u root -ptatoeba tatoeba < /home/tatoeba/tatoeba-www/docs/database/updates/2013-05-31.sql mysql -u root -ptatoeba tatoeba < /home/tatoeba/tatoeba-www/docs/database/updates/2013-08-13.sql * 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 -ptatoeba -A > /backup/all_dbs.sql * Install curl using these commands (which will require superuser permissions, so you'll need to use "su -" beforehand and "exit" afterwards): apt-get update apt-get install php5-curl * As root, install poedit and bzr for use with UI translations stored on Launchpad (which uses a Bazaar repository): apt-get install poedit apt-get install bzr * Optional: add the following to .bashrc: export TERM=xterm-256color ## 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 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
version at: 15/03/2014, 15:42
#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 * Steps such as installing packages require superuser privileges. Prior to such steps, execute: su - The password is **tatovm**. Then execute "exit" afterwards 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. ##Performing Additional Configuration Steps These steps will eventually be folded into a new VM, but for now, they must be performed after the VM is installed. * The current VM was assembled shortly before we made the transition from a Subversion repository on Assembla to a Git repository on GitHub, so execute the following steps to update your code from the new repository: * Install the git package if "which git" does not show you that you already have it installed. This requires superuser privileges. * Rename ~/tatoeba-www to ~/tatoeba-www-bak . * In your home directory (~), pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2) as follows: git clone https://github.com/Tatoeba/tatoeba2.git ~tatoeba/tatoeba-www * Your new directory ~/tatoeba-www should have the same directory structure as the old ~/tatoeba-www-bak. You can now delete ~/tatoeba-www-bak . * Execute the two SQL scripts 2013-05-31.sql and 2013-08-13.sql as follows: mysql -u root -ptatoeba tatoeba < /home/tatoeba/tatoeba-www/docs/database/updates/2013-05-31.sql mysql -u root -ptatoeba tatoeba < /home/tatoeba/tatoeba-www/docs/database/updates/2013-08-13.sql * 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 -ptatoeba -A > /backup/all_dbs.sql * Install curl using these commands (which will require superuser permissions, so you'll need to use "su -" beforehand and "exit" afterwards): apt-get update apt-get install php5-curl * As root, install poedit and bzr for use with UI translations stored on Launchpad (which uses a Bazaar repository): apt-get install poedit apt-get install bzr * Optional: add the following to .bashrc: export TERM=xterm-256color ## 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 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