b.创建SVN用户的认证数据库
*********************************Command*********************************
[root@rep /]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8 to server version: 5.0.22
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
6.使https生效.
在这之前要先确认我们使用的域名,ServerName
修改/etc/httpd/conf/httpd.conf
ServerName "***.****.***"
因为向CA提交我们的数字证书是需要收费的,我们测试的时候可以使用生成测试证书.
[root@rep etc]# cd /etc/pki/tls/
[root@rep tls]# rm private/localhost.key -f #删除旧的证书文件
[root@rep tls]# openssl genrsa 1024 > private/localhost.key #生成服务器测试密钥
Generating RSA private key, 1024 bit long modulus
...............++++++
.....................................................++++++
e is 65537 (0x10001)
[root@rep tls]# cd certs/
[root@rep certs]# make testcert #生成测试证书
umask 77 ; \
/usr/bin/openssl req -utf8 -new -key /etc/pki/tls/private/localhost.key -x509 -days 365 -out /etc/pki/tls/certs/localhost.crt -set_serial 0
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]:BeiJing
Locality Name (eg, city) [Newbury]:BeiJing
Organization Name (eg, company) [My Company Ltd]:RTS InfoTech
Organizational Unit Name (eg, section) []:System Management
Common Name (eg, your name or your server's hostname) []:"***.****.***" #这里填写的内容一定要与你域名相符,否则证书会显示不合法
Email Address []:Rain.Li@rts-it.com
排错的过程主要是依靠查看系统日志,tail /var/log/httpd/ssl_error_log.所有的错误已经在这里描述的很清楚了.
下面给两个常见的错误,以及解决的方法.
1.验证不通过,查看日志后发现
[Mon Aug 20 20:53:05 2007] [error] [client 192.168.101.99] MySQL user "USERNAME" not found: /svn/test
[Mon Aug 20 20:53:05 2007] [error] [client 192.168.101.99] MySQL ERROR: Access denied for user 'authuser'@'localhost' (using password: YES)
一般情况是httpd.conf配置文件对mysql用户帐号密码描述有问题.
2.认证通过,但是没有权限
我们可以查看一下httpd.conf文件里面apache运行的用户和组.
然后查看我们版本库目录的属主属组是否这个用户.