知识屋:更实用的电脑技术知识网站
所在位置:首页 > 操作系统 > linux

Linux 下 Trac SVN apache SSL 配置安装以及整合

发布时间:2014-09-05 17:25:32作者:知识屋

trac + SVN + apache(SSL) 安装
1. 简介:
   由于项目需求,所以要部署一台Trac并且和现有的SVN整合. 至于什么是Trac和SVN,就不多介绍了.
2. 安装步骤:
   (1) 安装apache(此步骤略)
   (2) 安装SVN
   shell > wget http://subversion.tigris.org/downloads/subversion-1.5.6.tar.gz
   shell > tar zxvf subversion-1.5.6.tar.gz
   shell > cd subversion
   shell > ./configure with-apxs=/usr/local/apache/bin/apxs prefix=/usr/local/svn with-apr=/usr/local/apache with-apr-util=/usr/local/apache with-

ssl  enable-maintainer-mode without-berkeley-db PYTHON=/usr/bin/python with-swig=/usr/bin/swig enable-shared enable-static enable-swig-

binding=python
   shell > make && make install
   (3) 配置apache:
       创建证书:
       shell > maker /usr/local/apache/conf/key
       shell > cd /usr/local/apache/conf/key
       shell > openssl genrsa -out xuan-lu.key 1024
       shell > chmod 600 /usr/local/apache/key/xuan-lu.key
       shell > openssl req -new -key xuan-lu.key -out xuan-lu.csr
               You are about to be asked to enter information that will be incorporated
               into your certificate request.
               What you are about to enter is what is called a Distinguished Name or a DN.
               There are quite a few fields but you can leave some blank
               For some fields there will be a default value,
               If you enter ‘.’, the field will be left blank.
               ―
               Country Name (2 letter code) [GB]:CN
               State or Province Name (full name) [Berkshire]:China
               Locality Name (eg, city) [Newbury]:Shang Hai
               Organization Name (eg, company) [My Company Ltd]:99 Roses
               Organizational Unit Name (eg, section) []:99 Roses
               Common Name (eg, your name or your server’s hostname) []:xuan-lu
               Email Address []:martin@xuan-lu.net

               Please enter the following ‘extra’ attributes
               to be sent with your certificate request
               A challenge password []:xuan-lu
               An optional company name []:xuan-lu
       shell > openssl x509 -req -days 365 -in xuan-lu.csr -signkey xuan-lu.key -out xuan-lu.crt
       shell > ls
               xuan-lu.crt  xuan-lu.csr  xuan-lu.key
       配置apache:
       shell > /usr/local/apache/bin/htpasswd -c /home/svn/user/svn_user.conf martin
               New password:
               Re-type new password:
               Adding password for user martin

       shell > vi /usr/local/apache/conf/httpd.conf
                 取消对下的ssl的注释:
               # Secure (SSL/TLS) connections
                 Include conf/extra/httpd-ssl.conf

       shell > vi /usr/local/apache/conf/extra/httpd-ssl.conf
               添加如下:
               <VirtualHost *:443>
                    ServerName svn.xuan-lu.net
                    SSLEngine on
                    SSLCertificateFile "/usr/local/apache/key/xuan-lu.crt"
                    SSLCertificateKeyFile "/usr/local/apache/key/xuan-lu.key"
                 <Location />
                    DAV svn
                    SVNPath /home/svn/xuan-lu/
                    AuthType Basic
                    AuthName "xuan-lu!!! SVN"
                    AuthUserFile /home/svn/user/svn_user.conf
                    AuthzSVNAccessFile /home/svn/xuan-lu/conf/authz
                    Require valid-user
                 </Location>
               </VirtualHost>
       shell > service httpd restart
       注:  解释下SVN 的权限配置文件的使用
            [groups]
            admin = martin
            user_r = user_1
        

(免责声明:文章内容如涉及作品内容、版权和其它问题,请及时与我们联系,我们将在第一时间删除内容,文章内容仅供参考)
收藏
  • 人气文章
  • 最新文章
  • 下载排行榜
  • 热门排行榜