顯示具有 Open source 標籤的文章。 顯示所有文章
顯示具有 Open source 標籤的文章。 顯示所有文章

2012年3月16日 星期五

svn 程式管理工具

apt-get install subversion


mkdir -p /home/svn/kin1
mkdir -p /home/svn/kin2


svnadmin create /home/svn/kin1
svnadmin create /home/svn/kin2 
mkdir /home/svn/conf 


cp /home/svn/kin1/conf/{authz,passwd} /home/svn/conf 
ll /home/svn/conf 
rm -rf /home/svn/kin{1,2}/conf/{authz,passwd}


vi /home/svn/kin1/conf/svnserve.conf  


[general] 
anon-access = none 
auth-access = write 
password-db = ../../conf/passwd 
authz-db = ../../conf/authz 
realm = kin1 #驗證實會顯示出此訊息



vi /home/svn/kin2/conf/svnserve.conf  


[general] 
anon-access = none 
auth-access = write 
password-db = ../../conf/passwd 
authz-db = ../../conf/authz 
realm = kin2 #驗證實會顯示出此訊息


vi /home/svn/conf/passwd 


[users] 
kin1 = 123456 
kin2 = 123456 
kin3 = 123456 


vi /home/svn/conf/authz  


[groups] 
adm = kin1 
user = kin2,kin3 
[kin1:/] 
@adm = rw 
kin2 =  rw
kin3 = r
[project2:/] 
@adm = rw

kin2 =  r
kin3 = rw


killall svnserve 
svnserve -d -r /home/svn


svn import kin1(目錄) svn://127.0.0.1/kin1/ -m "Version1" --username=kin1 --password=123456 #Import 程式碼目錄到kin1底下


svn co svn://127.0.0.1/kin1/ --username=kin1 --password=123456

2012年3月12日 星期一

linux iostat

這功能可以找出磁碟和CPU的使用狀況,安裝方式待下次測試.

2012年3月11日 星期日

rtorront 安裝過程

須先安裝兩各套件
    libtorrent rtorrent
安裝過程中也需要一些輔助軟體
    automake autoconf devscripts libtool libcppunit-dev
安裝步驟
    # wget http://xxxxxxxxxxxxxxxxx/libtorrent-x.xx.x.tar.gz
    # wget http://xxxxxxxxxxxxxxxxxxx/rtorrent-x.x.x.tar.gz
    # tar -zxvf libtorrent-x.x.x.tar.gz
    # tar -zxvf rtorrent-x.x.x.tar.gz
    # cd libtorrent-x.x.x
    # ./autogen.sh
    # ./configure
    # make
    # make install
    # cd ../rtorrent-x.x.x
    # ./autogen.sh
    # ./configure --with-xmlrpc-c
    # make
    # make install



安裝過程中需要先安裝XMLRPC-C


安裝完rtorrent並執行後若出現rtorrent: error while loading shared libraries: libtorrent.so.13: cannot open shared object file: No such file or directory訊息,可以試試看下面的處理方式:
    就是先修改/etc/ld.so.conf,增加include /usr/local/lib 这一行。再运行ldconfig即可.


安裝完後需在家目錄(cd ~ 即可)新增.rtorrent.rc內容如下:



min_peers = 20
max_peers = 100
min_peers_seed = 5
max_peers_seed = 10
max_uploads = 10
download_rate = 0
upload_rate = 20
directory = /home/kin/filedownload/downloading
session = /home/kin/filedownload/session
port_range = 6881-6881
port_random = no
check_hash = yes
use_udp_trackers = yes
encryption = allow_incoming,enable_retry,prefer_plaintext
peer_exchange = yes
system.method.set_key = event.download.finished,move_complete,"execute=mv,-u,$d.get_base_path=,/home/kin/filedownload/downloads/;d.set_directory=/home/kin/filedownload/downloads/"
schedule = watch_directory,10,10,load_start=/home/kin/filedownload/torrent/*.torrent
schedule = tied_directory,10,10,start_tied=
schedule = untied_directory,10,10,close_untied=
system.method.set_key = event.download.inserted,delete_torrents,"d.delete_tied="
schedule = throttle_1,01:00:00,24:00:00,download_rate=50
schedule = throttle_2,15:00:00,24:00:00,upload_rate=20
encoding_list = UTF-8
dht = auto
dht_port = 6881
execute_nothrow=rm,/tmp/bt_scgi.socket
schedule = chmod,0,0,"execute=chmod,777,/tmp/bt_scgi.socket"
scgi_local = /tmp/bt_scgi.socket
# Enable the default ratio group.
ratio.enable=
# Change the limits, the defaults should be sufficient.
ratio.min.set=200
ratio.max.set=500
ratio.upload.set=5120M
# Changing the command triggered when the ratio is reached.
system.method.set = group.seeding.ratio.command, d.close=, d.erase=
network.send_buffer.size.set = 4M
network.receive_buffer.size.set = 16M