ºìÁªLinuxÃÅ»§
Linux°ïÖú
µ±Ç°Î»ÖÃ: ºìÁªLinuxÃÅ»§ > Debian

DebianÀ©Õ¹ÏµÍ³µÄ°²×°

·¢²¼Ê±¼ä:2007-11-24 00:24:16À´Ô´:ºìÁª×÷Õß:basiozwq
ûÓбêÌâµÄ¡°À©Õ¹ÏµÍ³¡±ÕâÖÖ˵·¨£¬¹Ù·½½Ð×ö"additional package"£¬Ö¸Debianϵͳ³ý»ù±¾ÏµÍ³Ö®ÍâµÄ²¿·Ö¡£»ù±¾ÏµÍ³µÄ°üÊDZØÐèµÄ[1]£¬ÕâÊÇËüºÍÀ©Õ¹ÏµÍ³µÄ°üÖ®¼äΨһµÄÇø±ð¡£°²×°À©Õ¹ÏµÍ³£¬°üÀ¨»ù±¾ÏµÍ³µÄÉý¼¶Î¬»¤£¬ÒªÓõ½°ü¹ÜÀíϵͳ¡£DebianµÄ°ü¹ÜÀíϵͳÓÐÒ»´ó×幤¾ß£¬ÕâÀïÖ»½éÉÜ×î³£Óõļ¸¸ö¡£

µÚÒ»¸ö£¬Ò²ÊÇ×î»ù±¾µÄdpkg£¬¼´Debian PacKaGe£¬¸ºÔð´¦Àí±¾µØµÄÈí¼þ°ü£¬°üÀ¨°²×°Ð¶Ôصȡ£Èç¹ûÒª°²×°±¾µØµÄÒ»¸ö°ü£¬±ÈÈçfoo.deb(Debian°üµÄÀ©Õ¹ÃûΪdeb)£¬ÄÇô×î¼òµ¥µÄÃüÁî¾ÍÊÇdpkg -i foo.deb, жÔØbar.deb¾ÍÊÇdpkg -r bar.deb£¬²ÎÊý-i -r¼´install remove[2]¡£

ÓÐÁËdpkgÖ®ºóÒ»¸ö×ÔÈ»µÄÎÊÌâÊÇÈçºÎÓÐЧµØµÃµ½debÎļþ£¬ÕâÊÇapt(Advanced Package Tool)ϵÁй¤¾ßµÄÖ÷ÒªÈÎÎñÖ®Ò»¡£ÔÚ½éÉÜapt֮ǰҪÏÈ˵Ã÷Ò»ÏÂDebianÄÇ21ÕÅCD¹²18000¶à¸ö°üÊÇÔõô×éÖ¯µÄ¡£´ò¿ªDebianÖ÷Õ¾ftp£¬ËùÓеİü¶¼·ÅÔÚpoolĿ¼Ï£¬¸ù¾ÝËüÃǵÄlicenseºÍsupport·½Ê½µÄ²»Í¬·ÖΪmain contrib non-freeÈýÀà¡£mainĿ¼°üÀ¨×ÔÓÉÈí¼þ¡¢¿ÉÒÔ×ÔÓÉ·¢²¼µÄÈí¼þºÍ±»DebianÍŶÓÍêÈ«Ö§³ÖµÄÈí¼þ£»contribÊǾèÏ×µÄÈí¼þ£¬²»±» DebianÍŶÓÖ§³Ö£¬µ«¿ÉÒÔ×ÔÓÉ·¢²¼£»non-free¼´·Ç×ÔÓÉÈí¼þ£¬Ê¹ÓÃʱӦעÒâ°æȨ¡£Ã¿¸öĿ¼Óֳַɶà¸ö×ÓĿ¼£¬ÕâÊdzöÓÚ·ÃÎÊËٶȵĿ¼ÂÇ£¬Èç¹ûÒ»¸öĿ¼ÓдóÁ¿Îļþ£¬ÄÇôËüµÄ·ÃÎÊËٶȻáºÜÂý¡£È»ºó¶ÔÕâЩ°üËùÔÚµÄλÖÃÉú³ÉһϵÁеÄË÷ÒýÎļþ£¬·ÅÔÚdistsĿ¼Ï£¬Óû§¸ù¾ÝÏÂÔصÄË÷ÒýÎļþÔÙÈ¥ÏÂÔØÐèÒªµÄ°ü¡£¸ù¾ÝÈí¼þ°üµÄÎȶ¨ÐÔ£¬Éú³ÉÈýÀàË÷ÒýÎļþ£¬·Ö±ðÊÇstable testing unstable[3]£¬ÒÔÂú×㲻ͬÓû§µÄÐèÒª¡£ÓÚÊÇʹÓÃaptϵÁй¤¾ßʱҪÏÈÅäÖúð²×°Ô´(±ÈÈçÉÏÃæµÄftp¡¢Debian¾µÏñÕ¾µã¡¢±¾µØ¹âÅ̵È)£¬ÅäÖÃÎļþÔÚ/etc/apt/Ŀ¼Ï£¬ÎÒÃÇÏÖÔÚÖ»Óõ½sources.list[4]¡£

