CentOS 6.5x64 svnmanager 1.03安裝配置

來源:互聯網
上載者:User

標籤:倉庫   軟體svnmanager   

一、環境

CentOS 6.5x64  Apache/2.2.15  php-5.3.3 mysql-5.1.73

除了上面的軟體外,還有幾個包關係到後面的安裝:

php-mysql

php-pear

mod_dav_svn

直接用yum安裝

二、整合SVN和Apache

 

1.建立倉庫

[[email protected] ~]# mkdir -p /home/svn/repos[[email protected] ~]# svnadmin create /home/svn/repos/test[[email protected] ~]# chown -R apache:apache /home/svn

2.配置apache

在/etc/httpd/conf.d/subversion.conf目錄下查看

LoadModule dav_svn_module modules/mod_dav_svn.soLoadModule authz_svn_module modules/mod_authz_svn.so  #svn使用,順序也要這樣
<Location /svn>   DAV svn   SVNParentPath /home/svn/repos   SVNListParentPath on    #這個是多版本特有的   ##   # Limit write permission to list of valid users.#   <LimitExcept GET PROPFIND OPTIONS REPORT>#      # Require SSL connection for password protection.#      # SSLRequireSSL#      AuthType Basic      AuthName "subversion repository"      AuthUserFile /home/svn/repos/passwdfile      AuthzSVNAccessFile /home/svn/repos/accessfile      Require valid-user#   </LimitExcept></Location>

3.建立密碼檔案及訪問檔案

cd /home/svn/repos

touch passwdfile accessfile

chown apache:apache accessfile passwdfile 

三、安裝和配置svnmanager

 

1.下載svnmanager

http://nchc.dl.sourceforge.net/sourceforge/svnmanager/svnmanager-1.03.tgz

 

解壓並放置到/var/www/html/下

[[email protected] ~]# tar xf svnmanager-1.03.tgz -C /var/www/html/

[[email protected] html]# ln -sv svnmanager-1.03/ svnmanager

2.安裝VersionControl_SVN

 

還記得我們最開始提到的php-pear包,安裝這個包後會有/usr/bin/pear命令,我們使用它來安裝VersionControl_SVN,最新的版本為0.3.1,輸入下面的命令:

#pear install --alldeps VersionControl_SVN-0.3.1


3.向http.conf檔案添加新內容

#vim /etc/httpd/conf/httpd.conf            添加如下內容是為了更安全:

<Directory "/var/www/html/svnmanager/">        AllowOverride None        Order deny,allow        Deny from all        Allow from all</Directory>

4.建立svnmanager使用的mysql資料庫

mysql> create database svn;mysql> grant all privileges on svn.* to ‘svnmanager‘@‘localhost‘ identified by "123456";mysql> flush privileges;mysql> quit

5.更改svnmanager的設定檔

[[email protected] ~]# cd /var/www/html/svnmanager

[[email protected] svnmanager]# cp config.php.linux config.php

[[email protected] svnmanager]# vim config.php

<?php////  SVNManager config.php file for Linux based servers////Shell command‘s$htpassword_cmd                         =       "/usr/bin/htpasswd";$svn_cmd                                =       "/usr/bin/svn";$svnadmin_cmd                           =       "/usr/bin/svnadmin";//Subversion locations$svn_repos_loc                          =       "/home/svn/repos";$svn_passwd_file                        =       "/home/svn/repos/passwdfile";$svn_access_file                        =       "/home/svn/repos/accessfile";//If the following is set, removing a repository will cause it to be//moved to this location rather than being deleted.$svn_trash_loc                          =       "";// If $svnserve_user_file is defined, then SVNManager will create a// user/password file suitable for use with SVNSERVE//// When not set, this feature isn‘t enabled.//// Warning: When enabled, this mode requires that passwords are stored in the database readable!// // Note: When is feature is enabled later, passwords need to be re-set before they are included in//       the svnserve user file.////$svnserve_user_file           =       "/var/www/repos/svnserve_passwd_file"; $svnserve_user_file="";//SMTP Server for outgoing mail$smtp_server                    =       "smtp.mailserver.net";//Data Source Name (only tested with mysql and sqlite!!)//// Use the createtables.sql script to build the tables in a mysql database//// An empty SQLite database will automatically be generated with the first// startup!////Please note that if you change the directory for a SQLite database that you//choose a location that is not accessible via web!!//$dsn                                    =       "mysqli://svnmanager:[email protected]/svn";//The following location is not readable from internet by means of an .htaccess file//$dsn                          =       "sqlite://svnmanager/svnmanager.db";  //Administrator account$admin_name                             =       "admin";$admin_temp_password                    =       "admin";// If $post_create_script is defined, then this script / command will be// executed after a repository is created. // When the script/command is executed the one and only parameter will be// the physical location of the repository.// This might copy a default set of hooks or config files//// $post_create_script = "newrepo-script";?>

6.驗證

重啟apache,然後從瀏覽器裡輸入http://IP/svnmanager,

會自動建svn的資料表,在重新整理後輸入使用者名稱為admin,密碼為admin.

記得進入用建立一個管理員帳號,因為admin一次後失效。

四、漢化

漢化包我也沒有找到。這是已經漢化的版本
1.更改/etc/php.ini檔案,設定default_charset=‘gb2312‘ 或 default_charset=‘gbk‘
2.更改/etc/httpd/conf/httpd.conf檔案,設定AddDefaultCharset GB2312  或AddDefaultCharset GB2312
重啟apache之後就可以看到中文頁面了


本文出自 “營運學習之路” 部落格,請務必保留此出處http://cg831344.blog.51cto.com/6868324/1574071

CentOS 6.5x64 svnmanager 1.03安裝配置

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.