导航:首页 > 软件知识 > 程序员的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怎么搭建相关的资料

热点内容
刑事案简易程序要多久 浏览:211
各视频会员怎么代理 浏览:423
北京怎么运作会计代理记账 浏览:794
微信小程序有什么游戏经营类 浏览:725
代理市长什么时候出现 浏览:813
三流产品怎么引流 浏览:340
人口迁移数据为什么不能查询 浏览:101
手游如何交易安全 浏览:85
去南方人才市场需要准备什么 浏览:931
南昌廉租房信息在哪里查 浏览:275
吉林普洱茶叶如何代理 浏览:100
主机入侵检测系统利用哪些信息 浏览:993
怎么教孩子垒球技术 浏览:352
朝阳附近工商代理多少钱 浏览:555
所有程序菜单中标黄色是什么意思 浏览:128
单行道逆行多少天信息 浏览:591
伽思珂护发素怎么代理 浏览:761
三甲基铝产品有什么用 浏览:678
小程序风口在什么地方 浏览:563
系统还原数据丢失怎么办 浏览:673