SVN+apache+usvn安装

服务器版本:Redhat Enterprise 5.5 32bit
安装软件:
apr-1.4.5.tar.gz
apr-util-1.3.12.tar.gz
httpd-2.2.21.tar.gz
sqlite-amalgamation-3.7.3.tar
subversion-1.6.17.tar.gz
subversion-deps-1.6.17.tar.gz

1.先安装yum -y install gcc openssl-devel expat-devel openssl-devel libxml2-devel

2 安装apr-1.3.12

tar zxvf apr-1.3.12.tar.gz
cd apr-1.3.12
./configure && make && make install

3.安装apr-util
tar zxvf apr-util-1.3.12.tar.gz
cd apr-util-1.3.12
./configure --with-apr=/usr/local/apr && make && make install

4.安装 apache

#tar zxvfhttpd-2.2.21.tar.gz
#cd httpd-2.2.21
#./configure --prefix=/usr/local/apache2 -enable-dav --enable-so -enable-ssl --enable-maintainer-mode --enable-rewrite --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config
#make && make install

#/usr/local/apache2/bin/apachectl start

通过浏览器访问http://localhost:80,如果页面显示“It works!”,即表示apache已安装并成功。


安装subversion
#tar -zxvf subversion-1.6.17.tar.gz
#tar -zxvf subversion-deps-1.6.17.tar.gz
#cd subversion-1.6.17
#./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --with-ssl --with-zlib=/usr/local/lib --without-berkeley-db --enable-maintainer-mode
#make && make install

注视:如果编译过程中出现configure: error: Subversion requires SQLite,按以下步骤进行后再继续进行上一步操作。

#tar zxvfsqlite-amalgamation-3.7.3.tar.gz
#cd sqllit-3.7.3
#cp sqlite3.c /root/subversion-1.6.17/sqlite-amalgamation/sqlite3.c (路径根据实际目录地址修改)


配置apache,启用SVN
#cat/usr/local/apache2/conf/httpd.conf | grep svn
显示以下信息则为正确安装成功:
LoadModuledav_svn_module modules/mod_dav_svn.so
LoadModuleauthz_svn_module modules/mod_authz_svn.so



建立仓库
#mkdir -p/home/svnroot/repository
#vim /etc/profile
PATH=$PATH:/usr/local/subversion/bin 添加环境变量
#source /etc/profile

#svnadmin create/home/svnroot/repository/file 创建file为项目名

#svn import /qiangneng file:///home/svnroot/repository/file -m "qiangneng" 假设我们以前的项目文件在/qiangneng目录下,现在导入到file库里

#chown -R apache:apache /home/svnroot/repository

配置http服务器
#vim /usr/local/apache2/conf/httpd.conf
<Location /svn>
DAV svn
SVNParentPath /home/svnroot/repository/
AuthzSVNAccessFile /home/svnroot/repository/authz.conf
AuthType "Basic"
AuthName "SubVersion"
AuthUserFile /home/svnroot/repository/valid-user
Require valid-user
</Location>

修改
User apache
Group apache

生成valid-user密码文件
#/usr/local/apache2/bin/htpasswd -c/home/svnroot/repository/valid-user admin
会提示输入密码,这个密码以后就是访问http时的用户口令。
如果要继续添加用户,去掉-c 选项,使用:

#"/usr/local/apache2/bin/apachectlrestart"重启apache服务

#通过浏览器访问"http://ip/svn/file",如果提示输入用户名、密码的话,配置成功。

配置用户访问SVN的权限

vi/home/svnroot/repository/authz.conf
[file:/]
admin = rw
重启apache服务器 /usr/local/apache2/bin/apachectlrestart
在浏览器里输入http://ip/svn/file


USVN配置
前提条件安装php环境
安装sqlite-amalgamation-3.7.3.tar
#tar –zxvf sqlite-amalgamation-3.7.3.tar
#cd sqlite-amalgamation-3.7.3
#../confugre --prefix=/usr/local/Sqlite
#make
#make install

#mkdir /web
#cd /web
#sqlite3 usvn.db 提供数据库连接
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值