ubuntu下apache+svn源码编译配置


所需下载源码
1.apache2 httpd-2.2.19.tar.gz
2.subversion -1.6.6.tar.gz
3.sqlite-amalgamation.tar.gz
4.apr-1.4.5.tar.gz
5.apr-util-1.3.12.tar.gz
6.zlib zlib-1.2.5.tar.gz
 
一.apache2 安装
1.解压 tar -zxvf httpd-2.2.19.tar.gz 解压后文件夹名称为 /soft/httpd-2.2.19
2.进入解压后的目录 cd /soft/httpd-2.2.19 执行
./configure --prefix=/soft/apache --enable-module=so --enable-dav --enable-so --enable-maintainer-mode --enable-rewrite
然后 make 然后 sudo make install
 
二.subversion 安装
进入解压后的目录,运行:
$ ./autogen.sh
这个脚本会告诉你是否系统需要安装 autoconf,libtool 等,如果缺少这些,则可以通过 apt-get 来安装, autoconf 需要 V2.58 以上, libtool 需要 V1.4 以上。
用 apt-cache showpkg autoconf 来查看版本号,用下面命令安装:
$ sudo apt-get install autoconf
$ sudo apt-get install libtool
然后可以运行 ./configure 脚本,此脚本会告诉你缺少哪些依赖的库,在我的系统中缺少 sqlite 和 apr, apr-util
 
解压 subversion: tar -zxvf subversion.tar.gz  解压后文件夹名称为 subversion
解压 sqlite: tar -zxvf sqlite-amalgamation.tar.gz 解压后文件夹名称为 sqlite-amalgamation 只留下sqlite3.c
解压 apr: tar -zxvf apr-1.4.5.tar.gz 解压后文件夹名称 apr
解压 apr-util: tar -zxvf apr-util-1.3.12.tar.gz 解压后文件夹名称 apr-util
解压 zlib: tar -zxvf zlib-1.2.5.tar.gz 解压文件夹名称 zlib
把apr,apr-util,sqlite-amalgamation,zlib 拷贝到subversion
此时文件夹机构为
subversion
--apr
--apr-util
--sqlite-amalgamatio
--zlib
进入apr 执行
  1.  ./buildconf
  2. .configure
  3. make
  4. sudo make install
 
进入apr-util
  1.  ./buildconf
  2. .configure --with-prefix=/soft/subversion/apr
  3. make
  4. sudo make install
 
进入 zlib
1.  ./configure
2.  make
3   sudo make install
进入subversion
1.  ./configure --prefix=/soft/svn --with-apxs=/soft/apache/bin/apxs --with-apr=/soft/subversion/apr --with-apr-util=/soft/subversion/apr-util --with-ssl --with-zlib=/soft/subversion/zlib --enable-mailtainer-mode
2. make
3. sudo make install
 
三.配置apache
 进入 vi /soft/apache/conf/httpd.conf
ServerName 127.0.0.1:8088(如果80端口占用还要修改 listener:80 改为listener:8088
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /svn>
DAV svn
SVNParentPath /soft/repository/
AuthzSVNAccessFile /soft/repository/authz.conf
AuthType Basic
AuthName "Subversion.zoneyump"
AuthUserFile /soft/repository/authfile
Require valid-user
</Location>
 
建立配置库
mkdir /soft/repository/mac
./svnadmin create /soft/repository/mac
增加用户
# htpasswd [-c] /soft/repository/authfile test
权限分配
# vi /soft/repository/authz.conf
[mac:/]
test= rw
 
启动apache
/soft/apache/bin/httpd -k start
 
在浏览器输入地址
http://localhost:8088/svn/mac

本玩出自“wjavahot”
 

相关内容

    暂无相关文章