Submin1安裝記錄(CentOS5)

安裝SVN和Apachepython

wget http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco -O /tmp/RPM-GPG-KEY-WANdisco &>/dev/null
rpm --import /tmp/RPM-GPG-KEY-WANdisco
rm -rf /tmp/RPM-GPG-KEY-WANdisco

  wget http://opensource.wandisco.com/centos/5/RPMS/x86_64/mod_dav_svn-1.6.18-1.x86_64.rpm
  wget http://opensource.wandisco.com/centos/5/RPMS/x86_64/subversion-1.6.18-1.x86_64.rpm
  wget http://opensource.wandisco.com/centos/5/RPMS/x86_64/subversion-devel-1.6.18-1.x86_64.rpm
  wget http://opensource.wandisco.com/centos/5/RPMS/x86_64/subversion-perl-1.6.18-1.x86_64.rpm
  wget http://opensource.wandisco.com/centos/5/RPMS/x86_64/subversion-python-1.6.18-1.x86_64.rpm
  wget http://opensource.wandisco.com/centos/5/RPMS/x86_64/subversion-tools-1.6.18-1.x86_64.rpmlinux

  yum install subversion-1.6.18-1.x86_64.rpm
  yum install subversion-perl-1.6.18-1.x86_64.rpm
  yum install subversion-python-1.6.18-1.x86_64.rpm
  yum install subversion-tools-1.6.18-1.x86_64.rpm
  yum install mod_dav_svn-1.6.18-1.x86_64.rpm
  yum install subversion-devel-1.6.18-1.x86_64.rpmapache

備註:CentOS上源碼安裝Subversion很是麻煩,因此直接使用wandisco的RPM。centos

安裝Submin:session

cd /usr/local/src
wget http://supermind.nl/submin/current/submin-1.2.11-1.tar.gz tar -zxvf submin-1.2.11-1.tar.gz
cd submin-1.2.11-1
python bin/install.py /usr/local/
/usr/local/bin/submin-admin create default

     Apache files created:
     /etc/submin/default-apache-wsgi.conf
     /etc/submin/default-apache-cgi.conf
     Please include one of these in your apache config. Also make sure that
     you have mod_dav_svn and mod_authz_svn enabled.
     Created submin configuration with default user admin (password: admin)svn

將生成的default-apache-cgi.conf文件鏈接到httpd配置文件目錄下的conf.d,這樣這個配置自動加載入httpd.conf中
ln -s /etc/submin/default-apache-cgi.conf /etc/httpd/conf.d/submin.conf
ls -lst /etc/httpd/conf.d/submin.conf
4 lrwxrwxrwx 1 root root 35 Sep  8 15:31 /etc/httpd/conf.d/submin.conf -> /etc/submin/default-apache-cgi.conf

建立SVN倉庫ui

svnadmin create /home/svn

將SVN倉庫關聯到Subminurl

cd /var/lib/submin
ln -s /home/svn /var/lib/submin/svn/svn

確認submin的default.conf配置文件spa

cd /etc/submin
view default.conf

    [svn]
    authz_file = /var/lib/submin/authz (SVN權限文件)
    userprop_file = /var/lib/submin/userproperties.conf (submin用戶文件)
    access_file = /var/lib/submin/htpasswd (SVN用戶文件)
    repositories = /var/lib/submin/svn (submin對應的SVNParentPath位置)code

 

    [www]
    base_url = /submin
    svn_base_url = /svn
    trac_base_url = http://example.com/trac (要添加這一項,不然Submin頁面中在配置SVN倉庫權限的時候,會報錯。)

 

    [backend]
    bindir = /usr/local/share/submin/bin

    [generated]
    session_salt = 92fcc/nQ/01AG3ny

 確認&修改submin的default-apache-cgi.conf配置文件:

cd /etc/submin
vi default-apache-cgi.conf

    Alias /submin /usr/local/share/submin/www
    <Directory /usr/local/share/submin/www>
      Order allow,deny
      Allow from all
      Options ExecCGI FollowSymLinks
      AddHandler cgi-script py cgi pl
      SetEnv SUBMIN_CONF /etc/submin/default.conf

      RewriteEngine on
      RewriteBase /submin

      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^(.+)$ submin.cgi/$1

      RewriteRule ^/?$ submin.cgi/
    </Directory> 

    LoadModule dav_svn_module modules/mod_dav_svn.so
    LoadModule authz_svn_module modules/mod_authz_svn.so

    <Location /svn>
      DAV svn
      SVNParentPath /var/lib/submin/svn(SVNParentPath位置)

      AuthType Basic
      AuthName "Subversion repository"

      AuthUserFile /var/lib/submin/htpasswd(SVN用戶文件)
      AuthzSVNAccessFile /var/lib/submin/authz(SVN權限文件)

      Satisfy Any
      Require valid-user
    </Location>

 閉selinux的保護設置:

vi /etc/selinux/config
修改SELINUX=disabled

setenforce 0

啓動Apache:

service httpd start
相關文章
相關標籤/搜索