Æô¶¯DebianÒÔrootÕʺŵǼ[5]£¬ÓÃnano±à¼­Æ÷´ò¿ªsources.list:

nano /etc/apt/sources.list

¿ÉÒÔ¿´µ½ÒÔ"deb cdrom"¿ªÍ·µÄÒ»ÐУ¬¾ÍÊÇ°²×°»ù±¾ÏµÍ³Ê±µÄ°²×°Ô´¡£ÏÖÔÚÎÒÃDz»ÔÙÓÃËü£¬ÔÚ¸ÃÐÐÐÐÊ×ÊäÈë"#"ºÅ°ÑËü×¢Ê͵ô¡£ÁíÆðÒ»ÐÐÊäÈë

deb ftp://ftp.debian.org/debian testing main contrib non-free

ctrl+o(×Öĸ£¬ÆÁĻϷ½ÓÐÌáʾ)±£´æ£¬Ìáʾ±£´æµÄÎļþÃû£¬¾ÍÊÇ/etc/apt/sources.list£¬»Ø³µÈ·ÈÏ£¬ÔÙctrl+xÍ˳ö½áÊø±à¼­¡£À´¿´¿´ÎÒÃÇÊäÈëµÄÄÇÐÐÊÇʲôº¬Òå¡£

debÒâΪÕâÒ»ÐÐÖ¸¶¨µÄÔ´ÊǶþ½øÖÆÈí¼þ°üÔ´£¬ÏàÓ¦µÄ»¹ÓÐdeb-src£¬¼´Ô´ÂëÈí¼þ°üÔ´¡£½ÓÏÂÈ¥ÊÇdistsËùÔÚĿ¼µÄµØÖ·£¬ÕâÀïÔÝʱÓÃÖ÷Õ¾µÄµØÖ·¡£ÔÙºóÃæÊÇtesting£¬¾ÍÊÇDebian testing·¢Ðа档×îºóÈýÏî(¿ÉÒÔÓÐÈÎÒâ¶àÏî)Ç°ÃæÒÑÓнéÉÜ£¬Èç¹ûÖ»ÏëÓÃmainµÄ°ü£¬¿ÉÒÔ°ÑÁíÁ½ÏîÈ¥µô¡£sources.listÎļþ¿ÉÒÔͬʱָ¶¨¶à¸ö°²×°Ô´£¬Ã¿¸öÔ´Õ¼Ò»ÐУ¬Ð´ÔÚÇ°ÃæµÄÔ´ÓÅÏȼ¶½Ï¸ß¡£

Ç°ÃæÒѾ­ÅäÖúÃÁË°²×°Ô´£¬ÏÖÔÚ¸üаüµÄË÷ÒýÎļþ£¬ÒÔ±¸Éý¼¶»ù±¾ÏµÍ³¡¢°²×°ÐµÄÈí¼þ°ü¡£ÔËÐÐaptitude£¬°´u¼ü¸üаüË÷ÒýÎļþ(²Ëµ¥À¸ÏÂÃæµÄ°´¼üÌáʾ)£¬¸üкó³öÏÖ°üµÄ¶à¸ö·ÖÀà¡£ÔÚaptitudeÖУ¬"j"¼üÏòÏÂÒƶ¯¹â±ê¡¢kÉÏ¡¢h×ó¡¢lÓÒ£¬»Ø³µÕ¹¿ª/ÕÛµþĿ¼¡¢²é¿´°üµÄÐÅÏ¢£¬qÖð¼¶Í˳ö£¬/ ÏòÏÂËÑË÷°ü\·´Ïò£¬nËÑË÷ÏÂÒ»¸öNÉÏÒ»¸ö£¬+±ê¼ÇÒª°²×°µÄ°ü-±ê¼ÇжÔØ£¬gÖ´ÐвÙ×÷¡£¸ü¶àµÄ°´¼ü¿ÉÒÔ°´?²é¿´£¬Ò²¿ÉÒÔctrl+tÔڲ˵¥À¸ÖÐÕÒµ½(ÔÙ ctrl+tÍ˳ö²Ëµ¥)¡£[6]

