Linux下部署apache+svn+ldap验证

来源:岁月联盟 编辑:exp 时间:2011-10-26

 

一:相关版本subversion

 

二:安装准备#cd /opt# tar zxvf httpd-2.2.17.tar.gz# tar zxvf subversion-deps-1.6.15.tar.gz# tar zxvf subversion-1.6.15.tar.gz到这一步,如果是32位的linux系统,可以直接安装httpd了,如果地64位的linux,需要进行以下操作,进行重新编译:1、删除安装目录下的configure文件,在我的环境中是httpd-2.2.6/configure2、删除“httpd-2.2.17/srclib/apr-util/configure”3、通过以下命令重建编译文件(以下命令在http-2.2.17/目录下运行)#./buildconf通过以上重建编译文件,现在可以拥有64位的apr-util了

 

三:httpd的安装.

 

# ./configure --prefix=/usr/local/apache1 --enable-so --enable-dav --enable-dav-fs --enable-ldap --enable-authnz-ldap --with-included-apr --with-ldap --with-ldap-include=/usr/lib64/evolution-openldap/include --with-ldap-lib=/usr/lib64 --with-apr=srclib/apr/apr-1-config --with-apr-util=srclib/apr-util/apu-1-config

 

make&make install

 

四:subversion的安装

 

# ./configure --with-apxs=/usr/local/apache1/bin/apxs --with-apr=/usr/local/apache1/bin/apr-1-config --with-apr-util=/usr/local/apache1/bin/apu-1-config --prefix=/usr/local/subversion --with-ssl --with-zlib=/usr/lib64

 

# make && make install

 

configure 遇到报错:configure: error: Subversion requires SQLite

下载最新sqlite   sqlite-autoconf-3070701.tar.gz   拷贝到如下目录

 

cp sqlite3.c  ~/lamp/subversion-1.6.17/sqlite-amalgamation/

 

make 遇到报错:/usr/bin/ld: cannot find -lexpat

 

yum install expat-devel

 

五:建立

# cd /opt/subversion/bin/

 

# mkdir /svn

 

# ./svnadmin create /svn/test

 

# ls /opt/ccxesvn/test/ 

 

//如果ls /opt/ccxesvn /test/ 出现了下面的内容,就说明subversion安装成功了.

 

conf   dav   db   format   hooks   locks   README.txt

 

 启动服务:/usr/local/subversion/bin/svnserve -d

 

六:修改目录权限#

 

chmod -R 777 /svn

 

 域认证,其他用户没有权限访问

 

七:修改Apache的配置文件1):打开apache/conf/httpd.conf文件2):修改httpd.conf文件,

 

LDAPSharedCacheSize 200000

LDAPCacheEntries 1024

LDAPCacheTTL 600

LDAPOpCacheEntries 1024

LDAPOpCacheTTL 600

<Location /repos>

        DAV     svn

        SVNParentPath /svn

        SVNListParentPath On

        Order allow,deny

        Allow from all

        AuthType        Basic

        AuthBasicProvider       ldap

        AuthzLDAPAuthoritative off

        AuthName        "example work"

        AuthLDAPURL "=*)"

        AuthLDAPBindDN "demo@office.net"

        AuthLDAPBindPassword "123456"

        Require ldap-group CN=ITdev,OU=group,DC=office,DC=net

</Location>

 

重启apache