[[TOC(Proto/cModules/a0ClickRouter*, depth=2)]] = Installation = == Debian Package Installation == [[CollapsibleStart(Make sure you have appropriate package repository configured.)]][[Include(Documentation/Other/RepositoryConfig)]][[Include(Documentation/Other/RepositoryConfigOml)]][[CollapsibleEnd]] The click modular router with MF extensions is installed with: {{{ sudo apt-get install mfclick }}} The will install the binaries in /usr/local/bin/{mf_click,mf_click_mon}. == Compiling From Source == The following instructions are for Ubuntu distributions and in particular have been tested with 10.04 and 12.04 (with the differences noted where applicable). Since the implementation runs in user-level Click, these steps may work with later distributions also. === 1. Required Packages === {{{ sudo apt-get update sudo apt-get -y install git-core libpcap-dev openssl libssl-dev }}} === 2. Download Click Modular Router Sources === MobilityFirst router elements are currently implemented as user-level elements, and should pose no compatibility issues with specific Linux kernel versions. The latest sources Click can be obtained from [http://www.read.cs.ucla.edu/click/click Click Project website] or from GitHub: {{{ git clone git://github.com/kohler/click.git click }}} While the latest Click sources presented no issues as of this writing, a safe option is to check out version 2.0.1 from the repository cloned above: {{{ cd click git checkout v2.0.1 }}} Set and export the path of Click sources root folder ('click') to env. variable CLICK_SRC. === 3. Download MobilityFirst Sources === Git: The development versions of the prototype components can be checked out from the [https://mobilityfirst.orbit-lab.org/browser/mf MobilityFirst git repository host on orbit-lab]: {{{ git clone ssh://username@external2.orbit-lab.org/common/git/mf }}} '''Note: cloning the git repository requires setting your ssh agent to use your orbit-lab key pair.'' Set and export path of top-level folder to an env. variable 'MF_SRC' === 4. Install Optional Packages === ==== 4.1. Install OML Client Libraries ==== This is required for optionally running OML-based Click Monitor for logging traffic and resource statistics to a backend OML database. The libraries can be obtained and installed from the OML repository at Opensuse.org using the following steps. Refer to [http://mytestbed.net/projects/oml/wiki/Installation installation instructions] at the [http://oml.mytestbed.net/projects/oml OML project website site] for additional details and troubleshooting. First, append the following line to /etc/apt/sources.list, choosing the one appropriate for your Ubuntu version: {{{ #Ubuntu 10.04 deb http://download.opensuse.org/repositories/home:/cdwertmann:/oml/xUbuntu_10.04/ ./ #Ubuntu 12.04 deb http://download.opensuse.org/repositories/home:/cdwertmann:/oml/xUbuntu_12.04/ ./ }}} You also need to add the repository key before the actual download (requires curl or similar): {{{ #Ubuntu 10.04 curl http://download.opensuse.org/repositories/home:/cdwertmann:/oml/xUbuntu_10.04/Release.key | sudo apt-key add - #Ubuntu 12.04 curl http://download.opensuse.org/repositories/home:/cdwertmann:/oml/xUbuntu_12.04/Release.key | sudo apt-key add - }}} Now download and install the OML client packages: {{{ sudo apt-get update sudo apt-get -y install liboml2 liboml2-dev }}} ==== 4.2. Install JDK/JRE and Maven Build Tools (required for GNRS) ==== Java JRE 1.6 or later is required to run the GNRS server and can be installed as: {{{ #Ubuntu 10.04 sudo apt-get install openjdk-6-jre #Ubuntu 12.04 sudo apt-get install openjdk-7-jre }}} The above is sufficient if the pre-built server jar is available. If building GNRS from the sources then the full JDK and Maven build tools are required: {{{ #Ubuntu 10.04 sudo apt-get install openjdk-6-jdk maven2 #Ubuntu 12.04 sudo apt-get install openjdk-7-jdk maven }}} === 5. Compiling Click with MobilityFirst Elements === Copy sources of MobilityFirst elements and common header files into designated folder under Click sources for compilation: {{{ cd $MF_SRC/router/click/elements cp gstar/* gnrs/* test/* utils/* $CLICK_SRC/elements/local/ cp $MF_SRC/common/include/* $CLICK_SRC/elements/local }}} Now configure and compile Click with flags for user-level operation, to include locally added elements, and to support multi-threading: {{{ cd $CLICK_SRC ./configure --disable-linuxmodule --enable-local --enable-user-multithread make elemlist make sudo make install }}} The last command should install user-level Click binary under /usr/local/bin === 6. Building GNRS Server (optional) === For running MobilityFirst routers with the GNRS instances, use the stable version of the Java-based GNRS server contained within the repository under $MF_SRC/gnrs/jserver. You can find instructions on the main wiki to [[GNRS_Installation|install]] and [[GNRS_Server_Configuration|configure]] the GNRS service. === 7. Compiling Click Monitor (optional) === The OML-based monitor is an independent binary that interacts with router through Click's control interface to report traffic and resource statistics to a OML backend data repository. It is an optional component and can be built as below: {{{ cd $MF_SRC/router/click/monitor make make install }}} The last command will install the binary as /usr/local/bin/mf_click_mon.