该死的Oracle做的下载很恶心,必须要验证才能下,所以这里就假设大家已经下载好了bdb并命名为bdb.tar.gz # install BerkelyDB for openldap # while BerkeleyDB can not be download directly from internet for fucking autherization # we assume there already exist one source package named 'bdb.tar.gz' mkdir bdb tar xvzf bdb.tar.gz -C bdb/ || exit cd bdb/db-5.1.19/build_unix ../dist/configure --prefix=$base/bdb/ || exit make || exit make install || exit;
安装openldap # install openldap mkdir openldap wget -c ftp://ftp.dti.ad.jp/pub/net/Open ... stable-20100719.tgz || exit tar xvzf openldap-stable-20100719.tgz -C openldap || exit cd openldap/openldap-2.4.23 CPPFLAGS=-I$base/bdb/include LDFLAGS=-L$base/bdb/lib LIBS=-ldb ./configure --prefix=$base/openldap || exit make || exit make install || exit; 安装apache apache安装时要指明支持ldap,为此必须使用apr和apr-util。可以独立编译apr和apr-util,也可以指定—with-included-apr来编译apache内部的apr和par-util。我们就偷懒用内置的了。 # install apache mkdir httpd wget -c http://labs.renren.com/apache-mirror//httpd/httpd-2.2.17.tar.gz tar xvzf httpd-2.2.17.tar.gz -C httpd || exit cd httpd/httpd-2.2.17/ # here, we encounter the "APR-util version must be 1.2.0 or later" problem, while certainly we have already installed apr-util # while I can't solve the apr-util version problem, but with --with-included-apr, I come over it and for simply, the apr and apr-util # do not need installed independently, perfect! ./configure --prefix=$base/httpd --enable-so --enable-dav=share --enable-dav-fs --enable-ldap --enable-authnz-ldap --with-included-apr --with-ldap --with-ldap-include=$base/openldap/include --with-ldap-lib=$base/openldap/lib #--with-apr-util=$base/apr-util/bin/apu-1-config --with-apr=$base/apr/bin/apr-1-config --with-ldap || exit make make install;
安装sqlite: # install sqlite for subversion mkdir sqlite wget -c http://www.sqlite.org/sqlite-autoconf-3070400.tar.gz || exit tar xvzf sqlite-autoconf-3070400.tar.gz -C sqlite || exit cd sqlite/sqlite-autoconf-3070400/ ./configure --prefix=$base/sqlite || exit make make install;
安装subversion: # install subversion mkdir subversion wget -c http://subversion.tigris.org/downloads/subversion-1.6.15.tar.gz || exit tar xvzf subversion-1.6.15.tar.gz -C subversion || exit cd subversion/subversion-1.6.15/# the apr and apr-util should use the bundled one from apache ./configure --prefix=$base/subversion --with-apxs=$base/httpd/bin/apxs --with-sqlite=$base/sqlite --with-apr=$base/httpd/bin/apr-1-config --with-apr-util=$base/httpd/bin/apu-1-config || exit make make install; 脚本 ldapsvn.sh BerkeleyDB必须验证后才能下载,所以脚本假设文件已经下载到build目录下。其他源代码默认是从网上下载的,但鉴于下载速度,建议提前把已下载好的文件放在标准目录下。
为支持用户信息验证,需要指定network information service对应的schema,配置信息如下: include /path/to/openldap/etc/openldap/schema/cosine.schema include /path/to/openldap/software/etc/openldap/schema/nis.schema