linux + apache2 + php5 + mysql5檔案下載:
- Svnmanager →http://svnmanager.sourceforge.net/
- 首先安裝Subversion
apt-get install subversion libapache2-svn
- 安裝pear的VersionControl_SVN
pear install -f -o VersionControl_SVN
PS:要是出現The program 'pear' is currently not installed. You can install it by typing: apt-get install php-pear 請安裝pear
apt-get install php-pear
- 將所下載的Svnmanager解壓縮到網頁的網址底下
- 將裡面的config.php.linux改名成config.php
- 建立2個檔案和2個資料夾
mkdir /var/svn mkdir /var/svn/reops touch /var/svn/htpasswd touch /var/svn/accessfile
- 設定資料夾和檔案全限為apache可以控制
chown -R www-data.www-data /var/svn/ chown -R www-data.www-data /var/svn/reops/ chown -R www-data.www-data /var/svn/htpasswd chown -R www-data.www-data /var/svn/accessfile
- 設定apache2中的svn
vi /etc/apache2/mods-enabled/dav_svn.conf
- 修改為
<Location /svn> DAV svn AuthType Basic AuthName "Subversion Repository" SVNParentPath /var/svn/repos AuthUserFile /var/svn/htpasswd AuthzSVNAccessFile /var/svn/accessfile Require valid-user </Location>
- 重啟apache2
/etc/init.d/apache restart
- 設定Svnmanager的config
vi config.php
- 將裡面修改成下面一樣
$svn_config_dir = "/var/svn/reops"; $svn_repos_loc = "/var/svn/reops"; $svn_passwd_file = "/var/svn/htpasswd"; $svn_access_file = "/var/svn/accessfile"; $dsn = "mysqli://root:root@localhost/svn";
PS:mysqli後面為帳號:密碼@網址/資料庫名稱
- 建立資料庫
mysql -u root -p
- 鍵入SQL
CREATE DATABASE svn; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER on svnmanager.* to svnmanager identified by 'secret'; FLUSH PRIVILEGES;
- 開啟網頁
- 在開啟一次輸入預設管理帳號密碼
帳號:admin
密碼:admin
- 創立第一個管理者帳號
PS:創立完畢admin就失效,請一定要勾選Admin
- 創立專案
- 設定使用者權限