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) [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
添加如下:
ServerName svn.xuan-lu.net
SSLEngine on
SSLCertificateFile "/usr/local/apache/key/xuan-lu.crt"
SSLCertificateKeyFile "/usr/local/apache/key/xuan-lu.key"