Version at: 16/03/2014, 17:48 vs. version at: 16/03/2014, 17:49 | ||
---|---|---|
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: |
9 | 9 | |
10 | 10 | * Download both the vbox and the gz file |
11 | 11 | |
12 | 12 | * Use 7zip [http://www.7-zip.org/] to extract Tatovm.vmdk file from the gz file (using the "Extract here" item from the right-click menu) |
13 | 13 | |
14 | 14 | * On Linux: use file-roller or from the terminal, type: |
15 | 15 | |
16 | 16 | tar -xvf vmfile |
17 | 17 | |
18 | 18 | * Get and install VirtualBox [https://www.virtualbox.org/wiki/Downloads] |
19 | 19 | |
20 | 20 | * Load the VM files in VirtualBox: |
21 | 21 | |
22 | From the GUI: Machine -> Add then browse to the location of the .vbox file | |
22 | From the GUI: **Machine -> Add**, then browse to the location of the .vbox file | |
23 | 23 | |
24 | 24 | From the command line: VBoxManage registervm /path/to/vm.vbox |
25 | 25 | |
26 | 26 | ## Accessing the VM |
27 | 27 | * The default http port is 8080 and the default SSH port is 4242. |
28 | 28 | |
29 | 29 | * On Windows, you may want to download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) as your SSH GUI. |
30 | 30 | |
31 | 31 | * To SSH into the machine, use the username **tatoeba** and password **tatoeba**: |
32 | 32 | |
33 | 33 | ssh -p 4242 tatoeba@127.0.0.1 |
34 | 34 | |
35 | 35 | * Now you can see the website running in your browser by pointing it to the following address: |
36 | 36 | |
37 | 37 | 127.0.0.1:8080 |
38 | 38 | |
39 | 39 | * Steps such as installing packages require superuser privileges. Prior to such steps, execute: |
40 | 40 | |
41 | 41 | su - |
42 | 42 | |
43 | 43 | Type in the password **tatovm** when prompted. |
44 | 44 | |
45 | 45 | After performing your operation, execute "exit" to end superuser access. |
46 | 46 | |
47 | 47 | * The MySQL user is **root** and password is **tatoeba** in case you need to do operations directly on the table or import more data. |
48 | 48 | |
49 | 49 | |
50 | 50 | ##Performing Additional Configuration Steps |
51 | 51 | |
52 | 52 | These steps will eventually be folded into a new VM, but for now, they must be performed after the VM is installed. |
53 | 53 | |
54 | 54 | * 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: |
55 | 55 | |
56 | 56 | * Install the git package if "which git" does not show you that you already have it installed. This requires superuser privileges. |
57 | 57 | |
58 | 58 | * Rename /var/http/tatoeba to /var/http/tatoeba-bak . |
59 | 59 | |
60 | 60 | * In the /var/http directory, pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2) as follows: |
61 | 61 | |
62 | 62 | git clone https://github.com/Tatoeba/tatoeba2.git /var/http/tatoeba |
63 | 63 | |
64 | 64 | * Your new directory /var/http/tatoeba should have the same directory structure as the old /var/http/tatoeba-bak. You can now delete /var/http/tatoeba-bak . |
65 | 65 | |
66 | 66 | * Execute SQL scripts as follows: |
67 | 67 | |
68 | 68 | mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-05-31.sql |
69 | 69 | |
70 | 70 | mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-08-13.sql |
71 | 71 | |
72 | 72 | mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/scripts/create_fill_langStats.sql |
73 | 73 | |
74 | 74 | * 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: |
75 | 75 | |
76 | 76 | mysqldump -u root -ptatoeba -A > /backup/all_dbs.sql |
77 | 77 | |
78 | 78 | * Install curl using these commands (which will require superuser permissions, so you'll need to use "su -" beforehand and "exit" afterwards): |
79 | 79 | |
80 | 80 | apt-get update |
81 | 81 | |
82 | 82 | apt-get install php5-curl |
83 | 83 | |
84 | 84 | * As root, install poedit and bzr for use with UI translations stored on Launchpad (which uses a Bazaar repository): |
85 | 85 | |
86 | 86 | apt-get install poedit |
87 | 87 | |
88 | 88 | apt-get install bzr |
89 | 89 | |
90 | 90 | * Optional: add the following to .bashrc: |
91 | 91 | |
92 | 92 | export TERM=xterm-256color |
93 | 93 | |
94 | 94 | ## Customizing Your Installation |
95 | 95 | * There are three ways to access the codebase via your favorite editor in the comfort of your host computer: |
96 | 96 | |
97 | 97 | * Mount a drive over SSH: |
98 | 98 | |
99 | 99 | * On Windows: download NetDrive [www.netdrive.net] and use the aforementioned credentials and port |
100 | 100 | |
101 | 101 | * On Linux: install SSHFS and then mount it using: |
102 | 102 | |
103 | 103 | sshfs tatoeba@127.0.0.1:4242 /path/to/mountpoint |
104 | 104 | |
105 | 105 | * Mount a drive over WebDAV: |
106 | 106 | |
107 | 107 | * On Windows: use NetDrive. The user and password are **tatoeba**, and the port is 8080. |
108 | 108 | |
109 | 109 | * On Linux: use your favorite file manager with WebDAV support, or install cadaver and connect using the above credentials. |
110 | 110 | |
111 | 111 | * Mount a shared file (slow and not recommended): |
112 | 112 | |
113 | 113 | * Set up Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions] |
114 | 114 | |
115 | 115 | * In the GUI select Devices -> Shared Folders -> Add |
116 | 116 | |
117 | 117 | * Browse to the folder you want to share from your host and select it |
118 | 118 | |
119 | 119 | * Select the Make permanent option |
120 | 120 | |
121 | 121 | * Now mount the shared file on the guest system: |
122 | 122 | |
123 | 123 | mount -t vboxfs /media/sharefoldername /path/to/mountpoint |
124 | 124 | |
125 | 125 | * You can also install a graphical environment (GNOME or any other development environment) to work directly from the VM: |
126 | 126 | |
127 | 127 | apt-get install task-gnome-desktop |
128 | 128 | |
129 | 129 | ##Logging Into Tatoeba on the VM |
130 | 130 | |
131 | 131 | The users provided by default are: |
132 | 132 | |
133 | 133 | admin |
134 | 134 | corpus_maintainer |
135 | 135 | advanced_contributor |
136 | 136 | contributor |
137 | 137 | inactive |
138 | 138 | spammer |
139 | 139 | |
140 | 140 | The default password for each user is '123456'. |
141 | 141 | |
142 | 142 | In addition, you can register new users. |
diff view generated by jsdifflib |
Version at: 16/03/2014, 17:48
#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: * Download both the vbox and the gz file * Use 7zip [http://www.7-zip.org/] to extract Tatovm.vmdk file from the gz file (using the "Extract here" item from the right-click menu) * 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. * On Windows, you may want to download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) as your SSH GUI. * 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 - Type in the password **tatovm** when prompted. After performing your operation, execute "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 /var/http/tatoeba to /var/http/tatoeba-bak . * In the /var/http directory, pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2) as follows: git clone https://github.com/Tatoeba/tatoeba2.git /var/http/tatoeba * Your new directory /var/http/tatoeba should have the same directory structure as the old /var/http/tatoeba-bak. You can now delete /var/http/tatoeba-bak . * Execute SQL scripts as follows: mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-05-31.sql mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-08-13.sql mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/scripts/create_fill_langStats.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 -u root -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 ##Logging Into Tatoeba on the VM The users provided by default are: admin corpus_maintainer advanced_contributor contributor inactive spammer The default password for each user is '123456'. In addition, you can register new users.
version at: 16/03/2014, 17:49
#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: * Download both the vbox and the gz file * Use 7zip [http://www.7-zip.org/] to extract Tatovm.vmdk file from the gz file (using the "Extract here" item from the right-click menu) * 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. * On Windows, you may want to download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) as your SSH GUI. * 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 - Type in the password **tatovm** when prompted. After performing your operation, execute "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 /var/http/tatoeba to /var/http/tatoeba-bak . * In the /var/http directory, pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2) as follows: git clone https://github.com/Tatoeba/tatoeba2.git /var/http/tatoeba * Your new directory /var/http/tatoeba should have the same directory structure as the old /var/http/tatoeba-bak. You can now delete /var/http/tatoeba-bak . * Execute SQL scripts as follows: mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-05-31.sql mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-08-13.sql mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/scripts/create_fill_langStats.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 -u root -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 ##Logging Into Tatoeba on the VM The users provided by default are: admin corpus_maintainer advanced_contributor contributor inactive spammer The default password for each user is '123456'. In addition, you can register new users.