ÕâʱÎÒÃÇ¿ÉÒÔÖ±½ÓÔÚupgradable packagesÉÏ°´+Éý¼¶»ù±¾ÏµÍ³»òÕß°²×°ÐèÒªµÄ°ü£¬µ«ÎÒÃÇÏ£ÍûÕÒ¸öÍøËÙ¿ìµãµÄ°²×°Ô´¡£Èç¹ûÄã¿ÉÒÔ´ÓÉí±ßµÄLinuxÓû§ÈºÖеÃÖª¿ìËÙµÄDebian°²×°Ô´£¬ÄÇÔÚ¸Õ²ÅÅäÖð²×°Ô´Ê±¿ÉÒÔÉè³ÉÕâ¸öÔ´£¬²¢ÇÒÌø¹ýÏÂÃæÒ»²½£¬·ñÔò¿ÉÒÔÓÃÏÂÃæµÄ·½·¨ÕÒµ½±È½Ï¿ìµÄ°²×°Ô´¡£ÔÚaptitudeÖбê¼Ç°²×°apt-spy£¬¼´ÏÈ°´"/"²éÕÒ"apt-spy"£¬ÕÒµ½ºóÔÚapt-spyÉÏ°´"+"¼ü£¬°´gÏÔʾ¼´½«Òª²Ù×÷µÄ°ü£¬·Ö³ÉÁ½Àà: "packages being held back"ºÍ"packages to be installed"£¬µÚÒ»ÀàÊÇÏÖÔÚ¿ÉÒÔÉý¼¶µ«Óû§²»´òËãÉý¼¶µÄ°ü£¬µÚ¶þÀàÖ»ÓÐapt-spy¡£ÔÙ°´g¿ªÊ¼ÏÂÔØ°²×°£¬Èç¹ûûÓдíÎóÕâÑùapt-spy¾Í×°ºÃÁË¡£½ÓÏÂÈ¥ÓÃapt-spyÑ°ÕÒ×î¿ìµÄÔ´£¬ÃüÁî¸ñʽÊÇÕâÑùµÄ

apt-spy -d testing -a Asia -o /etc/apt/sources.list

-d testing¼´testing·¢Ðа棬-a Asia¼´ÔÚAsia·¶Î§ÄÚ²éÕÒ£¬±±ÃÀд³ÉNorth-America£¬Õâ¿ÉÒÔͨ¹ýman apt-spyÕÒµ½£¬-o /etc/apt/sources.list¼´°Ñ½á¹ûдÈë/etc/apt/sources.list¡£Ö´ÐÐÕâÌõÃüÁîÊǸöÂþ³¤¶øÒ»ÀÍÓÀÒݵĹý³Ì£¬Íê³ÉºóËü½«°Ñsources.listÐ޸ijÉÕÒµ½µÄ×î¿ìµÄÔ´¡£Ö´ÐÐÏÂÃæµÄÃüÁî¿ÉÒÔ¿´µ½Ð޸ĺóµÄsources.list

cat /etc/apt/sources.list

ÏÖÔÚÎÒÃÇ¿ÉÒÔ¿ìËÙµØÉý¼¶»ù±¾ÏµÍ³ÁË£¬ ÔÚaptitudeÖа´u¸üаüË÷Òý£¬ÔÙÔÚupgradable packagesĿ¼ÉÏ°´+Éý¼¶µ±Ç°Óиüеİü£¬apt-spyÒѾ­Ã»Óô¦ÁË£¬Ëѵ½ºó°´-жÔØ£¬°´gÈ·ÈÏ£¬ÔÙ°´gÖ´ÐвÙ×÷¡£°²×°Ê±³öÏÖ¼üÅÌÓ³ÉäºÍÖØÆô cronµÄÑ¡Ïѡdon't touch keymapºÍÈ·Èϼ´¿É¡£Íê³ÉºóÖ´ÐÐrebootÖØÆô(°²×°ÁËÐÂÄںˣ¬Ê¹ÓÃËüÒªÖØÆô)£¬ÔÚgrubÖÐÑ¡ÔñʹÓÃÐÂÄÚºËÆô¶¯¡£

