tar zxvf db-4.8.30.tar.gz
cd db-4.8.30/build_unix/
../dist/configure --prefix=/usr/local/BerkeleyDB
make && make install && cd ../../
echo "/usr/local/BerkeleyDB/lib" >> /etc/ld.so.conf
ldconfig
wget ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.35.tgz
tar zxvf openldap-2.4.35.tgzcd openldap-2.4.35
LDFLAGS="-L/usr/local/BerkeleyDB/lib/" CPPFLAGS="-I/usr/local/BerkeleyDB/include" ./configure --prefix=/usr/local/openldap --enable-static --enable-shared
make depend
make && make install && cd .
2.安装openssl
# tar xzvf openssl-1.0.1.tar.gz
# cd openssl-1.0.1
# ./config -fPIC --prefix=/usr/local/openssl/ enable-shared (一定需要加上-fPIC参数,否则编译安装serf会报错)
# make && make install
安装apr:
./configure --prefix=/usr/local/apr && make && make install
安装apr-util:
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/ \
--with-berkeley-db=/usr/local/BerkeleyDB/ --with-ldap-include=/usr/local/openldap/include/ \
--with-ldap-lib=/usr/local/openldap/lib --with-ldap --with-openssl=/usr/local/openssl
make && make install
安装http:
--with-ssl=/usr/local/openssl/ --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite
http安装完成,启动http:/usr/lcoal/httpd2/bin/apachectl start
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make && make install && cd ..
echo "/usr/local/libiconv/lib" >> /etc/ld.so.conf
ldconfig
cd neon-0.29.6
./configure --prefix=/usr/local/neon && make && make install && cd ..
cd serf-1.0.0
./configure --prefix=/usr/local/serf --with-apr-util=/usr/local/apr-util/ --with-openssl=/usr/local/openssl/
make && make install && cd ..
tar zxvf sqlite-amalgamation-3.7.3.tar.gz
mkdir subversion-1.7.8/sqlite-amalgamation
cp sqlite-3.7.3/sqlite3.c subversion-1.7.8/sqlite-amalgamation
cd sqlite-3.7.3
./configure --prefix=/usr/local/sqlite3
make && make install && cd ../
echo "/usr/local/sqlite3/lib" >> /etc/ld.so.conf
ldconfig
cd ../subversion-1.7.8
LD_LIBRARY_PATH=/usr/local/BerkeleyDB/lib/ \
CPPFLAGS="-I/usr/local/BerkeleyDB/include" \
LDFLAGS="-L/usr/local/BerkeleyDB/lib" \
./configure --prefix=/usr/local/svn \
--with-berkeley-db=db.h:/usr/local/BerkeleyDB/include:/usr/local/BerkeleyDB/lib:db-4.8 \
--with-apxs=/usr/local/httpd2/bin/apxs \
--with-apr=/usr/local/apr/bin/apr-1-config \
--with-apr-util=/usr/local/apr-util/bin/apu-1-config \
--with-serf=/usr/local/serf \
--with-neon=/usr/local/neon/lib \
--with-ssl \
--with-zlib=/usr/lib \
--enable-maintainer-mode
make && make install
cd
echo 'PATH=/usr/local/svn/bin:$PATH' >> /etc/profile
echo 'export SVN_EDITOR=vim' >> /etc/profile
source /etc/profile
5.SVN通过LDAP认证,实现windwos AD中用户登录:
(1)SVN版本库创建:
建立svn版本库存放的根目录:mkdir -p /opt/svndata/
建立svn版本库test:svnadmin create /opt/svndata/test
赋予权限:chown -R daemon:daemon /opt/svndata/test //daemon用户和组是http配置文件中默认的,用来通过http登录svn,可以根据需要进行修改。
netstat -nltp |grep 3690 //svn默认启动端口
(2)
vim /usr/local/openldap/etc/openldap/ldap.conf
添加虚拟主机
![5.png SVN+Apache+LDAP_SVN _03](https://s2.51cto.com/attachment/201308/143734179.png?x-oss-process=image/resize,m_fixed,w_1184)
6.SVN测试:
添加登录用户,并设置权限,vim /opt/svndata/authz
SVN客户端测试:http://192.168.0.223/svndata/test
浏览器登录:
点击登录即可,出现如下说明登录成功: