Version at: 12/03/2014, 00:24 vs. version at: 12/03/2014, 00:26 | ||
---|---|---|
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 | 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. |
34 | 34 | |
35 | 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. |
36 | 36 | |
37 | ||
38 | ##Performing Additional Configuration Steps | |
39 | ||
40 | These steps will eventually be folded into a new VM, but for now, they must be performed after the VM is installed. | |
41 | ||
42 | * 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 | ||
44 | * Rename ~/tatoeba-www to ~/tatoeba-www-bak . | |
45 | ||
46 | * In your home directory (~), pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2) as follows: | |
47 | ||
48 | git clone https://github.com/Tatoeba/tatoeba2.git ~tatoeba/tatoeba-www | |
49 | ||
50 | * Your new directory ~/tatoeba-www should have the same directory structure as the old ~/tatoeba-www-bak. You can now delete ~/tatoeba-www-bak . | |
51 | ||
52 | * Execute the two SQL scripts 2013-05-31.sql and 2013-08-13.sql as follows: | |
53 | ||
54 | mysql -u root -ptatoeba tatoeba < /home/tatoeba/tatoeba-www/docs/database/updates/2013-05-31.sql | |
55 | ||
56 | mysql -u root -ptatoeba tatoeba < /home/tatoeba/tatoeba-www/docs/database/updates/2013-08-13.sql | |
57 | ||
58 | * 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: | |
59 | ||
60 | mysqldump -ptatoeba -A > /backup/all_dbs.sql | |
61 | ||
62 | * Install curl using these commands (which will require superuser permissions, so you'll need to use "su -" beforehand and "exit" afterwards): | |
63 | ||
64 | apt-get update | |
65 | ||
66 | apt-get install php5-curl | |
67 | ||
68 | ## Customizing Your Installation | |
37 | 69 | * To be able to access the codebase in your favorite editor in the comfort of your host computer, there are 3 ways: |
38 | 70 | |
39 | 71 | * Mount a drive over SSH: |
40 | 72 | |
41 | 73 | * On Windows: download NetDrive [www.netdrive.net] and use the aforementioned credentials and port |
42 | 74 | |
43 | 75 | * On Linux: install SSHFS and then mount it using: |
44 | 76 | |
45 | 77 | sshfs tatoeba@127.0.0.1:4242 /path/to/mountpoint |
46 | 78 | |
47 | 79 | * Mount a drive over WebDAV: |
48 | 80 | |
49 | 81 | * On Windows: use NetDrive. The user and password are **tatoeba**, and the port is 8080. |
50 | 82 | |
51 | 83 | * On Linux: use your favorite file manager with WebDAV support, or install cadaver and connect using the above credentials. |
52 | 84 | |
53 | 85 | * Mount a shared file (slow and not recommended): |
54 | 86 | |
55 | 87 | * Set up Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions] |
56 | 88 | |
57 | 89 | * In the GUI select Devices -> Shared Folders -> Add |
58 | 90 | |
59 | 91 | * Browse to the folder you want to share from your host and select it |
60 | 92 | |
61 | 93 | * Select the Make permanent option |
62 | 94 | |
63 | 95 | * Now mount the shared file on the guest system: |
64 | 96 | |
65 | 97 | mount -t vboxfs /media/sharefoldername /path/to/mountpoint |
66 | 98 | |
67 | 99 | * You can also install a graphical environment (GNOME or any other development environment) to work directly from the VM: |
68 | 100 | |
69 | 101 | apt-get install task-gnome-desktop |
70 | 102 | |
71 | ##Additional Configuration Steps | |
72 | ||
73 | These steps will eventually be folded into a new VM, but for now, they must be performed after the VM is installed. | |
74 | ||
75 | * 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: | |
76 | ||
77 | * Rename ~/tatoeba-www to ~/tatoeba-www-bak . | |
78 | ||
79 | * In your home directory (~), pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2) as follows: | |
80 | ||
81 | git clone https://github.com/Tatoeba/tatoeba2.git ~tatoeba/tatoeba-www | |
82 | ||
83 | * Your new directory ~/tatoeba-www should have the same directory structure as the old ~/tatoeba-www-bak. You can now delete ~/tatoeba-www-bak . | |
84 | ||
85 | * Execute the two SQL scripts 2013-05-31.sql and 2013-08-13.sql as follows: | |
86 | ||
87 | mysql -u root -ptatoeba tatoeba < /home/tatoeba/tatoeba-www/docs/database/updates/2013-05-31.sql | |
88 | ||
89 | mysql -u root -ptatoeba tatoeba < /home/tatoeba/tatoeba-www/docs/database/updates/2013-08-13.sql | |
90 | ||
91 | * 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: | |
92 | ||
93 | mysqldump -ptatoeba -A > /backup/all_dbs.sql | |
94 | ||
95 | * Install curl using these commands (which will require superuser permissions, so you'll need to use "su -" beforehand and "exit" afterwards): | |
96 | ||
97 | apt-get update | |
98 | ||
99 | apt-get install php5-curl | |
100 | ||
diff view generated by jsdifflib |
Version at: 12/03/2014, 00:24
#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. * 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 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: * 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
version at: 12/03/2014, 00:26
#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: * 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 ## Customizing Your Installation * 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