openLDAP on EC2
- September 6th, 2011, 6:14 PM
- Posted in general . technology
- Write comment
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:
- 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”.
- 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.
Get source tars for
openldap
berkeley db
mit kerberosPackage installs:
yum install gcc
yum install make
yum install libtool
yum install byaccThese 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-saslkerberos : configure, make, make install, ldconfig
bdb : configure, make, make install
added lib path the /etc/ld.so.conf.d/dbd.conf
ldconfigI 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/nspr4Since that failed, I’m trying GNUtls instead…
yum install gnutls
yum install gnutls-utils
yum install gnutls-develCPPFLAGS=”-I/usr/include/gnutls”
export CPPFLAGSI 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.hAnd 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 LDFLAGSopenldap : 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.
No comments yet.