Earthdevruis » History » Version 18
Simon Kluepfel, 2013-03-19 15:37
| 1 | 1 | Joseph Foley | h1. Earthdevruis |
|---|---|---|---|
| 2 | |||
| 3 | @earth.dev.ru.is@ is a high-performance linux server owned by the RU Speech Research group under Jón Gúðnason <jg@ru.is>. The machine lives in DevNet (the development network in the RU basement). |
||
| 4 | |||
| 5 | The main DevNet contact is Joe Foley <foley@ru.is>. He also installed th machine machine. |
||
| 6 | |||
| 7 | 15 | Simon Kluepfel | {{toc}} |
| 8 | |||
| 9 | 4 | Joseph Foley | h2. Status |
| 10 | |||
| 11 | * Earth has been reinstalled with 12.04.2 64-bit [foley] |
||
| 12 | * Kerberos/AFS has been configured [foley] |
||
| 13 | * /home is being restored from the backup disk (mounted on /mnt/backup) [foley] |
||
| 14 | |||
| 15 | |||
| 16 | 1 | Joseph Foley | h2. Installation |
| 17 | |||
| 18 | h3. Turn on PXE for network boot/install |
||
| 19 | |||
| 20 | # Reboot |
||
| 21 | # While the machine is rebooting, hit F2 (or F1) so that it goes to BIOS setup |
||
| 22 | ## Click on system options, then networking |
||
| 23 | ## Set the network adapter to have PXE enabled |
||
| 24 | ## Save options |
||
| 25 | # Make sure that the machine is connected to the DevNet switches |
||
| 26 | # Reboot |
||
| 27 | |||
| 28 | h3. Netboot and pick installer |
||
| 29 | |||
| 30 | # After PXE initializes, you should get an installer menu |
||
| 31 | # Choose Ubuntu 12.04.2 64-bit (Alternate) |
||
| 32 | # You'll have to pick region and keyboard. You want to pick the Icelandic keyboard |
||
| 33 | |||
| 34 | h3. Partitioning the hard drive |
||
| 35 | |||
| 36 | It's a good idea to separate the operating system, home directory, and data storage. In addition, you will need a swap file and an AFS cache partition. |
||
| 37 | The AFS cache partition should be ext2 or ext3. To make this easier to manage, you should have all except for a boot partition in LVM (logical volume manager) |
||
| 38 | |||
| 39 | # Choose manual partitioning of hard drive |
||
| 40 | # Create a /boot primary paritition of around 300MB. Make sure it is "bootable" |
||
| 41 | # Go into the LVM manager |
||
| 42 | ## Create a new physical volume with the remaining space on the drive |
||
| 43 | ## Create these logical volumes with these names and sizes. You'll need to remember where they should be mounted also. |
||
| 44 | 2 | Joseph Foley | *** afscache 2GB (for @/var/cache/openafs@) |
| 45 | *** swap 8GB |
||
| 46 | *** slash 60GB (for @/@) |
||
| 47 | *** home 50GB (for @/home@) |
||
| 48 | *** export [Remaining space] (for @/export@) |
||
| 49 | 1 | Joseph Foley | ## Save changes and exit the manager |
| 50 | # In the partition manager, set these options for the partitions |
||
| 51 | 2 | Joseph Foley | ** boot: labeled boot, format as ext2, mounted at /boot, set "bootable" flag |
| 52 | ** afscache: 0% reserved, labeled afscache, format as ext2 or ext3, mounted at @/var/cache/openafs@ |
||
| 53 | ** swap: swapspace |
||
| 54 | ** slash: labeled slash, format as ext4, mounted at @/@ |
||
| 55 | ** home: 0% reserved, labeled home, format as ext4, mounted at @/home@ |
||
| 56 | ** export: 0% reserved, labeled export, format as ext4, mounted at @/export@ |
||
| 57 | 1 | Joseph Foley | # Save changes |
| 58 | # The installation should continue for a while |
||
| 59 | |||
| 60 | h3. Picking server options |
||
| 61 | |||
| 62 | 3 | Joseph Foley | You'll have to pick a user. This is the default devnet user: |
| 63 | * user: devnet |
||
| 64 | * password: hakkavelin |
||
| 65 | |||
| 66 | Once everything is setup, you should delete the user (or change the password). _Avoid logging in as root unless absolutely necessary!_ |
||
| 67 | |||
| 68 | 1 | Joseph Foley | This may vary, but these are probably the settings you want: |
| 69 | * Basic Ubuntu Server |
||
| 70 | * SSH server |
||
| 71 | * Ubuntu Desktop |
||
| 72 | 3 | Joseph Foley | |
| 73 | h3. Kerberos (single sign on) and AFS |
||
| 74 | |||
| 75 | Follow the directions at https://samvinna.ru.is/projects/projects/devnet-documentation/wiki/AFS_Client_Installation |
||
| 76 | |||
| 77 | Very brief synopsis without some details: |
||
| 78 | # Install the packages. Remember that the Kerberos realm is DEV.RU.IS and theAFS cell is dev.ru.is. Case matters! |
||
| 79 | <pre> |
||
| 80 | 6 | Joseph Foley | sudo apt-get install krb5-auth-dialog krb5-user krb5-clients libpam-ccreds libpam-krb5 build-essential dkms linux-headers-`uname -r` openafs-modules-dkms openafs-{client,krb5} libpam-afs-session |
| 81 | 3 | Joseph Foley | </pre> |
| 82 | # Get a kerberos administrator (currently foley) to generate a keytab for @/etc/krb5.keytab@ |
||
| 83 | # Add the principals for administrators into @/root/.k5login@ |
||
| 84 | <pre> |
||
| 85 | foley@DEV.RU.IS |
||
| 86 | jg@DEV.RU.IS |
||
| 87 | simonhk@DEV.RU.IS |
||
| 88 | </pre> |
||
| 89 | # Reboot |
||
| 90 | # Adjust the @/etc/ssh/sshd_config@ settings to allow GSSAPI options (set them all to yes) |
||
| 91 | # see if you can ssh in using your DevNet @DEV.RU.IS principal to the root account |
||
| 92 | |||
| 93 | To add users, you need to find out the user's AFS ID. |
||
| 94 | # My AFS id is 7812 as below: |
||
| 95 | <pre> pts examine foley |
||
| 96 | libprot: unable to build security class (getting token) |
||
| 97 | libprot: Could not get afs tokens, running unauthenticated |
||
| 98 | Name: foley, id: 7812, owner: system:administrators, creator: foley.afsadm, |
||
| 99 | membership: 25, flags: S----, group quota: 20.</pre> |
||
| 100 | # sudo adduser --uid 7812 foley |
||
| 101 | ## Hit return when it asks for your password and do not retry |
||
| 102 | 1 | Joseph Foley | ## Fill out the user's information |
| 103 | 6 | Joseph Foley | |
| 104 | h3. Useful basic packages |
||
| 105 | |||
| 106 | # ssh in as root (or use ksu) |
||
| 107 | 7 | Joseph Foley | # install packages for various things |
| 108 | <pre>aptitude install zile language-pack-is-base texstudio</pre> |
||
| 109 | 6 | Joseph Foley | |
| 110 | 5 | Joseph Foley | |
| 111 | h2. Matlab (and licensing issues) |
||
| 112 | |||
| 113 | # ssh in as root |
||
| 114 | <pre>kinit; ssh root@earth.dev.ru.is</pre> |
||
| 115 | # Create a matlab user/group |
||
| 116 | <pre>adduser matlab</pre> |
||
| 117 | # Go add yourself to the matlab group |
||
| 118 | <pre>usermod -a -G matlab</pre> |
||
| 119 | # Create a place to store the matlab downloads more permanently for install |
||
| 120 | 10 | Simon Kluepfel | <pre>mkdir -p /export/downloads/matlab-2013a</pre> |
| 121 | 5 | Joseph Foley | chown matlab.matlab /export/downloads/matlab-2013a |
| 122 | # Give yourself the ability to login as the matlab user |
||
| 123 | <pre>vi /home/matlab/.k5login</pre> |
||
| 124 | ** Add your kerberos principal e.g.: foley@DEV.RU.IS |
||
| 125 | # ssh in as the matlab user. Make sure X11 is working |
||
| 126 | <pre> ssh matlab@earth.dev.ru.is</pre> |
||
| 127 | # Run firefox and go to @http://mathworks.se@ |
||
| 128 | # Login and fill out the appropriate forms to download the latest version of matlab |
||
| 129 | # Download it into your Downloads directory |
||
| 130 | # With the user account copy the downloaded matlab files into their new location |
||
| 131 | <pre>cp ~/Downloads/* /export/downloads/matlab-2013a</pre> |
||
| 132 | |||
| 133 | At the moment, I can only have one "username" able to run matlab. I have a workaround that I configured. The "matlab" user is the one who gets to use the license under my name. |
||
| 134 | |||
| 135 | If you have kerberized ssh and X11 setup properly, this means you can run matlab by logging in as the matlab user. This is how I tested it for running programs out of my AFS directory: |
||
| 136 | |||
| 137 | 12 | Simon Kluepfel | <pre>kinit foley@DEV.RU.IS |
| 138 | 5 | Joseph Foley | ssh matlab@earth.dev.ru.is |
| 139 | aklog; cd /afs/dev.ru.is/user/f/fo/foley |
||
| 140 | 12 | Simon Kluepfel | matlab &</pre> |
| 141 | 8 | Simon Kluepfel | |
| 142 | h2. Matlab (and licensing issues) #2 |
||
| 143 | |||
| 144 | # ssh in as your user |
||
| 145 | <pre>kinit; ssh <username>@earth.dev.ru.is</pre> |
||
| 146 | # execute activation script |
||
| 147 | 1 | Joseph Foley | <pre>/opt/MATLAB/2013a/bin/activate_matlab.sh</pre> |
| 148 | 8 | Simon Kluepfel | # follow the instructions |
| 149 | 13 | Simon Kluepfel | * !matlab1.png! |
| 150 | * !matlab2.png! |
||
| 151 | * !matlab3.png! |
||
| 152 | * !matlab4.png! |
||
| 153 | * !matlab5.png! |
||
| 154 | 11 | Simon Kluepfel | |
| 155 | 1 | Joseph Foley | # Now ssh to earth and run matlab |
| 156 | <pre>matlab &</pre> |
||
| 157 | 12 | Simon Kluepfel | |
| 158 | |||
| 159 | |||
| 160 | 18 | Simon Kluepfel | h2. Environment Modules |
| 161 | 1 | Joseph Foley | |
| 162 | 18 | Simon Kluepfel | h3. Installation |
| 163 | |||
| 164 | 12 | Simon Kluepfel | # ssh in as root |
| 165 | <pre>kinit; ssh root@earth.dev.ru.is</pre> |
||
| 166 | # get and prepare sources |
||
| 167 | <pre>mkdir -p /export/downloads/modules |
||
| 168 | cd /export/downloads/modules |
||
| 169 | wget "http://downloads.sourceforge.net/project/modules/Modules/modules-3.2.10/modules-3.2.10.tar.gz" |
||
| 170 | cd /export/install/ |
||
| 171 | tar -xzvf /export/downloads/modules/modules-3.2.10.tar.gz |
||
| 172 | cd modules-3.2.10</pre> |
||
| 173 | # install tcl dependencies |
||
| 174 | <pre>aptitude install tcl tcl-dev</pre> |
||
| 175 | # configure and install |
||
| 176 | <pre>./configure --prefix=/opt |
||
| 177 | make |
||
| 178 | make install |
||
| 179 | cd /opt/Modules |
||
| 180 | ln -s 3.2.10 default |
||
| 181 | </pre> |
||
| 182 | # an important file that will be sourced later seems to be not copied. It defines the default module version at login |
||
| 183 | <pre>cp /export/install/modules-3.2.10/etc/global/profile.modules /etc/</pre> |
||
| 184 | # update the skeleton files |
||
| 185 | <pre>env HOME=/etc/skel /opt/Modules/default/bin/add.modules |
||
| 186 | exit</pre> |
||
| 187 | 1 | Joseph Foley | |
| 188 | 18 | Simon Kluepfel | h3. Activation |
| 189 | |||
| 190 | 12 | Simon Kluepfel | # every user should run the following to update their dot files to enable the module command |
| 191 | 1 | Joseph Foley | <pre>/opt/Modules/default/bin/add.modules</pre> |
| 192 | 18 | Simon Kluepfel | |
| 193 | h3. Usage |
||
| 194 | 14 | Simon Kluepfel | |
| 195 | 16 | Simon Kluepfel | # available modules can be displayed by |
| 196 | <pre>module avail</pre> |
||
| 197 | # modules are loaded by |
||
| 198 | <pre>module load name_of_the_module[/desired_version]</pre> |
||
| 199 | # and unloaded by |
||
| 200 | <pre>module unload name_of_the_module</pre> |
||
| 201 | # currently loaded modules are displayd by |
||
| 202 | <pre>module list</pre> |
||
| 203 | 17 | Simon Kluepfel | |
| 204 | |||
| 205 | 14 | Simon Kluepfel | h2. Installing HTK |
| 206 | |||
| 207 | # ssh in as root |
||
| 208 | <pre>kinit; ssh root@earth.dev.ru.is</pre> |
||
| 209 | # get and prepare sources |
||
| 210 | <pre>mkdir -p /export/install/htk |
||
| 211 | cd /export/install/htk |
||
| 212 | tar -xzvf /export/downloads/htk/HTK-3.4.1.tar.gz |
||
| 213 | tar -xzvf /export/downloads/htk/HTK-samples-3.4.1.tar.gz |
||
| 214 | cd htk</pre> |
||
| 215 | # install dependencies |
||
| 216 | <pre>aptitude install libc6-dev-i386 libx11-dev libx11-dev:i386</pre> |
||
| 217 | # configure and install |
||
| 218 | <pre>./configure --prefix=/opt/htk/3.4.1 --with-x |
||
| 219 | make all |
||
| 220 | mkdir -p /opt/htk/3.4.1/ |
||
| 221 | make install</pre> |
||
| 222 | # install HTK samples |
||
| 223 | <pre>cd .. |
||
| 224 | cp -r samples /opt/htk/3.4.1/</pre> |
||
| 225 | 15 | Simon Kluepfel | # adding HTK module file |
| 226 | <pre> |
||
| 227 | cd /opt/Modules/default/modulefiles/ |
||
| 228 | mkdir htk |
||
| 229 | cat > htk/3.4.1 <<EOF |
||
| 230 | #%Module1.0##################################################################### |
||
| 231 | |||
| 232 | proc ModulesHelp { } { |
||
| 233 | global version binprefix |
||
| 234 | |||
| 235 | puts stderr "\tHTK ${version}" |
||
| 236 | puts stderr "\n\tThis adds ${binprefix} to the PATH " |
||
| 237 | puts stderr "\tenvironment variable and defines the " |
||
| 238 | puts stderr "\tenvironment variables HTK_ROOT and HTK_SAMPLEROOT." |
||
| 239 | puts stderr "\n\tVersion $version\n" |
||
| 240 | } |
||
| 241 | |||
| 242 | module-whatis "Loads HTK 3.4.1 and samples" |
||
| 243 | |||
| 244 | set version 3.4.1 |
||
| 245 | |||
| 246 | set prefix /opt/htk/${version} |
||
| 247 | set binprefix ${prefix}/bin |
||
| 248 | set sampleprefix ${prefix}/samples |
||
| 249 | |||
| 250 | prepend-path PATH ${prefix}/bin |
||
| 251 | |||
| 252 | setenv HTK_ROOT $prefix |
||
| 253 | setenv HTK_SAMPLEROOT $sampleprefix |
||
| 254 | EOF |
||
| 255 | </pre> |
||
| 256 | 16 | Simon Kluepfel | # now HTK can be loaded by |
| 257 | <pre>module load htk</pre> |
||
| 258 | # and unloaded by |
||
| 259 | <pre>module unload htk</pre> |