Target OS/Distro = Ubuntu Linux 6.10 or later.
# apt-get install subversion python2.5-dev gawk g++ texinfo libgmp3-dev \ flex bison libmysqlclient15-dev mysql-server make patch autoconf automake\ textutils gettext libtool swig python-pygresql python-gadfly python-medusa \ python-pgsql python-psycopg2
# apt-get install linux-headers-`uname -r`
$ export SRC=~/src $ export OBJ=/disk/$USER/obj $ mkdir $SRC $ mkdir $OBJ
shared and shopt, which turn optimization on and off respectively. Both use shared/dynamic linking.% echo "export FLUME_TAG=shared" >> ~/.bashrc % source ~/.bashrc
% cd $SRC % wget http://dist.okws.org/dist/sfslite-1.2.3.tar.gz % tar -zxf sfslite-1.2.3.tar.gz % cd $OBJ % mkdir sfslite ; cd sfslite % $SRC/sfslite-1.2.3/configure --with-mode=$FLUME_TAG --enable-libsfs % make -j4 % sudo make install
This last install step will put sfslite libraries and include files into /usr/local/{lib,include}/sfslite/$SFSLITE_TAG. Sfslite is a C++ development library for event programming.
Without a kernel patch, Flume will run properly, but confined applications will be able to leak data by manipulating PIDs, session IDs, process group IDs, etc. A kernel patch can close this hole.
We're basing our kernel patch/recompile on suggestions from the Ubuntu forums, which you might consult for further information.
# apt-get install build-essential libncurses5-dev kernel-package libqt3-dev # apt-get install linux-source (or whatever your kernel version is). # cd /usr/src # tar xvjf linux-source-2.6.22 # cd linux-source-2.6.22 # patch -p0 < $SRC/kern/linux-2.6.22.patch # cp /boot/config-`uname -r` .config # CONCURRENCY_LEVEL=10 make-kpkg --initrd --append-to-version=-flume kernel_image kernel_headers modules # dpkg -i linux-image-2.6.22*.deb # dpkg -i linux-headers-2.6.22*.deb
% cd $SRC % svn co svn://flume.csail.mit.edu:3691/flume/pub/trunk flume
% echo 'export "FLUME_USER=$USER"' >> ~/.bashrc % echo 'export LC_CTYPE=C' >> ~/.bashrc % source ~/.bashrc
/etc/group file — add your username to be a member of the group users.nobody a group. Add the following line to /etc/group:nobody:x:65534:nobody
% cd $SRC/flume/linux % mkdir -p $OBJ/flume/build-tree % ln -s $OBJ/flume/build-tree build-tree % make
Installing Flume happens in two steps: first non-root and then root. The root install piece is potentially risk, since it will replace the dynamic linker on your machine.
% make install
The root-install will replace /lib/ld-2.5.so with a new, backwards-compatible Flume equivalent. This is slightly scary, since if it goes wrong, nothing on your machine will work. We've taken some precautions. First, we back up your preexisting linker at /lib/ld-2.5.so.bkp, so if worse comes to worse, you can boot an emergency start-up disk, and then restore it. However, will also install a small static binary /bin/flume-ldso-recover, which you will note is setuid u+s to root. Meaning, if your machine gets hosed due to our new dynamic linker, you can run /bin/flume-ldso-recover as any user and it will recover the backed-up ld-2.5.so, and everything should work as before.
The second thing going on here is that you're install the Flume Linux Security Module (LSM) with root-insmod. This module will not do anything by default, but will turn off most system calls if its features are enabled (via prctl(2)). As of now, this LSM is not compatible with the capability LSM, so we rmmod it for you as we install root-insmod.
% sudo make root-install % sudo make root-insmod
The Flume system requires a tag registry to persistently store the meanings of tags and labels on your Flume system. We've chosen to base the tag registry on a MySQL database. For now, we're running the registry on the same machine as your Flume system, though that need not be in general.
mysqld server is running on your machine.% cd $SRC/flume/linux % sh bin/flume-initdb
% cd /var/tmp ; nohup `flume-cfg srvbin`/idd -f `flume-cfg confdir`/idd.conf.dist &
/disk partition, will Flume will eventually store its data. To get these, edit your /etc/fstab file and add user_xattr as mountpoint option. You will of course have to remount your partition to get these options working.% cd $SRC/flume/linux % python bin/flume-initrm `flume-cfg confdir`/flume.conf.dist
% sudo bash # `flume-cfg srvbin`/flumerm -f `flume-cfg confdir`/flume.conf.dist
It should work….