½ÓÏÂÀ´¸öÈ˵çÄÔ¿ÉÒÔ°²×°Í¼ÐνçÃ棬¼´X Window£¬ËüÓÉX·þÎñÆ÷ºÍ×÷Ϊ¿Í»§¶ËµÄX³ÌÐò×é³É¡£ÏÈ°²×°X·þÎñÆ÷£¬¿ÉÒÔÓÃxserver-xorg£¬°²×°¹ý³ÌÖÐҪѡÔñ·Ö±æÂÊ£¬Óÿոñ¼üÑ¡¡£ÔÙ°²×°»ù±¾µÄX³ÌÐò£¬¼´×ÀÃæ»·¾³»òÕß´°¿Ú¹ÜÀíÆ÷¡£ÎªÁËÈëÃÅÈÝÒ×£¬ÎÒÃÇ¿ÉÒÔÓÃGNOME×ÀÃæ»·¾³»òÕßKDE×ÀÃæ»·¾³£¬ÔÚÎÒ¿´À´ÕâÁ½ÕߵIJî±ðÖ»ÊÇGNOME±È½ÏÎȶ¨¶øKDE±È½ÏƯÁÁ¡£»ù±¾µÄGNOMEÖ»Ðè°²×°gnome-coreºÍgdm(µÇ¼Æ÷£¬¿ÉÑ¡)£»»ù±¾µÄKDEÖ»Ðè°²×°kde-coreºÍÓïÑÔ°ü(¼òÌåÖÐÎÄ°üÊÇkde-i18n-zhcn£¬Ó¢ÎľͲ»ÓÃ×°ÁË)£¬ÅäÌ׵ĵǼÆ÷kdmÔÚ°²×°kde-coreʱ»á×Ô¶¯×°ÉÏ¡£ÖÐÎÄ×ÖÌå¿ÉÒÔÓÃxfonts-wqy¡£ÊäÈë·¨¿ÉÒÔÓÃscim£¬Æ´Òô¼Óscim- pinyin£¬Îå±Ê¼Óscim-tables-zh[7]¡£×°ÍêºóÖ´ÐÐ

/etc/init.d/kdm start

(GNOMEÊÇgdm)Æô¶¯Í¼ÐεǼ½çÃ棬Èç¹ûÏÔ¿¨Çý¶¯Ã»ÎÊÌ⣬Õâʱ¾Í¿ÉÒÔʹÓÃ×ÀÃæ»·¾³ÁË¡£Í¼ÐνçÃæ¿ÉÒÔÔÚÖÕ¶Ë(GNOMEÊdzÌÐò->¸½¼þ->Öնˣ¬KDEÊÇϵͳ¹¤¾ß->Konsole)ÖÐÊäÈëÃüÁî¡£

ÆäËüÈí¼þµÄ°²×°ÍêÈ«ÀàËÆ¡£ÕâÀïÓиö³£ÓÃÈí¼þµÄÁÐ±í£¬ÊÇÎÒ¸øÉÏÖÜÈÕk´óLinux Install PartyдµÄ£¬¿É¹©²Î¿¼¡£(±ðÔÙ˵ÎÒÅÅ°æÅŵòîÁË)

ÕâÀïÓÐÒÔÉϹý³ÌµÄÆÁĻ¼Ïñ¡£Â¼ÏñÖа²×°Ô´Éè³ÉÁËk´óµÄÔ´£¬apt-spyÐÞ¸Äsources.listÖ®ºóÓÖ¸ÄÁË»ØÈ¥¡£Éý¼¶»ù±¾ÏµÍ³Ê±ÓÉÓÚÓиö°üÆÆËð£¬ËùÒÔÉý¼¶ÁËÁ½´Î¡£ÖØÆôʱ·ÖÇøÓдíÎó£¬ËùÒÔÖØÆôÁËÁ½´Î£¬Õâ¸öÔÚÆäËü»úÆ÷ÉÏÒ»°ã²»»á·¢Éú¡£×ÀÃæ»·¾³°²×°µÄÊÇKDE¡£×îºóÔÚµã»÷µÄ×¢Ïú->¹Ø»ú£¬Â¼ÏñÖÐûÏÔʾ³öÀ´¡£

[1]²»È·ÇУ¬Óм¸¸ö°üÊÇ¿ÉÒÔɾ³ýµÄ¡£»ù±¾ÏµÍ³´óÖÂÊÇÕâЩ°üµÄÒ»¸ö×îС×Ó¼¯£ºÈûúÆ÷ÅÜÆðÀ´£¬ÔÙÌṩÉÙÁ¿¼òªµÄ¹¤¾ß£¬Ê¹µÃϵͳÈÝÒ×À©Õ¹¡£µ±ÏµÍ³À©Õ¹Ö®ºó£¬¾Í²»»áÔÙÓÃÕâЩ¼òªµÄ¶«Î÷¡£

