centos6.4 x64位系統安裝apache+ssl+svn vipyhd著作

來源:互聯網
上載者:User

centos6.4 x64位系統安裝apache+ssl+svn vipyhd著作 一、安裝:    yum install httpd httpd-devel mod_dav_svn subversion mod_ssl  a. 確定已經安裝了svn模組:mod_dav_svn           #cd /etc/httpd/modules           #ls | grep svn             mod_authz_svn.so             mod_dav_svn.so       如果要確認是否成功的安裝了svn可以通過如下的命令進行驗證:           svn --version   b. 確認apache能正常啟動。   測試Apache是否可以正常啟動:      #service httpd start   在瀏覽器中訪問:http://localhost, 如果能看到Apache的頁面,則說明Apache已經正常啟動。   Apache命令:         啟動:apachectl -k start / service httpd start         關閉:apachectl -k stop         重啟:apachectl -k restart         查看日誌:tail -f /etc/httpd/logs/error-log二、配置  進入到/etc/httpd/conf.d目錄下用vim開啟subversion.conf設定檔進行選項的  修改:  a. module的配置  一定要保證下面的兩句話存在於設定檔中,否則無法在如svn的模組(如果是用YUM安裝的話,下面兩個模組在安裝的過程中已經改好了)。               LoadModule dav_svn_module     modules/mod_dav_svn.so               LoadModule authz_svn_module   modules/mod_authz_svn.so  b. 倉庫目錄配置              下面將使用svnregister這個倉庫來配置Subversion# mkdir -p /data/svn/repo # cd /data/svn/repo # svnadmin create vipyhd # chown -R apache.apache vipyhd<Location /svn/>              DAV svn              SVNParentPath  /data/svn/repo              SVNListParentPath on              AuthType  Basic              AuthName  ”www.vprisk.com“              AuthUserFile  "/data/svn/userfile"              AuthzSVNAccessFile  "/data/svn/accessfile"              Require  valid_user</Location>RedirectMatch ^(/svn)$ $1/ 下面建立可訪問使用者檔案# htpasswd -c /data/svn/userfile vipyhd要增加使用者,則使用下面命令# htpasswd /data/svn/userfile yhd重起Apacheservice httpd restart  下面建立許可權存取控制檔案,把內容填寫如下紅色字型兩行: # vi /data/svn/accessfile [/] *=rw   重啟apache.# service httpd restart三、如果您的CentOS系統裝了seLinux,還需要進行如下配置,不然會報各種“沒有許可權”錯誤。 編輯/etc/sysconfig/selinux,把SELINUX設定為disable,下次啟動系統後將不會自動啟動SElinux即可。[root@SVNMANAGER repo]# service iptables stop[root@SVNMANAGER repo]# chkconfig --level 345 iptables offSubversion部分安裝完成,開啟瀏覽器訪問http://localhost/svn/vipyhd即可看到效果。四、設定apache開機啟動在/etc/rc.d/rc.local中增加啟動apache的命令,例如:/usr/local/httpd/bin/apachectl start五:#cd /etc/httpd/conf  # openssl genrsa -out httpd.key 1024  產生一個私密金鑰檔案  # openssl req -new -key httpd.key -out httpd.pem -days 3650 -x509再紅線處依次填寫:國家,省份,城市,公司,部門,網路名稱,郵箱完成。修改apache使ssl生效 # vim /etc/httpd/conf.d/ssl.conf-------------------------------#   Server Certificate:# Point SSLCertificateFile at a PEM encoded certificate.  If# the certificate is encrypted, then you will be prompted for a# pass phrase.  Note that a kill -HUP will prompt again.  A new# certificate can be generated using the genkey(1) command.SSLCertificateFile /etc/httpd/conf/httpd.pem#   Server Private Key:#   If the key is not combined with the certificate, use this#   directive to point at the key file.  Keep in mind that if#   you've both a RSA and a DSA private key you can configure#   both in parallel (to also allow the use of DSA ciphers, etc.)SSLCertificateKeyFile /etc/httpd/conf/httpd.key------------------ vi /etc/httpd/conf/httpd.conf<Directory />    Options FollowSymLinks    AllowOverride None    SSLRequireSSL</Directory>加入開機啟動chkconfig httpd onvim /etc/rc.local ----svnserve -d -r /svn/repo

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.