Garey's Blog–FreeBSD/PHP/GoLang

五月 7th, 2010

FreeBSD下SubVersion的安装

5,037 views, FreeBSD, by garey.

一、安装apache
cd /usr/ports/www/apache22
make install clean
BDB

echo mysql_enable="YES" >> /etc/rc.conf

二、安装subversion
cd /usr/ports/devel/subversion
make install clean
MOD_DAV_SVN,APACHE2_APR,MOD_DONTDOTHAT

三、配置apache虚拟主机
vi httpd.conf
# Virtual hosts
Include etc/apache22/extra/httpd-vhosts.conf

vi extra/httpd-vhosts.conf
<VirtualHost *:80>
        DocumentRoot "/home/garey/htdocs"
        ServerName garey.bsdart.org

        <Directory "/home/garey/htdocs">
               Options +Indexes +Multiviews
               order allow,deny
               allow from all
        </Directory>

        # Subversion Settings
        <Location /svn>
                DAV svn
                SVNParentPath /home/garey/svnroot/repos
                AuthType Basic
                AuthName "Svn Repository"
                AuthUserFile /home/garey/etc/svn-passwd
                AuthzSVNAccessFile /home/garey/etc/svn-access
                Require valid-user
        </Location>
</VirtualHost>

cd /home/garey/svnroot/repos
svnadmin create Project1
chmod -R 777 Project1
cp Project1/hooks/pre-revprop-change.tmpl Project1/hooks/pre-revprop-change
chmod +x Project1/hooks/pre-revprop-change

cd /home/garey/etc
vi svn-access
[/]
garey = rw

htpasswd -c svn-passwd garey
输入两次密码

启动apache
/usr/local/etc/rc.d/apache22 start

之后就是客户端的设置了。

Back Top

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*