Ubuntu安裝SVN伺服器端

來源:互聯網
上載者:User

Ubuntu安裝SVN伺服器端 Apache Subversion(簡稱SVN,svn),是一個開放原始碼的版本控制系統,相對於的RCS、CVS,採用了分支管理系統,它的設計目標就是取代CVS。互連網上越來越多的控制服務從CVS轉移到Subversion。首先,從鏡像下載安裝svn伺服器端:[plain] sudo apt-get install subversion  進入目錄,準備建立svn目錄:[plain] cd /usr/local/  建立一個svn目錄:[plain] mkdir svn  修改目錄許可權為777:[plain] chmod -R 777 svn  建立一個svn版本倉庫sunny(sunny可以隨便起名字)[plain] svnadmin create /usr/local/svn/sunny   進入sunny版本倉庫下的設定檔目錄:[plain] cd sunny/conf   下面要修改這個目錄下的三個設定檔(1)vi svnserve.conf    //配置版本庫資訊和使用者檔案和使用者密碼檔案的路徑、版本庫路徑[把# anon-access = read# auth-access = write# password-db = passwd//這四行,前面的#號和空格去掉,變成anon-access = none      //改成noneauth-access = writepassword-db = passwdrealm = sunny           //改成自己的版本庫儲存  (2)vi authz     //檔案,建立svn組和組使用者的許可權[group]sunny = gep,wce //建立一個sunny的組,並制定兩個使用者gep和wce  [/]             //制定根目錄下的許可權@sunny = rw     //sunny組使用者權限為讀寫* = r           //其他使用者只有讀許可權儲存退出  (3) vi passwd   //建立或修改使用者密碼[users]gep = 123456    //使用者名稱為gep的使用者的密碼為123456wce = 123456    //。。。儲存退出  然後要設定自啟動[plain] vi /etc/rc.local //<span style="font-family: sans-serif;">開啟自開機檔案</span>  檔案內容如下[plain] #!/bin/sh  #  # This script will be executed *after* all the other init scripts.  # You can put your own initialization stuff in here if you don't  # want to do the full Sys V style init stuff.    touch /var/lock/subsys/local  /usr/local/webserver/mysql/3306/mysql start  ulimit -SHn 51200  /usr/local/webserver/php/sbin/php-fpm start  /usr/local/webserver/nginx/sbin/nginx  svnserve -d -r /usr/local/svn/sunny  #/usr/local/webserver/mysql/bin/mysql -u root -p -S /tmp/mysql.sock   svn命令:[plain] lsof -i :3690   查看svn是否啟動  ps aux |grep 'svn'  尋找所有svn啟動的進程  kill -9 2505    殺死2505這個尋找到的svn進程  svnserve -d -r /usr/local/svn/sunny 啟動svn(可以把這個放到/etc/local/rc.local檔案中,實現開機自啟動)    svn up                        //更新檔案  #svn commit -m "注釋" xxx.php  //提交檔案  svn ci -m'aaa' test.php       //提交檔案    #svn add file               //建立檔案並添加到svn  svn add *.php               //(添加目前的目錄下所有的php檔案)  svn delete test.php         //刪除test.php  svn log test.php            //查看test檔案的log資訊    svn co svn://x.x.x.x ./    //檢出一份版本庫檔案到目前的目錄    svn switch --relocate svn://x.x.x.x  svn://x.x.x.x      //重新置放SVN版本庫地址   

聯繫我們

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