Jacob's collection of useful tutorials and tips

Computing at PP RHUL

How to mount your pphome on your personal laptop/computer at RHUL

This is a particularly useful tip if you, like myself, want to edit files from your local machine running the latest version of emacs. More often then not the version available on linappserv is either outdated or simply too vanilla for you. I run Aquamacs on my MacBook which has several customizations specific to OS X and the Mac.

N.B. You need to be within PP network, either via the wired network or the Stella wireless network. There is a way to use an ssh-tunnel to mount your pphome outside of the network using the command sshfs.

There are two ways to mount your pphome folder to a local directory depending on whether you're on a UNIX-type or a Windows-type enviornment. Since I'm using OS X I'll focus on mounting using NFS, keep in mind that this also works on Linux operating systems as well.

The first step is to make sure that your UID is synced between our Linux environment and your personal machine.

!!SUPER IMPORTANT!!: Keep in mind that this process is potentially dangerous and should be done with care, you may literally lock yourself out of your own home folder so please back-up everything you hold dear before proceeding, and whatever happens you CANNOT hold me accountable.

Now that we have the disclaimer out of the way, let's get to it. If you don't know how to change your UID there are several tutorials for both Linux and OS X. I can only vouch for the OS X tutorial since I used it myself, the Linux one however seems fairly good as well. So if you're using Linux you need this tutorial and if you're on a Mac follow this tutorial. Keep in mind that for both you need to figure out your current UID and the UID you want to change to. To get the second one, log into linappserv using your account and perform the following command:

[jblanco@linappserv0 ~]$ stat ~/

This should produce the following:

  File: `/home/jblanco/'
  Size: 59           Blocks: 8          IO Block: 4096   directory
Device: 24h/36d   Inode: 3           Links: 29
Access: (0755/drwxr-xr-x)  Uid: ( 10249/ jblanco)   Gid: (  120/    hep2)
Access: 2011-05-25 14:23:02.212553501 +0100
Modify: 2011-05-25 14:14:14.746438370 +0100
Change: 2011-05-25 14:14:14.746438370 +0100

Note the UID number in the output. Make sure to use YOUR UID when following the above tutorials. I hope I don't need to say this but, DO NOT use MY UID.

Once you have changed your UID and made sure that all the appropriate ownerships have been changed and directories have been renamed we can proceed to mount the NFS share.

On Mac OS X this can be easily accomplished from Disk Utility.app. First of all create a new mount directory either through the terminal or Finder. Now, in your dock click on Applications->Utilities->Disk Utility, here select File->NFS Mounts... A new window should open with an empty list, select the + sign to add a new mount. The address should be of the following form, making sure you replace jblanco with your Linux username:

nfs://134.219.108.207/pptank/home/jblanco

and the mount point should point to the directory that you just created. Select Verify, you should barely see the confirmation message if all is well.

On Linux It can be a bit trickier and what method you use depends on what's available for your distro, the safest bet is to edit your fstab file, this contains the information for all mounted drives. As always be careful before doing anything that might break your installation, your machine or yourself. Here is a link to a wiki page on NFS shares for Ubuntu, but the information should be relevant to most distros.

Enjoy your new found productivity boost. smile

ROOT Tutorials

Compiling ROOT in Ubuntu

Download the relevant source file from the ROOT website to your desktop. In this tutorial I'm using version 5.26 but this should apply to any recent release.

First open up a terminal and run the following commands:

[User@Machine ~]$ mkdir root-build
[User@Machine ~]$ cp ~/Desktop/root_v5.26.00.source.tar.gz ~/root-build
[User@Machine ~]$ cd ~/root-build
[User@Machine ~]$ tar -xvf root_v5.26.00.source.tar.gz
[User@Machine ~]$ cd root

We just created a new directory in your Home directory, then extracted the source files there. To keep things organized I place sources in a dedicated directory inside my home.

Now we need to download some extra packages to resolve dependencies. Depending on what extra functionality you need, you might want to download/compile other packages. Thankfully aptitude, the package manager bundled with Ubuntu, will help you download all the packages you need and a few that you may not but which add extra functionality.

In the terminal run the following commands to download the necessary packages and configure your build of ROOT:

[User@Machine ~]$ sudo aptitude build-dep root-system
[User@Machine ~]$ ./configure

This will make sure that you have everything you need to compile ROOT. If at any point you're told that some library is missing, note the name of the library and install it by running:

[User@Machine ~]$ sudo apt-get install *NAME OF PACKAGE*-dev

N.B. Packages ending in -devel will appear in the Ubuntu repo's as *NAME*-dev. The suffix -devel is part of the convention used in Red Hat and its variants like SLC4/5. If the package you need is missing, try googling around for the package name to find the equivalent, hopefully the build-dep command will provide you with all you need.

If you have any special configuration requirements such as Pythia interface or Python support make sure that the relevant libraries are present, you can run the command:

[User@Machine ~]$ ./configure --help

to check if you need to define paths to any libraries or include files. If all has gone well with configuring, simply compile ROOT by running:

[User@Machine ~]$ make

This should begin compiling ROOT for you, now I can't stress this enough, compiling could take A LONG TIME so don't worry.

Now we need to set a couple of environmental variables. In the terminal again,

[User@Machine ~]$ sudo gedit ~/.bashrc

and add the following lines to your bashrc file to configure where ROOT will be installed to:

export ROOTSYS=/usr/local/root
export PATH=$ROOTSYS/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH

Of course if you want to install it to any other location make sure you change the ROOTSYS path above.

Re-source your bash configuration file and install:

[User@Machine ~]$ . ~/.bashrc
[User@Machine ~]$ make install

This should copy all files needed to the ROOTSYS folder you specified in your bash configuration. This should let you run ROOT in the normal way.

Enjoy smile

Edit | Attach | Watch | Print version | History: r8 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...

Physics WebpagesRHUL WebpagesCampus Connect • Royal Holloway, University of London, Egham, Surrey TW20 0EX; Tel/Fax +44 (0)1784 434455/437520

Topic revision: r1 - 25 May 2011 - JacoboBlanco

 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding RHUL Physics Department TWiki? Send feedback