SVN环境安装
×××
wget http://archive.apache.org/dist/httpd/httpd-2.2.19.tar.bz2
wget http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.6.tar.bz2
wget http://subversion.tigris.org/downloads/subversion-1.6.17.tar.gz
1、安装apr apr-util
cd httpd-2.2.19/srclib/apr
./configure --prefix=/usr/local/apr
make&&make install
cd ../
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make&&make install
2、apache安装
cd httpd-2.2.19
./configure --prefix=/usr/local/webserver/httpd-2.2.19 --enable-dav --enable-so --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr-util/bin/apu-1-config --with-included-apr
make && make install
3、Subversion安装
cd subversion-1.6.17
./configure --prefix=/usr/local/webserver/svn --with-apxs=/usr/local/webserver/httpd-2.2.19/bin/apxs --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr-util/bin/apu-1-config --with-ssl --with-zlib=/usr --enable-maintainer-mode
make && make install
安装报错:
checking sqlite library version (via header)… unsupported SQLite version
checking sqlite library version (via pkg-config)… none or unsupported 3.3
no
An appropriate version of sqlite could not be found. We recommmend
3.6.13, but require at least 3.4.0.
Please either install a newer sqlite on this system
or
get the sqlite 3.6.13 amalgamation from:
http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz
unpack the archive using tar/gunzip and copy sqlite3.c from the
resulting directory to:
/data/software/subversion-1.6.17/sqlite-amalgamation/sqlite3.c
This file also ships as part of the subversion-deps distribution.
configure: error: Subversion requires SQLite
按照以上提示下载sqlite-amalgamation-3.6.13.tar.gz
到svn所在目录
[root@svn subversion-1.6.6]# mkdir sqlite-amalgamation
回到sqlite所在目录
[root@svn soft]# cp sqlite-3.6.13/sqlite3.c /data/software/subversion-1.6.17/sqlite-amalgamation/
再次configure,报错如下:
configure: maintainer-mode: adding GCC warning flags
configure: error: –with-zlib requires an argument.
安装zlib,下载subversion-deps-1.6.6.tar.bz2
cd subversion-1.6.6/zlib/
./configure --shared
make
重新进行安装。
报如下BDB WARNING:
configure: WARNING: we have configured without BDB filesystem support
You don’t seem to have Berkeley DB version 4.0.14 or newer
installed and linked to APR-UTIL. We have created Makefiles which
will build without the Berkeley DB back-end; your repositories will
use FSFS as the default back-end. You can find the latest version of
Berkeley DB here:
http://www.oracle.com/technology/software/products/berkeley-db/index.html
make && make install
二、配置subversion
创建目录
mkdir /data/subversion
创建文件
touch svn-access-file
touch svn-auth-file
2. 创建资料库
svnadmin create /data/subversion/lxsym_web
到lxsym_web下看是不是多了文件,多了就是说明创建成功
三、配置apache的httpd.conf
1、安装subversion后,apache的conf/httpd.conf文件会自动增加模块
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
2、添加修改配置
修改listen 8888 (据实际情况而定)
<Location /svn>
DAV svn
SVNParentPath /data/subversion/
#SVNPath /data/subversion
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /data/subversion/svn-auth-file
Require valid-user
AuthzSVNAccessFile /data/subversion/svn-access-file
</Location>
<Directory /data>
AllowOverride none
Options MultiViews
order allow,deny
Allow from all
</Directory>
添加用户及授权
htpasswd svn-auth-file test1
输入两次密码后,提示成功
Adding password for user test1
vi svn-access-file
[groups]
lxsym_all = admin
[lxsym_web:/]
admin = rw
@lxsym_all = r
test1 = rw
* =
转载于:https://blog.51cto.com/lxsym/739864