1
|
[root@localhost ~]
# yum install gcc gcc-++ make pcre-devel zlib-devel -y
|
1
2
3
4
|
[root@localhost ~]
# tar zxvf apr-1.4.6.tar.gz
[root@localhost ~]
# cd apr-1.4.6
[root@localhost apr-1.4.6]
# ./configure --prefix=/usr/local/apr
[root@localhost ~]
# make && make install
|
1
2
3
4
|
[root@localhost ~]
# tar zxvf apr-util-1.4.1.tar.gz
[root@localhost ~]
# cd apr-util-1.4.1
[root@localhostapr-util-1.4.1]
# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
[root@localhost ~]
# make && make install
|
1
2
3
4
5
|
[root@localhost ~]
# tar zxvf httpd-2.4.7.tar.gz
[root@localhost ~]
# cd httpd-2.4.7
[root@localhost httpd-2.4.7]
#./configure --prefix=/usr/local/apache --enable-dav --enable-so--enable-rewrite --enable-maintainer-mode --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/
[root@localhost ~]
# cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
[root@localhost ~]
# sed -i 's/#ServerName.*/ServerName localhost/' /usr/local/apache/conf/httpd.conf
|
1
2
3
4
|
[root@localhost ~]
# tar zxvf sqlite-autoconf-3080200.tar.gz
[root@localhost ~]
# cd sqlite-autoconf-3080200
[root@localhostsqlite-autoconf-3080200]
# ./configure
[root@localhostsqlite-autoconf-3080200]
# make && make install
|
1
2
3
4
|
[root@localhost ~]
# tar zxvf subversion-1.8.5.tar.gz
[root@localhost ~]
# cd subversion-1.8.5
[root@localhostsubversion-1.8.5]
# ./configure --prefix=/usr/local/subversion--with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util/
[root@localhostsubversion-1.8.5]
# make && make install
|
1
2
3
|
[root@localhost ~]
# echo "PATH=$PATH/:/usr/local/subversion/bin" >> /etc/profile
[root@localhost ~]
# source /etc/profile
[root@localhost ~]
# svnserve -version #显示版本信息表示正常
|
1
2
3
4
|
[root@localhost ~]
# groupadd svn
[root@localhost ~]
# useradd -g svn -s /sbin/nologin svn
[root@localhostsubversion-1.8.5]
# cp subversion/mod_dav_svn/.libs/mod_dav_svn.so/usr/local/apache/modules/
[root@localhostsubversion-1.8.5]
# cp subversion/mod_authz_svn/.libs/mod_authz_svn.so /usr/local/apache/modules/
|
1
2
3
4
5
|
[root@localhost ~]
# vi /usr/local/apache/conf/httpd.conf
User svn
Group svn
LoadModule dav_svn_module modules
/mod_dav_svn
.so
LoadModule authz_svn_module modules
/mod_authz_svn
.so
|
1
2
3
4
5
6
7
8
9
10
11
|
[root@localhost ~]
# mkdir /svn
[root@localhost ~]
# svnadmin create /svn/test
[root@localhost ~]
# vi /usr/local/apache/conf/httpd.conf
<Location
/svn
>
#url访问路径
DAV svn
#声明
SVNParentPath
/svn
#svn仓库根目录
AuthType Basic
#基本认证
AuthName
"PleaseLogin"
#登陆时提示信息
AuthUserFile
/usr/local/apache/
.
passwd
#用户密码文件
Require valid-user
#允许所有用户访问
<
/Location
>
|
1
2
3
|
[root@localhost ~]
# /usr/local/apache/bin/htpasswd -c -m /usr/local/apache/.passwd user1
[root@localhost ~]
# chown :svn /usr/local/apache/.passwd
[root@localhost ~]
# service httpd restart
|