1. 鎬庢牱鍦║buntu 14.04涓鎼寤篻itolite git鏈嶅姟鍣
1. 棣栧厛榪欓噷鎴戜滑瀹夎卭penssh-serveropenssh-client錛屽傛灉浣犵敤鐨勬槸VPS涔嬬被鐨勪竴鑸閮介粯璁ゅ畨瑁呭ソ浜嗭紝涓嶈繃榪愯屼竴涓榪欎釜鍛戒護涓嶄細鏈夐敊鐨勶紝濡傛灉鏈夊畨瑁呭氨浼氭彁紺哄凡瀹夎呫
sudo apt-get -y install openssh-serveropenssh-client
鎬庢牱鍦║buntu 14.04涓鎼寤篻itolite git鏈嶅姟鍣
2. 瀹夎匞it錛屽湪榪欎釜鏍稿績杞浠訛紝涓嶅彲鎴栫己銆
sudo apt-get -y install git
鎬庢牱鍦║buntu 14.04涓鎼寤篻itolite git鏈嶅姟鍣
3. 娣誨姞gitolite鐢ㄦ埛鍜屽悓鍚嶇敤鎴風粍錛屽姞涓--system鍙傛暟錛岀敤鎴峰氨涓嶄細鍦ㄧ櫥闄嗙晫闈㈡樉紺恆
sudo adser --system --shell /bin/sh--group --disabled-password --home /home/gitolite gitolite
鎬庢牱鍦║buntu 14.04涓鎼寤篻itolite git鏈嶅姟鍣
4. 鐢熸垚ssh key錛屼竴璺鍥炶濺涓嬫潵銆
ssh-keygen -t rsa
鎬庢牱鍦║buntu 14.04涓鎼寤篻itolite git鏈嶅姟鍣
5. 灝嗕綘褰撳墠鐢ㄦ埛鐨剆sh pub key澶嶅埗鍒/tmp涓嬪囩敤錛岀敱浜庢垜鐢ㄧ殑鏄妗岄潰鐗堝湪鍚屼竴鍙版満鍣ㄤ笂銆
cp ~/.ssh/id_rsa.pub /tmp/ubuntugege.pub
濡傛灉浣犳槸ssh榪滅▼鐧婚檰鍒版湇鍔″櫒涓婂畨瑁咃紝灝辮佹妸浣犳湰鍦扮殑key澶嶅埗鍒拌繙紼嬬殑鏈哄櫒涓
scp ~/.ssh/id_rsa.pubgitolite.server:/tmp/ubuntugege.pub
鎬庢牱鍦║buntu 14.04涓鎼寤篻itolite git鏈嶅姟鍣
6. 瀹夎単itolite錛屽湪ubuntu涓宸茬粡闆嗘垚浜嗭紝涓嶇敤鑷宸卞幓涓嬭澆銆
sudo apt-get -y install gitolite
鎬庢牱鍦║buntu 14.04涓鎼寤篻itolite git鏈嶅姟鍣
7. 鍒囨崲鍒癵itolite鐢ㄦ埛鐜澧冧腑錛屽洜涓烘垜瑕佷互gitolite鐢ㄦ埛韜浠藉幓鍒濆嬪寲瀹夎呫
sudo su - gitolite
鎬庢牱鍦║buntu 14.04涓鎼寤篻itolite git鏈嶅姟鍣
8. 鎵ц屽垵濮嬪寲瀹夎単itolite銆
gl-setup /tmp/ubuntugege.pub
鎬庢牱鍦║buntu 14.04涓鎼寤篻itolite git鏈嶅姟鍣
9. 鎶婄$悊搴揼itolite-admin鍏嬮殕榪囨潵灝卞彲浠ュ紑濮媑itolite鐢ㄦ埛鍙婁唬鐮佸簱鐨勭$悊浜嗭紝濡傛灉涓嶈兘鍏嬮殕錛岄偅涔堝氨璇存槑鍒濆嬪寲鐨剆sh pubkey閿欎簡錛屽傚浘灝辨槸鎴愬姛浜嗐
git clonessh://gitolite@localhost/gitolite-admin.git
2. 鎬庝箞鎼寤烘湰鍦癠buntu闀滃儚鏈嶅姟鍣
涓.闇奼傚垎鏋
鏈榪戝叕鍙歌蔣浠禩eam 鏈変釜闇奼傛槸榪欐牱鐨勶細鑳戒笉鑳藉湪灞鍩熺綉鎼寤轟竴涓猆buntu 闀滃儚鏈嶅姟鍣錛
榪欐牱浣滅殑濂藉勬槸鍙浠ヨ妭鐪乁buntu鏌愪簺甯哥敤宸ュ叿鐨勫畨瑁呮椂闂淬
浜.閮ㄧ講榪囩▼
2.1 嫻嬭瘯鐜澧
鐩鍓嶅湪鍏鍙稿唴鏈変竴鍙拌兘榪炴帴鍒板栫綉鐨刄buntu鏈哄櫒錛 IP : 192.168.8.173 錛
Ubuntu鐗堟湰涓篣buntu 9.04 i686銆
2.2 鎼寤烘ラ
涓轟簡鍒涘緩Ubuntu mirror 鏈嶅姟鍣錛屾渶灝戦渶瑕60G紜鐩樼┖闂達紝Ubuntu姣忎釜鐗堟湰閮芥湁32 bit
鍜64 bit涓や釜鐗堟湰錛屾湁涓ょ粍deb鍖呫傚綋鐒跺彲浠ュ壋寤篣buntu涓涓鐗堟湰鐨32 bit 鍜64 bit 鐨
闀滃儚鏈嶅姟鍣錛屼篃鍙浠ュ壋寤哄叏閮ㄧ増鏈鐨勯暅鍍忋
榪欓噷浣跨敤sohu 鍏鍙哥殑mirror鍦板潃浣滀負鏈鍦癠buntu Source 鏈嶅姟鍣錛屼嬌鐢╯ohu鐨勫師鍥犳槸錛
1. sohu鐨刄buntu Source 鏈嶅姟鍣ㄩ熷害鐩稿綋蹇
2. sohu 鐨剈buntu Source 鏈嶅姟鍣ㄦ瘡澶╀細鍜孶buntu瀹樻柟鏈嶅姟鍣ㄥ悓姝ヤ竴嬈★紝榪欐牱鍙浠ヤ繚
璇佹垜浠浣跨敤鐨勬槸鏈鏂扮殑杞浠跺寘銆
淇鏀規柟寮忓備笅錛
root@ms ~: cat /etc/apt/sources.list
deb http://mirrors.sohu.com/ubuntu/ jaunty main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ jaunty-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ jaunty-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ jaunty-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ jaunty-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ jaunty main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ jaunty-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ jaunty-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ jaunty-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ jaunty-backports main restricted universe multiverse
瀹夎呬笅闈㈠伐鍏鳳細
root@ms ~: apt-get install apt-mirror
root@ms ~: apt-get install apache2
涓嬮潰灝辨瀯寤篣buntu 9.04 32bit 鐨勬湰鍦癠buntu mirror 鏈嶅姟鍣ㄤ負渚嬪瓙錛屾潵璇存槑濡備綍閰嶇疆錛
淇鏀歸厤緗鏂囦歡錛
root@ms ~: cat /etc/apt/mirror.list
############# config ##################
#
# set base_path /var/spool/apt-mirror
#
# set mirror_path $base_path/mirror
# set skel_path $base_path/skel
# set var_path $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch
# set postmirror_script $var_path/postmirror.sh
set run_postmirror 0
set nthreads 20
set _tilde 0
#
############# end config ##############
deb-i386 http://mirrors.sohu.com/ubuntu jaunty main restricted universe multiverse
deb-i386 http://mirrors.sohu.com/ubuntu jaunty-security main restricted universe multiverse
deb-i386 http://mirrors.sohu.com/ubuntu jaunty-updates main restricted universe multiverse
#deb http://mirrors.sohu.comubuntu jaunty-proposed main restricted universe multiverse
#deb http://mirrors.sohu.comubuntu jaunty-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu jaunty main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu jaunty-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu jaunty-updates main restricted universe multiverse
#deb-src http://mirrors.sohu.com/ubuntu jaunty-proposed main restricted universe multiverse
#deb-src http://mirrors.sohu.com/ubuntu jaunty-backports main restricted universe multiverse
#clean http://archive.ubuntu.com/ubuntu
澶囨敞錛
deb-i386 http:// 琛ㄧず涓嬭澆32 bit 鐗堟湰鐨刣eb 杞浠
deb http:// 琛ㄧず涓嬭澆64bit 鐗堟湰鐨刣eb 杞浠
jaunty 琛ㄧずUbuntu 9.04鐨勪唬鍙
璁劇疆瀹屾垚鍚庯紝杈撳叆涓嬮潰鍛戒護錛
root@ms ~: apt-mirror
榪欐椂緋葷粺浼氬惎鍔20涓綰跨▼榪愯寃get 鍒 http://mirrors.sohu.com/Ubuntu 涓嬮潰涓嬭澆鐩稿簲鐨
deb鍖呫傛椂闂存瘮杈冪殑闀匡紝璇ュ懡浠ゆ墽琛屽畬鎴愬悗錛/var/spool/apt-mirror鐩褰曚笅灝辨湁浜嗘墍鏈夐渶
瑕佺殑deb鍖呭拰鐩稿簲鐨勯厤緗鏂囦歡銆
鐢變簬鎴戞槸浠巗ohu涓嬭澆鐨勶紝鎵浠ュ疄闄呯殑鏂囦歡鍦 錛
/var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu 鐩褰曚笅銆
榪欐牱錛屾湰鍦板氨鏈変簡鎵鏈塙buntu Source 鏈嶅姟鍣ㄦ墍闇瑕佺殑鏂囦歡錛岀劧鍚庡紑鍚鐩稿簲鐨勬湇鍔★細
榪欓噷浣跨敤apache2浣滀負Web鏈嶅姟鍣錛岄粯璁ゆ牴鐩褰曞湪/var/www/錛屾墍浠ュ彲浠ュ湪璇ョ洰褰曚笅鍋
涓閾炬帴錛屽備笅鎵紺猴細
root@ms ~: cd /var/www
root@ms ~: ln /var/spool/apt-mirror/mirror/mirrors.sohu.com/ubuntu -s
寮鍚痺eb鏈嶅姟錛
root@ms ~: apache2ctl start
鎵撳紑嫻忚堝櫒杈撳叆涓嬮潰鍦板潃鍗沖彲鐪嬪埌鍜宻ohu mirror涓鏍風殑欏甸潰錛
http://192.168.8.173/ubuntu
鍚屾椂涔熷彲浠ヤ嬌鐢╟rontab榪涜屾瘡澶╃殑鏇存柊錛屼慨鏀歸厤緗鏂囦歡錛
root@ms ~: cat /etc/cron.d/apt-mirror
#
# Regular cron jobs for the apt-mirror package
#
#0 4 * * * apt-mirror /usr/bin/apt-mirror > /var/spool/apt-mirror/var/cron.log
鎶婂懡浠ゅ墠闈㈢殑鈥#鈥濆幓鎺夊嵆鍙錛岃繖鏍風郴緇熶細鑷鍔ㄤ嬌鐢╝pt-mirror鍘誨拰sohu鏈嶅姟鍣ㄦ洿鏂般
鏈鍚庯紝鎴戜滑鎵瑕佸仛寰楀氨鏄鍦ㄥ㈡埛絝鐨勬満鍣ㄤ笂淇鏀規洿鏂版簮閰嶇疆鏂囦歡錛屽皢鍦板潃鏀規垚鏈鍦
mirror鏈嶅姟鍣ㄧ殑鍦板潃鍗沖彲錛屽備笅鎵紺猴細
root@ms ~: cat /etc/apt/sources.list
deb http://192.168.8.173/ubuntu/ jaunty main restricted universe multiverse
deb http://192.168.8.173/ubuntu/ jaunty-security main restricted universe multiverse
deb http://192.168.8.173/ubuntu/ jaunty-updates main restricted universe multiverse
deb http://192.168.8.173/ubuntu/ jaunty-proposed main restricted universe multiverse
deb http://192.168.8.173/ubuntu/ jaunty-backports main restricted universe multiverse
deb-src http://192.168.8.173/ubuntu/ jaunty main restricted universe multiverse
deb-src http://192.168.8.173/ubuntu/ jaunty-security main restricted universe multiverse
deb-src http://192.168.8.173/ubuntu/ jaunty-updates main restricted universe multiverse
deb-src http://192.168.8.173/ubuntu/ jaunty-proposed main restricted universe multiverse
deb-src http://192.168.8.173/ubuntu/ jaunty-backports main restricted universe multiverse
鎵ц屸渁pt-get update鈥濇潵閲嶅緩鏈鍦扮儲寮曪紝榪欐牱浠ュ悗灝變細浣跨敤鏈鍦扮殑Mirror 鏈嶅姟鍣ㄨ繘琛屾洿鏂