看到有很多人都在問RHEL5如何安裝subversion等等,很多人無奈安裝的問題就不用RHEL5系統自帶的服務,而自己去編譯,這樣花費了很多不需要的時間,並且RHEL5的這些服務RedHat已經做過安全修改以及優化過的.並且RHEL5的服務本身安裝就十分簡單,RHEL5提供了這些服務,我們還在上面重新編譯,而且並不是因為版本的原因,這樣不是很諷刺嗎?CentOS是用Red Hat Enterprise linux 5的源碼重新編譯的,所以兩個系統基本沒有什麼差別.今天我來跟大家一起在CentOS 5.0做一次這樣的實驗.寫的不清楚的地方,歡迎討論,及時修改。
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運行的用戶和組. 然後查看我們版本庫目錄的屬主屬組是否這個用戶.