Version at: 15/03/2014, 20:38 vs. version at: 16/03/2014, 02:54 | ||
---|---|---|
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 | * Steps such as installing packages require superuser privileges. Prior to such steps, execute: |
34 | 34 | |
35 | 35 | su - |
36 | 36 | |
37 | 37 | Type in the password **tatovm** when prompted. |
38 | 38 | |
39 | 39 | After performing your operation, execute "exit" to end superuser access. |
40 | 40 | |
41 | 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. |
42 | 42 | |
43 | 43 | |
44 | 44 | ##Performing Additional Configuration Steps |
45 | 45 | |
46 | 46 | These steps will eventually be folded into a new VM, but for now, they must be performed after the VM is installed. |
47 | 47 | |
48 | 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: |
49 | 49 | |
50 | 50 | * Install the git package if "which git" does not show you that you already have it installed. This requires superuser privileges. |
51 | 51 | |
52 | 52 | * Rename /var/http/tatoeba to /var/http/tatoeba-bak . |
53 | 53 | |
54 | 54 | * In the /var/http directory, pull the code from the [GitHub Tatoeba repository](https://github.com/Tatoeba/tatoeba2) as follows: |
55 | 55 | |
56 | 56 | git clone https://github.com/Tatoeba/tatoeba2.git /var/http/tatoeba |
57 | 57 | |
58 | 58 | * 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 . |
59 | 59 | |
60 | 60 | * Execute SQL scripts as follows: |
61 | 61 | |
62 | 62 | mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-05-31.sql |
63 | 63 | |
64 | 64 | mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/updates/2013-08-13.sql |
65 | 65 | |
66 | 66 | mysql -u root -ptatoeba tatoeba < /var/http/tatoeba/docs/database/scripts/create_fill_langStats.sql |
67 | 67 | |
68 | 68 | * 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: |
69 | 69 | |
70 | 70 | mysqldump -u root -ptatoeba -A > /backup/all_dbs.sql |
71 | 71 | |
72 | 72 | * Install curl using these commands (which will require superuser permissions, so you'll need to use "su -" beforehand and "exit" afterwards): |
73 | 73 | |
74 | 74 | apt-get update |
75 | 75 | |
76 | 76 | apt-get install php5-curl |
77 | 77 | |
78 | 78 | * As root, install poedit and bzr for use with UI translations stored on Launchpad (which uses a Bazaar repository): |
79 | 79 | |
80 | 80 | apt-get install poedit |
81 | ||
81 | 82 | apt-get install bzr |
82 | 83 | |
83 | 84 | * Optional: add the following to .bashrc: |
84 | 85 | |
85 | 86 | export TERM=xterm-256color |
86 | 87 | |
87 | 88 | ## Customizing Your Installation |
88 | 89 | * There are three ways to access the codebase via your favorite editor in the comfort of your host computer: |
89 | 90 | |
90 | 91 | * Mount a drive over SSH: |
91 | 92 | |
92 | 93 | * On Windows: download NetDrive [www.netdrive.net] and use the aforementioned credentials and port |
93 | 94 | |
94 | 95 | * On Linux: install SSHFS and then mount it using: |
95 | 96 | |
96 | 97 | sshfs tatoeba@127.0.0.1:4242 /path/to/mountpoint |
97 | 98 | |
98 | 99 | * Mount a drive over WebDAV: |
99 | 100 | |
100 | 101 | * On Windows: use NetDrive. The user and password are **tatoeba**, and the port is 8080. |
101 | 102 | |
102 | 103 | * On Linux: use your favorite file manager with WebDAV support, or install cadaver and connect using the above credentials. |
103 | 104 | |
104 | 105 | * Mount a shared file (slow and not recommended): |
105 | 106 | |
106 | 107 | * Set up Guest additions [https://help.ubuntu.com/community/VirtualBox/GuestAdditions] |
107 | 108 | |
108 | 109 | * In the GUI select Devices -> Shared Folders -> Add |
109 | 110 | |
110 | 111 | * Browse to the folder you want to share from your host and select it |
111 | 112 | |
112 | 113 | * Select the Make permanent option |
113 | 114 | |
114 | 115 | * Now mount the shared file on the guest system: |
115 | 116 | |
116 | 117 | mount -t vboxfs /media/sharefoldername /path/to/mountpoint |
117 | 118 | |
118 | 119 | * You can also install a graphical environment (GNOME or any other development environment) to work directly from the VM: |
119 | 120 | |
120 | 121 | apt-get install task-gnome-desktop |
121 | 122 | |
122 | 123 | ##Logging Into Tatoeba on the VM |
123 | 124 | |
124 | 125 | The users provided by default are: |
125 | 126 | |
126 | 127 | admin |
127 | 128 | corpus_maintainer |
128 | 129 | advanced_contributor |
129 | 130 | contributor |
130 | 131 | inactive |
131 | 132 | spammer |
132 | 133 | |
133 | 134 | The default password for each user is '123456'. |
134 | 135 | |
135 | 136 | In addition, you can register new users. |
diff view generated by jsdifflib |
Version at: 15/03/2014, 20:38
#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 - 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, 02:54
#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 - 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.