标签:style c class blog code java
apr-1.5.1.tar.gz apr-util-1.5.3.tar.gz pcre-8.35.tar.gz httpd-2.4.9.tar.bz2 subversion-1.8.9.tar.bz2 zlib-1.2.8.tar.gz
tar zxvf ***.tar.gz tar jxvf ***.tar.bz2
cd apr-1.5.1 ./configure --prefix=/usr/local/apr make sudo make install
cd apr-util-1.5.3 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr make sudo make install
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre make make install
cd pcre-8.35 ./configure --prefix=/usr/local/pcre make make install
sudo apt-get install build-essential
yum install -y gcc gcc-c++
cd zlib-1.2.8/ ./configure --prefix=/usr/local/zlib make sudo make install
cd subversion-1.8.9/ ./configure --prefix=/usr/local/svn --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-zlib=/usr/local/zlib --with-apxs=/usr/local/apache/bin/apxs --enable-maintainer-mode make sudo make install
unzip sqlite-amalgamation-3080403.zip
sudo adduser apache sudo mkdir /usr/svn_root sudo mkdir /usr/svn_root/config sudo mkdir /usr/svn_root/repository sudo chmod -R 770 /usr/svn_root/ sudo chown -R apache:apache /usr/svn_root/
cp /usr/local/svn/libexec/mod_dav_svn.so /usr/local/apache/modules/ cp /usr/local/svn/libexec/mod_authz_svn.so /usr/local/apache/modules/ vi /usr/local/apache/conf/httpd.conf
a修改User和Group为apache账号启动apache User apache Group apache b: 把下面两个行前面的#号去掉,注意行前不能有空格: LoadModule dav_module modules/mod_dav.so LoadModule dav_fs_module modules/mod_dav_fs.so c: 在模块加载的最后添加下面两句: LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so d: 在配置文件最末尾添加: <Location /svn> DAV svn SVNListParentPath on SVNParentPath "/usr/svn_root/repository" AuthType Basic AuthName "Subversion repositories" AuthUserFile "/usr/svn_root/config/passwd.conf" AuthzSVNAccessFile "/usr/svn_root/config/authz.conf" Require valid-user </Location>
sudo /usr/local/svn/bin/svnadmin create /usr/svn_root/repository/repo1
sudo /usr/local/apache/bin/htpasswd /usr/svn_root/config/passwd.conf
wwl
New password:
Re-type new password:
Adding password for user
wwl
sudo /usr/local/apache/bin/htpasswd /usr/svn_root/config/passwd.conf
apache
sudo /usr/local/apache/bin/htpasswd /usr/svn_root/config/passwd.conf
test1
sudo /usr/local/apache/bin/htpasswd /usr/svn_root/config/passwd.conf
test2
第一次增加需要加-c参数(创建新的passwd.conf文件)
vi /usr/svn_root/config/authz.conf
[groups] admin = wwl CM = apache test = test1,test2 [/] * = @admin = rw @CM = r [repo1:/] * = @CM = rw @test = r [repo1:/branches] @test = rw [repo1:/trunk] test2 = rw
[groups]代表组定义:“组名 = 用户1,用户2...”; [repo1:/]代表repo1配置库,repo1是配置库名称; [repo1:/trunk]代表repo1配置库下/trunk目录; @ 符号,则表示这是个群组权限设置; @ admin = rw代表admin 这个组的所有用户有读写权限 test2 = rw代表test2这个用户对trunk有读写权限 PS:注意svn的权限继承关系
10.重启apache:
增加repo1代码库里面文件并上传后,重启apache会看到:
sudo ./usr/local/apache/bin/apachectl restart
题外话:
每次输svn、apache命令都要写绝对地址好烦,ln是你的好帮手
sudo ln /usr/local/svn/bin/* /usr/bin
sudo ln /usr/local/apache/bin/* /usr/bin
Ubuntu 源码方式安装Subversion+Apache2,布布扣,bubuko.com
Ubuntu 源码方式安装Subversion+Apache2
标签:style c class blog code java
原文地址:http://www.cnblogs.com/wwl1991/p/3752696.html