Earthdevruis » History » Version 8
Simon Kluepfel, 2013-03-19 14:09
| 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 | 4 | Joseph Foley | h2. Status |
| 8 | |||
| 9 | * Earth has been reinstalled with 12.04.2 64-bit [foley] |
||
| 10 | * Kerberos/AFS has been configured [foley] |
||
| 11 | * /home is being restored from the backup disk (mounted on /mnt/backup) [foley] |
||
| 12 | |||
| 13 | |||
| 14 | 1 | Joseph Foley | h2. Installation |
| 15 | |||
| 16 | h3. Turn on PXE for network boot/install |
||
| 17 | |||
| 18 | # Reboot |
||
| 19 | # While the machine is rebooting, hit F2 (or F1) so that it goes to BIOS setup |
||
| 20 | ## Click on system options, then networking |
||
| 21 | ## Set the network adapter to have PXE enabled |
||
| 22 | ## Save options |
||
| 23 | # Make sure that the machine is connected to the DevNet switches |
||
| 24 | # Reboot |
||
| 25 | |||
| 26 | h3. Netboot and pick installer |
||
| 27 | |||
| 28 | # After PXE initializes, you should get an installer menu |
||
| 29 | # Choose Ubuntu 12.04.2 64-bit (Alternate) |
||
| 30 | # You'll have to pick region and keyboard. You want to pick the Icelandic keyboard |
||
| 31 | |||
| 32 | h3. Partitioning the hard drive |
||
| 33 | |||
| 34 | 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. |
||
| 35 | 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) |
||
| 36 | |||
| 37 | # Choose manual partitioning of hard drive |
||
| 38 | # Create a /boot primary paritition of around 300MB. Make sure it is "bootable" |
||
| 39 | # Go into the LVM manager |
||
| 40 | ## Create a new physical volume with the remaining space on the drive |
||
| 41 | ## Create these logical volumes with these names and sizes. You'll need to remember where they should be mounted also. |
||
| 42 | 2 | Joseph Foley | *** afscache 2GB (for @/var/cache/openafs@) |
| 43 | *** swap 8GB |
||
| 44 | *** slash 60GB (for @/@) |
||
| 45 | *** home 50GB (for @/home@) |
||
| 46 | *** export [Remaining space] (for @/export@) |
||
| 47 | 1 | Joseph Foley | ## Save changes and exit the manager |
| 48 | # In the partition manager, set these options for the partitions |
||
| 49 | 2 | Joseph Foley | ** boot: labeled boot, format as ext2, mounted at /boot, set "bootable" flag |
| 50 | ** afscache: 0% reserved, labeled afscache, format as ext2 or ext3, mounted at @/var/cache/openafs@ |
||
| 51 | ** swap: swapspace |
||
| 52 | ** slash: labeled slash, format as ext4, mounted at @/@ |
||
| 53 | ** home: 0% reserved, labeled home, format as ext4, mounted at @/home@ |
||
| 54 | ** export: 0% reserved, labeled export, format as ext4, mounted at @/export@ |
||
| 55 | 1 | Joseph Foley | # Save changes |
| 56 | # The installation should continue for a while |
||
| 57 | |||
| 58 | h3. Picking server options |
||
| 59 | |||
| 60 | 3 | Joseph Foley | You'll have to pick a user. This is the default devnet user: |
| 61 | * user: devnet |
||
| 62 | * password: hakkavelin |
||
| 63 | |||
| 64 | Once everything is setup, you should delete the user (or change the password). _Avoid logging in as root unless absolutely necessary!_ |
||
| 65 | |||
| 66 | 1 | Joseph Foley | This may vary, but these are probably the settings you want: |
| 67 | * Basic Ubuntu Server |
||
| 68 | * SSH server |
||
| 69 | * Ubuntu Desktop |
||
| 70 | 3 | Joseph Foley | |
| 71 | h3. Kerberos (single sign on) and AFS |
||
| 72 | |||
| 73 | Follow the directions at https://samvinna.ru.is/projects/projects/devnet-documentation/wiki/AFS_Client_Installation |
||
| 74 | |||
| 75 | Very brief synopsis without some details: |
||
| 76 | # Install the packages. Remember that the Kerberos realm is DEV.RU.IS and theAFS cell is dev.ru.is. Case matters! |
||
| 77 | <pre> |
||
| 78 | 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 |
| 79 | 3 | Joseph Foley | </pre> |
| 80 | # Get a kerberos administrator (currently foley) to generate a keytab for @/etc/krb5.keytab@ |
||
| 81 | # Add the principals for administrators into @/root/.k5login@ |
||
| 82 | <pre> |
||
| 83 | foley@DEV.RU.IS |
||
| 84 | jg@DEV.RU.IS |
||
| 85 | simonhk@DEV.RU.IS |
||
| 86 | </pre> |
||
| 87 | # Reboot |
||
| 88 | # Adjust the @/etc/ssh/sshd_config@ settings to allow GSSAPI options (set them all to yes) |
||
| 89 | # see if you can ssh in using your DevNet @DEV.RU.IS principal to the root account |
||
| 90 | |||
| 91 | To add users, you need to find out the user's AFS ID. |
||
| 92 | # My AFS id is 7812 as below: |
||
| 93 | <pre> pts examine foley |
||
| 94 | libprot: unable to build security class (getting token) |
||
| 95 | libprot: Could not get afs tokens, running unauthenticated |
||
| 96 | Name: foley, id: 7812, owner: system:administrators, creator: foley.afsadm, |
||
| 97 | membership: 25, flags: S----, group quota: 20.</pre> |
||
| 98 | # sudo adduser --uid 7812 foley |
||
| 99 | ## Hit return when it asks for your password and do not retry |
||
| 100 | 1 | Joseph Foley | ## Fill out the user's information |
| 101 | 6 | Joseph Foley | |
| 102 | h3. Useful basic packages |
||
| 103 | |||
| 104 | # ssh in as root (or use ksu) |
||
| 105 | 7 | Joseph Foley | # install packages for various things |
| 106 | <pre>aptitude install zile language-pack-is-base texstudio</pre> |
||
| 107 | 6 | Joseph Foley | |
| 108 | 5 | Joseph Foley | |
| 109 | h2. Matlab (and licensing issues) |
||
| 110 | |||
| 111 | # ssh in as root |
||
| 112 | <pre>kinit; ssh root@earth.dev.ru.is</pre> |
||
| 113 | # Create a matlab user/group |
||
| 114 | <pre>adduser matlab</pre> |
||
| 115 | # Go add yourself to the matlab group |
||
| 116 | <pre>usermod -a -G matlab</pre> |
||
| 117 | # Create a place to store the matlab downloads more permanently for install |
||
| 118 | <pre>mkdir -p /export/downloads/matlab-2013a |
||
| 119 | chown matlab.matlab /export/downloads/matlab-2013a |
||
| 120 | # Give yourself the ability to login as the matlab user |
||
| 121 | <pre>vi /home/matlab/.k5login</pre> |
||
| 122 | ** Add your kerberos principal e.g.: foley@DEV.RU.IS |
||
| 123 | # ssh in as the matlab user. Make sure X11 is working |
||
| 124 | <pre> ssh matlab@earth.dev.ru.is</pre> |
||
| 125 | # Run firefox and go to @http://mathworks.se@ |
||
| 126 | # Login and fill out the appropriate forms to download the latest version of matlab |
||
| 127 | # Download it into your Downloads directory |
||
| 128 | # With the user account copy the downloaded matlab files into their new location |
||
| 129 | <pre>cp ~/Downloads/* /export/downloads/matlab-2013a</pre> |
||
| 130 | |||
| 131 | 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. |
||
| 132 | |||
| 133 | 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: |
||
| 134 | |||
| 135 | kinit foley@DEV.RU.IS |
||
| 136 | ssh matlab@earth.dev.ru.is |
||
| 137 | aklog; cd /afs/dev.ru.is/user/f/fo/foley |
||
| 138 | matlab & |
||
| 139 | 8 | Simon Kluepfel | |
| 140 | h2. Matlab (and licensing issues) #2 |
||
| 141 | |||
| 142 | # ssh in as your user |
||
| 143 | <pre>kinit; ssh <username>@earth.dev.ru.is</pre> |
||
| 144 | # execute activation script |
||
| 145 | <pre>/opt/MATLAB/2013a/bin/activate_matlab.sh</pre> |
||
| 146 | # follow the instructions |
||
| 147 | |||
| 148 | # Now ssh to earth and run matlab |
||
| 149 | <pre>matlab &</pre> |