qqruser 发表于 2018-11-26 08:19:24

Trac SVN apache SSL 配置安装

trac + SVN + apache(SSL) 安装
(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) :CN
               State or Province Name (full name) :China
               Locality Name (eg, city) :Shang Hai
               Organization Name (eg, company) :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.crtxuan-lu.csrxuan-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
               添加如下:
               
                  ServerName svn.xuan-lu.net
                  SSLEngine on
                  SSLCertificateFile "/usr/local/apache/key/xuan-lu.crt"
                  SSLCertificateKeyFile "/usr/local/apache/key/xuan-lu.key"
                  
                  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
                  
               
       shell > service httpd restart
       注:解释下SVN 的权限配置文件的使用
            
            admin = martin
            user_r = user_1





页: [1]
查看完整版本: Trac SVN apache SSL 配置安装