So, adventure #1. As mentioned in a previous post, I’m trying to use Amazon’s free service to its maximum extent. Here is how that went down:

  • Installed the default “amzn-ami-2011.02.1.x86_64-ebs (ami-8e1fece7)” image (the default 64 bit amazon linux image) in a micro instance. Make sure to assign it to the same zone as where you will create your extra storage (the free gig gives you access to 10G)
  • I spent a mess of time getting connected the first time. My initial attempts to install a base image, get it connected up with the appropriate key pairs and be able to authenticate in via ssh, were relatively hampered by ignorance (or poor documentation… or perhaps just poor reading skills). They key thing with this:
  1. Be sure to use one of the instances labelled with the yellow/orange star. These are considered “available” for the free offer. Try to use one of the instances images marked as “EBS”.
  2. The key to this, no pun intended, is the keypair that you establish when you make the instance. Some of the images DO NOT support the keypair automation that is part of the instance launcher thinger. If the image doesn’t support it, you won’t be able to connect.
Ok, on to installing. That image is a pretty comprehensive image for general running of things, but it is not well designed for compiling stuff. Unfortunately (well, at least that I was able to find) there is no yum/package installer for openldap. Thus, the following procedure instead:

Get source tars for
openldap
berkeley db
mit kerberos

Package installs:
yum install gcc
yum install make
yum install libtool
yum install byacc

These 4 can probably be skipped (see FAIL, below), but I left them in just in case there is some weird dependency I can’t think of:

yum install nspr
yum install nspr-devel
yum install nss
yum install cyrus-sasl

kerberos : configure, make, make install, ldconfig
bdb : configure, make, make install
added lib path the /etc/ld.so.conf.d/dbd.conf
ldconfig

I went down the road of trying to use MozNSS first, but those efforts ultimately failed. You can skip this as a result (most likely):
CPPFLAGS=-I/usr/include/nspr4

Since that failed, I’m trying GNUtls instead…

yum install gnutls
yum install gnutls-utils
yum install gnutls-devel

CPPFLAGS=”-I/usr/include/gnutls”
export CPPFLAGS

I could have added -I includes to CPPFLAGS, but since it was just two files, I decided to create symbolic links to the default directory instead:

ln -s /usr/local/BerkeleyDB.5.2/include/db.h /usr/include/db.h
ln -s /usr/local/BerkeleyDB.5.2/include/db_cxx.h /usr/include/db_cxx.h

And upload link paths:

LD_LIBRARY_PATH=/usr/local/BerkeleyDB.5.2/lib
export LD_LIBRARY_PATH
LDFLAGS=”-L/usr/local/BerkeleyDB.5.2/lib”
export LDFLAGS

openldap : configure, make depend, make, make test
holy crap make test runs for a long time.
make install, all worked!

I may continue this in another post talking about openLDAP configuration, but this is good enough for now.

Share