[2]¸ü¶àµÄ²ÎÊý¿ÉÒÔÔÚ°ïÖúÊÖ²áÖÐÕÒµ½£¬dpkg --help¸ø³ö²ÎÊýÁбíºÍ¼òµ¥µÄ˵Ã÷£¬man dpkg, info dpkg¿ÉÒԲ鿴ÏêϸµÄÊֲᣬ°´qÍ˳ö¡£ÆäËüµÄÃüÁîÒ²ÊÇÀàËƵģ¬--help²ÎÊýÒ²¿ÉÄÜÊÇ-h£¬infoÃüÁîµÃµ½µÄÊÖ²á´óÖÂÊÇ×îÏêϸµÄ¡£ÈçºÎÓÐЧµØʹÓÃÊֲᡢÎĵµÊǸöѧÎÊ£¬²»ÊÇÒ»ÏÂ×ÓÄÜÕÆÎյġ£

[3]stableµÄ°üÔÚÒ»¸ö°æ±¾ºÅÖÐ(ÏÖÔÚÊÇ4.0)²»±ä£¬ËüÌṩ×îÎȶ¨Ò²ÊÇ×îÀϵİü£¬Ò»°ãÓÃÔÚ·þÎñÆ÷µÈ¶ÔÎȶ¨ÐÔÒªÇó¸ßµÄϵͳÖС£ unstableÖеİü¼¸ºõÊÇ×îеģ¬ËæÖ®¶øÀ´µÄÊÇbug¶à£¬ÊʺÏϲºÃ³¢Ð»òÕßÕÛÌÚµÄÓû§¡£testingÔò½éÓÚÁ½ÕßÖ®¼ä¡£unstableÓиöÓÀ¾ÃµÄ±ðÃû½Ð×ösid(Still In Development)£¬stableºÍtestingµÄ±ðÃûËæ°æ±¾ºÅ¸Ä±ä£¬ÔÚ4.0ÖзֱðÊÇetchºÍlenny¡£ÕâÈý×é²ÎÊý±íÕ÷ÁËÒ»¸ö¾ßÌåµÄ·¢Ðа棬±ÈÈç"Debian sid·¢Ðаæ"¡£ºóÃæÎÒÃǽ«Ê¹ÓÃtesting°æ±¾£¬Äܹ»ÊìÁ·µØʹÓÃDebianʱÔÙÓÃunstable°æ¡£

[4]Õâ¸öÅäÖÃÎļþµÄ˵Ã÷: man sources.list

[5]³öÓÚ°²È«Ô­Òò£¬*nixϵͳµÄÓû§·ÖΪ³¬¼¶Óû§(root)ºÍÆÕͨÓû§£¬root¶ÔÕû¸öϵͳµÄ×ÊÔ´ÓÐËùÓÐȨ£¬ÆÕͨÓû§¶Ô²¿·Ö×ÊÔ´²ÅÓÐËùÓÐȨ¡£±ÈÈçÒ»¸öÆÕͨÓû§Öж¾Ê±£¬Ë𻵵ÄÎļþ×î¶à¾ÍÊDZ»Õâ¸öÓû§ËùÓеÄÎļþ£¬ÏµÍ³Îļþ²»»áË𻵡£Òò´ËÒ»°ãÇéÐÎÏÂÖ»ÓÃÆÕͨÓû§È¨ÏÞ²Ù×÷£¬ÔÚÅäÖÃϵͳ¡¢°²×°Èí¼þµÈÐèÒª rootȨÏ޵IJÙ×÷ʱ²ÅÓÃroot¡£ÓÉÆÕͨÓû§×ªµ½rootÓû§Ê¹ÓÃsuÃüÁî¡£

[6]DebianÏÂÔصİü°²×°ºó£¬.debÎļþ²»»á×Ô¶¯É¾³ý£¬´æ·ÅÔÚ/var/cache/apt/archivesÏ£¬¿ÉÒÔÔڲ˵¥ÖÐclean package cacheɾ³ý¡£

[7]°²×°È·ÈÏʱ°Ñttf-arphic-bsmi001pºÍttf-arphic-gbsn001pÁ½¸ö°üÈ¥µô£¬ÕâÁ½¸ö×ÖÌå²»ºÃ¿´¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