导航:首页 > 软件知识 > 程序员的ubuntu怎么搭建

程序员的ubuntu怎么搭建

发布时间:2024-06-07 06:37:33

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 链嶅姟鍣ㄨ繘琛屾洿鏂

阅读全文

与程序员的ubuntu怎么搭建相关的资料

热点内容
西游之路飞羽需要多少数据 浏览:189
重庆衣服批发市场哪个大 浏览:295
哪些nba球员被交易不知情 浏览:963
产品组合包括哪些东西 浏览:785
村代理点代收是什么意思 浏览:9
写源程序怎么写 浏览:832
深圳车公庙到罗湖人才市场怎么走 浏览:355
smartbox是什么产品 浏览:22
什么是保存数据的视频 浏览:446
交易费率是指什么 浏览:407
市场上可以买到哪些海鱼 浏览:101
大数据查多会影响什么吗 浏览:696
计算机编辑程序什么意思 浏览:693
excel中选中所有的数据怎么复制 浏览:385
贵金属理财产品有哪些风险 浏览:630
检测数据nd什么意思 浏览:103
程序员如何做人脉 浏览:231
技术负责人需要学习哪些知识 浏览:630
人才市场的个人档案怎么拿出来 浏览:869
抹茶是哪个交易网站 浏览:859