ºìÁªLinuxÃÅ»§
Linux°ïÖú

RHCE±¸¿¼Ö¸ÄÏ[¼¼Êõ´óȫƪ£¬¿¼Õâ¸öÈÏÖ¤µÄÅóÓѽøÀ´Ñ§Ï°]

·¢²¼Ê±¼ä:2006-02-05 10:31:40À´Ô´:ºìÁª×÷Õß:·çÓêÎÞ×è
µÚÒ»Õ »ù±¾ÒªÇó
µÚÒ»½Ú »ù´¡ÖªÊ¶
linuxºÍunix¶¼ÊÇͨ¹ýһϵÁеÄÎı¾ÎļþÀ´½øÐйÜÀí¡£Linuxϵͳ¹ÜÀíԱͨ³£²»Ê¹ÓÃͼÐα༭Æ÷À´¹ÜÀíÕâЩÅäÖÃÎļþ¡£¸÷ÖÖÁ÷Ðеı༭Æ÷µÄ¸ñʽÀýÈ磺word¡¢startofficeµÈµÈ£¬linux¶¼ÎÞ·¨Ê¶±ð¡£Linux³£ÓõÄÎı¾±à¼­Æ÷ÓÐÕâô¼¸ÖÖ£ºvi¡¢pico¡¢joe¡¢emacs¡£¾¡¹Üemacs¿ÉÄÜÊÇlinuxÊÀ½ç×îÁ÷Ðеı༭Æ÷£¬µ«ÊÇϵͳ¹ÜÀíÔ±ÈÔÈ»±ØÐ붮µÃviµÄ»ù±¾Ê¹Óá£Emacs¸ü¼ÓÁé»î¸ü¼ÓÁ÷ÐУ¬vi¿ÉÒÔ°ïÖúÄã»Ö¸´ÏµÍ³¡£Èç¹ûÄãҪʹÓýô¼±Òýµ¼ÅÌÀ´»Ö¸´Ò»¸öÖØÒªµÄÎļþ£¬viÊÇΨһ¿ÉÓõı༭Æ÷¡£
ʵ¼ÊÉÏ£¬RHEL 3 ʹÓÃÔöÇ¿°æ±¾µÄvi,¼´vim.ËüÔö¼ÓÁËÑÕÉ«À´¶ÔÖØÒªµÄÎļþ½øÐÐÇø·Ö¡£ËùÓеÄvi ÃüÁÊÇÔÚvim±à¼­Æ÷£¬Äã¿ÉÒÔͨ¹ýÔÚvim±à¼­ÆäÖÐʹÓãºnohlÃüÁîÀ´È¥µôÑÕÉ«£¬Õâ²¢²»»á¶ÔÄã¹ÜÀíϵͳ´øÀ´ÈκÎÓ°Ïì¡£
ViµÄ»ù±¾Ó÷¨£ºvi filename
»ù±¾ÃüÁi ²åÈë
o ²åÈëÐÂÐÐ
:w±£´æ
:qÍ˳ö
:wq!±£´æ²¢Ç¿ÖÆÍ˳ö
:q!²»±£´æÇ¿ÐÐÍ˳ö
Á·Ï°1£ºÊ¹ÓÃviÀ´Ôö¼ÓÐÂÓû§
1¡¢#vi /etc/passwd,ʹÓÃÃüÁîyy¿½±´µ±Ç°ÐУ¬Ê¹ÓÃÃüÁîp¸´ÖƳöÒ»ÐÂÐУ¬È»ºóÐ޸ġ£¸Ä±äÓû§Ãû£¬Óû§idÓû§×éid£¬ÒÔ¼°homeĿ¼¡£¸ü¸ÄÍê³ÉºóʹÓÃÃüÁî:wq!±£´æÍ˳ö¡£
2¡¢¸ü¸ÄÐÂÓû§µÄÃÜÂ룺passwd username
3¡¢½¨Á¢Óû§µÄÖ÷Ŀ¼£ºmkdir /home/username

µÚ¶þ½Ú ÎļþϵͳµÄ²ã´Î½á¹¹
linuxÖеÄÈκÎÊÂÇ鶼¿ÉÒÔ¹é½áΪһ¸öÎļþ¡£·ÖÇøºÍÎļþϵͳÉ豸½Úµã¹ØÁª£¬ÀýÈ磺/dev/hda1¡£Ó²¼þ×é¼þ¶ÔÓ¦ÓÚ½ÚµãÎļþÈ磺/dev/modem¡£¼ì²âµ½µÄÉ豸ÔÚ/procĿ¼Öд浵¡£FHSÊÇÓÃÀ´×éÖ¯linuxºÍunixÎļþµÄ·½·¨¡£
»ù±¾Îļþϵͳ²ã´Î½á¹¹£º
/ ¸ùĿ¼£¬linuxµÄ×î¸ß¼¶Ä¿Â¼
/bin »ù±¾µÄÃüÁîÐй¤¾ß£¬²»Ó¦¸Ãµ¥¶À¹Ò½Ó¡£
/boot Òýµ¼Ä¿Â¼£¬°üº¬linuxµÄÆô¶¯Îļþ£¬ÆäÖÐÓÐlinuxÄںˡ£Ä¬ÈÏ´óС
Ϊ100M
/dev ËùÓÐÈíÓ²¼þÉ豸µÄÇý¶¯£¬²»Òª½«´ËĿ¼µ¥¶À¹Ò½ÓÔÚÒ»¸ö·ÖÇøÉÏ
/etc ´æ·Å´ó¶àÊýµÄ»ù±¾ÅäÖÃÎļþ
/home ´æ·Å´ó¶àÊýÓû§µÄÖ÷Ŀ¼
/lib Äں˳ÌÐò¿âÒÔ¼°¸÷ÖÖÃüÁîÐй¤¾ß¡£²»Òª½«´ËĿ¼¹Ò½ÓÔÚµ¥¶ÀµÄ·ÖÇøÉÏ
/mnt ¿ÉÒƶ¯É豸µÄ¹Ò½Óµã£¬°üÀ¨ÈíÅÌ£¬¹âÇýµÈ
/opt ´æ·ÅÓ¦ÓóÌÐò£¬Èçwordperfect¡¢openofficeÌ×¼þµÈ
/proc µ±Ç°ÔËÐеĺÍÄÚºËÏà¹ØµÄ½ø³Ì£¬°üÀ¨IRQ ports,I/OµØÖ·,DMAͨµÀ
/root rootÓû§µÄÖ÷Ŀ¼
/sbin ϵͳ¹ÜÀíÃüÁ²»Òªµ¥¶À¹Ò½Ó
/tmp ÁÙʱÎļþ¼Ð
/usr ¶ÔËùÓÐÓû§¿ÉÓõÄС³ÌÐò£¬°üÀ¨Ò»Ð©ÏµÍ³¹ÜÀíÃüÁîºÍ¹¦ÄÜ
/var ¿É±äµÄÊý¾Ý°üÀ¨ÈÕÖ¾Îļþ£¬´òÓ¡³Ø
ÎļþϵͳµÄ¸ñʽ¼°¼ìÑé
ÓÃÀ´¶Ô²»Í¬µÄÎļþϵͳ½øÐйÜÀíµÄ¹¤¾ßÓÐÈçϼ¸ÖÖ£ºfdisk¡¢mkfs¡¢fsck
fdisk:¸ÃÃüÁÄÜÇ¿´ó£¬µ«Ê¹ÓøÃÃüÁÄã±ØÐëÖªµÀÄãÐèÒª¶ÔÄǸöÓ²Å̽øÐиü¸Ä£¬¼´±ØÐëÖ¸¶¨¶ÔÓ¦µÄÉ豸¡£Èç¹ûÄãÒª¹ÜÀíµÚÒ»¸öscsiÓ²ÅÌÊäÈëÈçÏÂÃüÁfdisk /dev/sda
fdiskÃüÁa Ö¸¶¨Òýµ¼·ÖÇø
l ÁгöÒÑÖª·ÖÇøµÄÀàÐÍ
n Ôö¼ÓеķÖÇø
q²»±£´æÍ˳ö
t ¸Ä±ä·ÖÇøµÄÎļþϵͳ
mkfs:¸ñʽ»¯Ò»¸ölinuxÎļþϵͳ£¬Ê¹ÓÃmkfsÃüÁÀýÈ磺
mkfs -t ext3 /dev/hda1
fsck:´ÅÅ̼ì²éÃüÁÀàËÆÓÚwindows 2000µÄchkdsk£¬Ê¹ÓøÃÃüÁî֮ǰӦ½«ËùÒª¼ì²éµÄ´ÅÅÌжÔØ£¬ÀýÈçÒª¼ì²é¹Ò½ÓÔÚ/varĿ¼ÏµÄhda7·ÖÇø£º#umount /var
#fsck -t ext3 /dev/hda7
#mount /dev/hda7 /var
Á·Ï°£º´´½¨ÐµÄlvm·ÖÇø
1¡¢ Ôö¼ÓÒ»¸öеÄÓ²ÅÌ
2¡¢ ´´½¨ÁËÒ»¸öеķÖÇø£¬Ê¹ÓÃfdisk¹¤¾ß½«¸Ã·ÖÇøÉèΪlvmÎļþϵͳ¡£
3¡¢ ±¸·Ý/homeĿ¼
4¡¢ ʹÓÃvgscanÃüÁɨÃèlvmÎļþϵͳ£¬ÎªÆäËûµÄlvmÃüÁî´´½¨Êý¾Ý¿â
5¡¢ ʹÓÃpvcresate /dev/partition´´½¨¾í
6¡¢ ʹÓÃvgcreate groupname /dev/partition1 /dev/partition2ÃüÁî´´½¨¾í×é
7¡¢ ʹÓÃlvcreate -L -xyM -n volname groupname groupname´´½¨Âß¼­¾í£¬xyÊǾíµÄ´óС¡£
8¡¢ ×îºóʹÓÃmkfsÃüÁîÀ´¸ñʽ»¯Âß¼­¾í
9¡¢ ½«Âß¼­¾í¹Ò½ÓÔÚ/homeĿ¼Ï£¬ÐÞ¸Ä/etc/fstabʹµÃϵͳ×Ô¶¯¹ÒÔØ/homeĿ¼

µÚÈý½Ú »ù±¾ÃüÁ¾ß
×÷ΪunixµÄ±äÌ壬linuxÓò»Í¬µÄ´úÂëʵÏÖÁ˺ÍunixÏàͬµÄ¹¦ÄÜ¡£ÕâÁ½ÖÖϵͳ¶¼ÊÇ»ùÓÚÃüÁîÐеģ¬Ê¹ÓÃÃüÁîÀ´¶Ôϵͳ½øÐÐά»¤
»ù±¾Îļþ²Ù×÷
ÿһ¸öÓû§¶¼»áÓÐÒ»¸öÖ÷Ŀ¼£¬~±íʾÓû§µÄÖ÷Ŀ¼¡£
·¾¶£º·ÖΪ¾ø¶Ô·¾¶ºÍÏà¶Ô·¾¶£¬ÒÔ/Ŀ¼¿ªÊ¼µÄ·¾¶±íʾ¾ø¶Ô·¾¶£¬Ïà¶ÔÓÚµ±Ç°Ä¿Â¼µÄ·¾¶ÊÇÏà¶Ô·¾¶¡£
ÏÔʾµ±Ç°Ëù´¦Ä¿Â¼£ºpwdÃüÁîÏÔʾÄᵱǰÏà¶ÔÓÚ¸ùĿ¼µÄ·¾¶¡£
½øÈëÆäËûĿ¼£ºcd ʹÓÃÃüÁîcd¿ÉÒÔ½øÈëÆäËûµÄĿ¼£¬ÀýÈ磺cd /boot
ÏÔʾĿ¼ÖеÄÎļþºÍ×ÓĿ¼£ºls
²éÕÒ£ºfind,ÀýÈç²éÕÒÎļþqq find / -name qq
ÏÔʾÎļþÄÚÈÝ£ºcat filename¡¢less filename¡¢more filename
head£ºÏÔʾÎļþµÄÇ°nÐÐ
tail: ÏÔʾÎļþµÄºónÐÐ
cp£º¿½±´Îļþ
mv£ºÒƶ¯Îļþ
ln£º´´½¨·ûºÅÁ´½ÓÎļþ
sort£ºÅÅÐòÃüÁÀýÈ磺sort /etc/passwd
grep and egrep£º²éÕÒÎļþ£¬ÀýÈ磺grep ¡®zhao¡¯ /etc/passwd
wc£º¶ÔÎı¾Îļþ½øÐÐͳ¼Æ£¬µÃ³öÆäÖеÄ×Ö·ûÊý¡¢ÐÐÊýµÈÐÅÏ¢
sed£ºÓÃÓÚÌæ»»ÎļþÖÐÖ¸¶¨µÄ×Ö·û£¬ÀýÈ磺ʹÓÃlinuxÌæ»»windows
sed ¡®s/windows/linux¡¯ filename > newfile Ìæ»»µÚÒ»¸ö·ûºÏµÄÏî
sed ¡®s/windows/linux¡¯ filename >newfile Ìæ»»ËùÓзûºÏµÄÏî
awk£ºÊý¾Ý¿â¹ÜÀíÃüÁ¿ÉÒÔ¶Á³öÖ¸¶¨µÄÁдÓijÐУ¬Àý£ºÕÒ³öº¬ÓÐzhao µÄÐÐ
awk ¡®/zhao/ {print $1}¡¯ /etc/passwd
ps£ºÏÔʾµ±Ç°µÄ½ø³Ì
who and w£ºÏÔʾµ±Ç°µÇ½µÄÓû§£¬¿ÉÒÔ¿´µ½Ë­µÇ½ÔÚÄǸöÖÕ¶ËÉÏ£¬µÇ½µÄʱ¼äÔËÐеĽø³Ì
ͨÅä·û£º*¿ÉÒÔÆ¥ÅäÈÎÒâ×Ö·û
£¿¿ÉÒÔÆ¥ÅäÈÎÒâµ¥×Ö·û
[] Àý£ºls abc[123],ÈôÎļþ´æÔÚÔòÏÔʾabc1¡¢abc2¡¢abc3
shells
shellÊÇÒ»ÖÖÓû§½çÃ棬Äã¿ÉÒÔͨ¹ýshellʹÓø÷ÖÖ¸÷ÑùµÄÃüÁîÀ´ºÍ¼Æ
Ëã»ú½øÐн»»¥£¬Í¨¹ýÕýÈ·µÄȨÏÞ£¬Äã¿ÉÒÔ°ÑÃüÁî·½Ôڽű¾ÎÄ
¼þÖÐÔÚÖ¸¶¨µÄʱ¼äÔËÐУ¬ÉõÖÁÊÇÔÚÉîÒ¹¡£LinuxÖ´ÐÐÃüÁîµÄ
˳Ðò£¬È¡¾öÓÚÄã¶Ôÿ¸öÃüÁîµÄÊäÈëÓÚÊä³öµÄ°²ÅÅ¡£
ÔÚ¸÷ÖÖshellÖÐÃüÁîµÄÔËÐз½Ê½ºÜ´ó³Ì¶ÈÉÏÈ¡¾öÓÚ¸ÃÃüÁîµÄ²ÎÊýºÍÑ¡Ïî¡£²¿·Ö±äÁ¿¶ÔÓÚ¸÷ÖÖshellÊÇͨÓõġ£
linuxĬÈϵÄshellÊÇbash,ÔÚÓû§ÖÐÁ÷ÐеÄÆäËüºÜ¶àshellÒ²ÊÇ¿ÉÓõģ¬È磺c shell¡¢k shell
Ìí¼Ópathµ½×Ô¼ºµÄ·¾¶:
#PATH=$PATH:/sbin
#export PATH
²é¿´×Ô¼ºµ±Ç°µÄpath:
#echo $PATH
²é¿´Îı¾ÎļþµÄÄÚÈÝ£º
#cat filename
Öض¨Ïò°ÑÒ»¸öÎļþµÄÊä³ö×÷ΪÁíÍâÒ»¸öµÄÊäÈ룬Àý£º
#database < datafiles ½«Îļþdatafiles×÷Ϊ³ÌÐòdatabaseµÄÊäÈë
Êä³öÖض¨Ïò£º
#cat /etc/passwd >filenam°ÑÊä³ö½á¹ûÖض¨Ïòµ½Îļþfilename
#cat /etc/group >>filename ½«Êä³öµÄÄÚÈÝ×·¼Óµ½filename
²é¿´Æô¶¯ÐÅÏ¢£º
#dmesg | less :·ÖƽÏÔʾÆô¶¯ÈÕÖ¾
Öض¨Ïò´íÎóÐÅÏ¢£º
#redhat-config-network 2>error Èç¹ûÔËÐÐÕý³£ÔòÎÞÊä³ö£¬ÈôÓдíÎóÔò½«´íÎóÐÅÏ¢Öض¨Ïòµ½Îļþerror

µÚËÄ½Ú »ù±¾°²È«
linuxµÄ°²È«ÐÔÊÇ»ùÓÚÎļþµÄȨÏÞ¹ÜÀí¡£Ä¬ÈϵÄȨÏÞͨ¹ýumask±äÁ¿À´½øÐÐÉ趨¡£SuidºÍsgidȨÏÞ¸³Óèÿһ¸öÖ¸¶¨µÄÎļþ¡£¶ÔȨÏÞºÍÊôÖ÷½øÐиü¸Ä·Ö±ðʹÓÃÃüÁchmod chown chgrp
umask:
ÓÃÓÚÉèÖÃĬÈϵÄÎļþȨÏÞ£¬Àý£ºumask=123,ÔòĬÈϵÄȨÏÞΪ777-123=654£¬µ«Êµ¼ÊÉϲ»ÂÛumaskµÄ×îºóһλÊÇʲô£¬Ä¬ÈϵÄȨÏÞ×îºóһλһ¶¨ÊÇ0£¬¼´²»¾ßÓпÉÖ´ÐÐȨÏÞ¡£
Suid and sgid:
ΪÁË·ÀÖ¹¸³Óèÿһ¸öÓû§ÍêÈ«µÄȨÏÞµ¼ÖµÄDZÔÚµÄÍþв£¬¿ÉÒÔÉèÖÃsuidºÍsgidÀ´¼õС·çÏÕ£¬ÏêÇé¼þºóÐøÕ½Ú
shadow passwords
²é¿´/etc/passwdÎļþµÄʱºò£¬Äã»á·¢ÏÖÓÐÕâôһÁУºx.¾É°æ±¾µÄlinuxÔÚÕâ¸öλÖý«ÃÜÂë¼ÓÃÜ¡£ÓÉÓÚ/etc/passwd¶ÔËùÓеÄÓû§¶¼ÊÇ¿ÉÒÔ·ÃÎʵģ¬ËùÒԾͻáÓкڿͽ«Õâ¸öÎļþ¿½±´Ö®ºó½øÐÐÆƽâÒԴεõ½¸Ã¼ÆËã»úµÄÃÜÂë¡£Õâ¸öÎÊÌâµ¼ÖÂÁËshadow passwords suiteµÄ³öÏÖ¡£
Shadow password suite
Shadow password suiteΪÃÜÂëÌṩÁ˸ü½øÒ»²½µÄ±£»¤£¬Ëü°Ñ¼ÓÃܺóµÄÃÜÂë´æ·ÅÔÚshadowÎļþÖУ¨/etc/shadow¡¢/etc/gshadow£©¡£´ËÎļþÖ»ÓÐrootÓû§¿ÉÒÔ¶ÁÈ¡¡£
Shadow password command
Pwconv: ½«/etc/passwdת»¯Îª/etc/shadow
Pwunconv:½«/etc/shadowת»¯Îª/etc/passwd
Grpconv:½«/etc/groupת»¯Îª/etc/gshadow
Grpunconv:½«/etc/gshadowת»¯Îª/etc/group

µÚÎå½Ú ϵͳ¹ÜÀí
´ó¶àÊý¹ÜÀíÈÎÎñÐèÒªroot»òÕß³¬¼¶Óû§È¨ÏÞ¡£ÄãÓ¦¸ÃÒѾ­¶ÔÒ»²¿·Ö»ù±¾µÄlinuxϵͳ¹ÜÀíÃüÁîºÍÎļþ·Ç³£ÊìϤ¡£±ê×¼Óû§Îļþ´æ´¢ÔÚ/etc/skelÎļþÖС£ÊØ»¤½ø³ÌÔÚºǫ́ÔËÐв¢ÇÒÖ´Ðи÷ÖÖ²»Í¬µÄ·þÎñ¡£CronÊÇÒ»ÖÖÌØÊâµÄÊØ»¤½ø³Ì£¬Ëü¿ÉÒÔÔÚÖ¸¶¨µÄ³¡ºÏÔËÐÐÖ¸¶¨µÄ½Å±¾Îļþ¡£¶ÔÓÚÎçÒ¹Ö´Ðеı¸·ÝÈÎÎñ£¬ÕâÏÄܷdz£ÓÐÓá£
×ÜÌåÀ´Ëµ£¬×÷Ϊϵͳ¹ÜÀíÔ±¿ÉÒÔÖ´ÐÐÆÕͨÓû§µÄÈκÎÈÎÎñ¡£½ö½öµ±ÐèÒªµÄʱºò²ÅʹÓ󬼶Óû§ÊÇÒ»¸öºÜºÃµÄÖ÷Òâ¡£ºÃµÄϵͳ¹ÜÀíÔ±ÔÙÈÎÎñÍê³ÉÒÔºó»á·µ»ØÆÕͨÓû§µÄÉí·Ý¡£¹ÜÀíÔ±µÄ´íÎó¿ÉÄÜ»á¸øϵͳ´øÀ´ºÜ´óµÄÉ˺¦¡£
Su :superuserÃüÁsu -c Ö»¶ÔÒ»¸öÌض¨µÄÃüÁîÉ趨¸ùÓû§È¨ÏÞ¡£
Su - root£ºÇл»µ½¸ùÓû§
Sudo£º¸ÃÃüÁîÔÊÐí/etc/sudoersÖÖµÄÓû§ÔËÐйÜÀíÔ±µÄÃüÁî
/etc/skel£º¶Ô¸öÌåÓû§¿ÉÓõÄÅäÖÃÎļþ´æÔÚÓÚ/etc/skel/Ŀ¼ÖÐ
tar czvf home.tar.gz /home ±¸·Ý/homeĿ¼Ϊhome.tar.gz
tar xzvf home.tar.gz /home ½«home.tar.gz ½âѹËõ
gzip hello.jpg ѹËõhello.jpgÎļþ
gunzip hello.jpg.zip ½âѹËõhello.jpg.zip

µÚÁù½Ú »ù´¡Ó²¼þ֪ʶ
redhatËäÈ»¿ÉÒÔÓ¦ÓÃÓÚ¸÷ÖÖÓ²¼þƽ̨£¬ÖîÈ磺alpha¡¢itanium¡¢s/390,µ«RHCEºÍRHCT¿¼ÊÔÊÇ»ùÓÚintel32λ¼Ü¹¹µÄ¼ÆËã»úµÄ¡£Pc»úµÄ¼Ü¹¹¾ö¶¨ÁËËüËùʹÓõÄ×é¼þºÍËü¿ÉÒÔʹÓõÄÉ豸¡£ËùÓеÄÈí¼þ¶¼ÊÇΪÌض¨¼Ü¹¹µÄ¼ÆËã»úд³öÀ´µÄ¡£µ«²¢²»ÊÇËùÓлùÓÚintelµÄÈí¼þ¶¼¿ÉÒÔÔËÐÐÔÚlinuxµÄ»úÆ÷ÉÏ¡£Òò´ËÎÒÃÇÓбØÒªÁ˽â»ù±¾µÄintel¼ÆËã»úµÄ¼Ü¹¹¡£
IRQ Settings
IrqÊÇÓÉÍâΧÉ豸·¢Ë͸ø´¦ÀíÆ÷ÒªÇó´¦Àíʱ¼äµÄÐźš£Á¬½Óµ½¼ÆËã»úµÄÿһ¸öÉ豸¶¼ÐèÒªÒ»¸öirq¶Ë¿Ú¡£Õý³£Çé¿öÏ£¬Ã¿Ò»¸öÉ豸ÐèÒªÒ»¸öרÓõÄirq¡£Intel¼Ü¹¹µÄ¼ÆËã»úÖ»ÓÐÊ®Áù¸öirq£¨0-15£©£¬ÏÖÔÚÕâЩirq¶Ë¿ÚºÅ³£³£»áÏԵò»¹»Óá£Í¨¹ý¹²Ïí¶Ë¿ÚºÅ¿ÉÒÔÖ§³Ö¸ü¶àµÄÉ豸¡£2000ÄêÒÔºóÉú²úµÄ¼ÆËã»ú´ó¶à¶¼Ö§³Ö¸Ã¹¦ÄÜ¡£¿ÉÒÔ¹²ÏíirqµÄÖ÷ÒªÊÇPci¡¢usb½Ó¿ÚµÄÉ豸¡£
DMA:
DmaÉ豸֮¼ä¿ÉÒÔÖ±½ÓͨÐŶø²»¾­¹ýcpu£¬µ«ÊÇdmaÉ豸ÈÔÈ»ÐèÒªirq¶Ë¿ÚºÅ£¬ÒÔ¹²Óа˸ö±ê×¼dmaͨµÀ£¨0-7£©£¬ÆäÖÐdma4ÊôÓÚ±£ÁôºÅÂ룬²»ÄÜÓÃÓÚÈκÎÉ豸¡£
ÄÚ´æÐèÇó
¶ÔÓÚas3.0×îÉÙÐèÒª256mÄڴ棬ʵ¼ÊÉÏÎÒµÄÄÚ´æÉÙÓÚ256ÔËÐеÄÒ²»¹ËãÕý³££¬Ö»ÊÇÂýÁ˵㡣ϵͳËùÐèµÄ×î´óÄÚ´æÊÇÄãͬʱÔËÐÐËùÓгÌÐòËùÐèÒªµÄÄÚ´æÈÝÁ¿£¬ÕâÄÑÓÚ¼ÆË㣬ËùÒÔÄãÓ¦¸Ã¾¡Á¿¹ºÂò´óÒ»µãµÄÄڴ棬ÕâÑù¿ÉÒÔÈÃÄãµÄϵͳÔËÐеĸüºÃ¡£As3.0Ö§³ÖµÄ×î´óÄÚ´æÊÇ64g¡£Èç¹ûÄãµÄÄÚ´æ´óÓÚ16g£¬ÄãÐèÒª°²×°hugemenmÄںˣ¬ÏêÇéÈݺó½éÉÜ¡£
¹ØÓÚÓ²ÅÌ£º
ÔÚÄãµÄ¼ÆËã»ú½«linuxÔØÈçϵͳ֮ǰ£¬biosÒ»¶¨ÒªÄܹ»Èϳö°üº¬Òýµ¼ÎļþµÄÖ÷·ÖÇø¡£ÕâÑùÓ²ÅÌÉϵÄlinux²ÅÄÜÆô¶¯£¬ÄãÓ¦¸ÃÖªµÀÏÂÃæÕâЩ¹ØÓÚÓ²Å̵Ä֪ʶ¡£
±ê×¼intel¼Ü¹¹Ö§³Ö4¸öideÓ²ÅÌ
×î¶àÖ§³Ö31Ò»¸ö²»Í¨µÄscsiÓ²ÅÌ
linux¿ÉÒÔ°²×°ÔÚÇ°Á½¸öÓ²ÅÌÉÏ£¬·ñÔòÄã¾ÍÐèÒªÒ»ÕÅÆô¶¯ÈíÅÌÀ´Òýµ¼ÏµÍ³ÁË
¾¡¹ÜÄã¿ÉÒÔʹÓÃusbÓ²ÅÌ»ò1394Ó²Å̵«ÊÇÄã²»Ó¦¸Ã½«ÏµÍ³°²×°ÔÚÕâÁ½ÖÖÉ豸ÉÏ£¬ÒòΪ¼È²»ÄÜ´ÓÕâÁ½ÖÖÓ²ÅÌÒýµ¼£¬Ò²²»ÄÜʹÓÃÈíÅÌÀ´Òýµ¼×ÅÁ½ÖÖÓ²ÅÌÉϵÄϵͳ¡£
µÚÆß½Ú Ó²¼þ¼æÈÝÐÔ
¼øÓÚ´ó¶àÊýÈËʹÓõÄÓ²¼þ¶¼¿ÉÒÔ±»linuxÖ§³Ö£¬´Ë½Ú¾Í´ËÂÔ¹ý
µÚ°Ë½Ú ÅäÖÃÍâΧÉ豸
ûÓÐʲôֵµÃ¿´µÄÄÚÈÝÒ»²¢ÂÔ¹ý

µÚ¶þÕ ´ÅÅ̹ÜÀí
µÚÒ»½Ú ´ÅÅÌ·ÖÇø
´ÅÅÌʹÓÃ֮ǰ±ØÐë½øÐиñʽ»¯³ÉijÖÖ¸ñʽ²ÅÄܹ»Ê¹Óã¬linuxÖ§³Ö¶àÖÖÎļþϵͳ¡£Ã¿Ò»¸öÓ²ÅÌ×î¶à¿ÉÒÔ»®·ÖΪ16¸ö·ÖÇø¡£
´ÅÅÌ·ÖÇø£ºÍƼöʹÓÃfdisk¡£¾ÙÀý˵Ã÷£º
#fdisk /dev/hda hdaÖ¸µÚÒ»¿éideÓ²ÅÌ£¬scsiÓ²ÅÌΪsda»òsdbµÈ
command(m for help): nÔö¼Ó´ÅÅÌ·ÖÇø
command action
e extended
p primary partition (1-4)
p Ôö¼ÓÖ÷·ÖÇø
Partition number (1-4):1
First cylinder (1-512, default 1):
Using default value 1
Last cylinder or +size or +sizeM +sizeK(1-512,default512):+200M
Command (m for help):p ²é¿´µ±Ç°´ÅÅÌÐÅÏ¢
Device Boot Start End Blocks Id System
/dev/sdb1 1 192 196592 83 Linux
Command (m for help):w ±£´æÍ˳ö
Mount£ºÏÔʾµ±Ç°¹Ò½ÓµÄĿ¼
Df£º²é¿´´ÅÅÌÐÅÏ¢
Du: ²é¿´Îļþ¼ÐµÄ¿Õ¼äʹÓÃЧÂÊ
´ÅÅ̸ñʽ»¯£ºmkfs ,Àý£º¸ñʽ»¯/dev/sda1: mkfs -t ext3 /dev/sda1

µÚ¶þ½Ú À©Õ¹´ÅÅÌ¿Õ¼ä
ÏÖÓеĴÅÅ̵Ŀռä¿ÉÄÜ»áËæ×Åʱ¼äµÄÔö³¤¶ø±äµÃÔ½À´Ô½²»¹»Óá£ÔÚÕâÖÖÇé¿öϾÍÐèÒªÔö¼ÓеĴÅÅÌÀ´¶ÔÔ­ÏȵÄÓ²Å̽øÐÐÀ©Õ¹¡£·½·¨ÈçÏ£º
1¡¢ ½«ÐµÄÓ²Å̽Ӻ㬽øÈëϵͳºóʹÓÃfdisk½øÐзÖÇø£¬È»ºó¸ñʽ»¯¡£
2¡¢ ½¨Á¢Ò»¸ö¿ÕĿ¼£¬ÀýÈ磺mkdir /mnt/newdisk.
3¡¢ ¹Ò½ÓеÄÓ²Å̵½Ð½¨µÄ¿ÕĿ¼£ºmount /dev/sda1 /mnt/newdisk
4¡¢ ÐÞ¸Ä/etc/fstabʹ¸Ã·ÖÇø×Ô¶¯¹ÒÔØ

µÚÈý½Ú Âß¼­¾í¹ÜÀí£¨lvm£©
´ÅÅÌÉϵÄijһ¸öĿ¼´æ´¢µÄÎļþÔö³¤Ñ¸ËÙ¿Õ¼äÈÕ½¥²»¹»Ê¹ÓÃ
ÕâʱºòÄã¿ÉÒÔʹÓÃlvmÀ´½â¾öÕâ¸öÎÊÌ⡣ʵÏÖ·½·¨ÈçÏ£º¼ÙÉèÒªÔö¼Ó/homeĿ¼µÄ¿Õ¼ä¡£
1¡¢ Ôö¼ÓеÄÓ²ÅÌ£¬·ÖÇø¡¢¸ñʽ»¯£¬¼Ù¶¨ÒªÔö¼ÓµÄеķÖÇøΪ/dev/sdb2,/homeĿ¼µÄ·ÖÇøΪ£º/dev/sda7
2¡¢ ±¸·Ý/homeÎļþ¼ÐµÄÄÚÈÝ
3¡¢ #umount home
4¡¢ #vgscan ½øÐÐɨÃè²¢´´½¨Ïà¹ØµÄÎļþ
5¡¢ #pvcreate /dev/sda7 /dev/sdb2 ´´½¨ÎïÀí¾í
6¡¢ #vgcreate vgtest /dev/sda7 /dev/sdb2 ´´½¨¾í×é
7¡¢ #lvcreate vgtest -L 2000M -nlvtest
8¡¢ #mkfs -t ext3 /dev/vgtest/lvtest
9¡¢ #mount /dev/vgtest/lvtest /home
10¡¢ #vi /etc/fstab,ɾ³ýºÍhome Ïà¹ØµÄÐУ¬²¢Ôö¼ÓÈçÏÂÐУº/dev/vgtest/lvtest /home ext3 defaults 0 0
11¡¢ #reboot

µÚËÄ½Ú ´ÅÅÌÕóÁÐ
´ÅÅÌÕóÁпÉÒÔÓÐЧµÄÌá¸ßÊý¾ÝµÄ¶ÁдËٶȺÍÊý¾ÝµÄ¿É¿¿ÐÔ¡£¾ßÌå·ÖÀàÈçÏ£ºraid 0¡¢raid 1¡¢raid 2¡¢raid 3¡¢raid 4¡¢raid5ÆäÖг£ÓõÄÊÇ£ºraid 0¡¢raid 1¡¢raid 5,¼ò½éÈçÏ£º
raid 0£ºÊ¹ÓÃÁ½¿éÓ²ÅÌ£¬Êý¾Ý·Ö±ð´æ·ÅÔÚÁ½¿éÓ²ÅÌÉÏ£¬¶ÁдËٶȽϿ죬µ«²»ÌṩÊý¾ÝÈßÓà¡£
Raid 1: Ò²³ÆΪ´ÅÅ̾µÏñ£¬ÔÚÁ½¿éÓ²ÅÌÉÏͬʱ´æ´¢ÍêÈ«ÏàͬµÄ
Êý¾Ý£¬Ð´ÈëËÙ¶ÈÒ»°ã£¬µ«¶ÁÈ¡ËÙ¶ÈÔö¼ÓÒ»±¶¡£ÈÎÒâ Ò»¿éÓ²ÅÌË𻵲»»á¶ÔÊý¾ÝÔì³ÉË𺦡£
Raid 5: Ò²³ÆΪ´øÆæżУÑéµÄ´ÅÅÌÌõ´ø»¯£¬×îÉÙÐèÒª3¿éÓ²
ÅÌ£¬×î¶àÖ§³Ö32¿éÓ²ÅÌ£¬¿ÉÓôÅÅÌÊýÁ¿Îªn -1¿éÓ²
ÅÌ¡£¶ÁÈ¡ËٶȺÍдÈëËٶȶ¼ÓÐÒ»¶¨³Ì¶ÈµÄÌá¸ß¡£Îª
×î³£ÓõÄÕóÁÐÐÎʽ¡£
ʵÏÖ·½·¨£º¼Ù¶¨Ìí¼ÓÁËËÄ¿éÓ²Å̵½¼ÆËã»ú£¬·Ö±ðΪ/dev/sdb¡¢
/dev/sdc¡¢/dev/sdd¡¢/dev/sde,ʵÏÖ²½ÖèÈçÏ£º
1¡¢ ·Ö±ð½øÐзÖÇø¸ñʽ»¯
2¡¢ ¸ü¸Ä·ÖÇøÀàÐÍ£ºfdisk /dev/sdb1
t
fd
p
w
¶Ôÿһ¿éÓ²Å̽øÐÐÈçÉϲÙ×÷£¬°Ñ·ÖÇøÀàÐÍ
¸ÄΪraid
3¡¢ ´´½¨/etc/raitab
#vi /etc/raidtabÈçÏÂÄÚÈÝ£º
ÒýÓÃ:
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 1
chunk-size 4
device /dev/sdb1
raid-disk 0
device dev/sdc1
raid-disk 1

±£´æÍ˳ö¡£
#mkdir /dev/md0 ´´½¨ÕóÁÐmd0
#mkfs -t ext3 /dev/md0 ¶ÔÕóÁнøÐиñʽ»¯

µÚÎå½Ú Ôö¼Ó½»»»·ÖÇø
#mkswap /dev/sdb1 ´´½¨½»»»·ÖÇø
#swapon /dev/sdb1 ¿ªÆôÐÂÔöµÄ½»»»·ÖÇø
#cat /proc/swaps ²é¿´µ±Ç°µÄ½»»»·ÖÇø

µÚÁù½Ú Ôö¼Ó½»»»Îļþ
ÒýÓÃ:
#dd if=/dev/zero of=/swapfile bs=1024 count=8192
#mkswap /swapfile
#swapon /swapfile

½»»»Îļþ×î¶à8¸ö£¬Ã¿¸ö×î´óÈÝÁ¿Îª16M

µÚÆß½Ú ¶ÁÈ¡windowsµÄÎļþ
#mkdir /mnt/windows ½¨Á¢Ò»¸ö¿ÕĿ¼
#mount -t vfat /dev/hda4 /mnt/windows ¹Ò½Ówindows
µÄfat·ÖÇø
#mount -t ntfs /dev/hda5 /mnt/windows ¹Ò½Óntfs·ÖÇø£¬linuxÄÚºÍĬÈϲ»Ö§³Öntfs·ÖÇø£¬ÒªÈÃlinuxʶ±ðntfs·ÖÇø±ØÐëÒªÖØ Ð±àÒëÄں˼ÓÈë¶ÔntfsµÄÖ§³Ö¡£


µÚÈýÕ »ù±¾ÅäÖú͹ÜÀí
µÚÒ»½Ú Óû§¹ÜÀí
1¡¢Ôö¼ÓÓû§£º·½·¨1£º#useradd username -p password
Àý£ºÔö¼ÓÓû§kk,ÃÜÂëkk #useradd kk -p kk
·½·¨2£ºÖ±½ÓÐÞ¸Ä/etc/passwdÎļþ£¬È»ºóÊÖ¹¤´´
½¨ÏàÓ¦µÄÓû§Ö÷Ŀ¼
2¡¢ÐÞ¸ÄÓû§£º#usermod -l newusername -c ¡°comment¡± -d /home/newusername oldusername
Àý£º°Ñtest Óû§Ãû¸ÄΪtest2,Ö÷Ŀ¼¸ÄΪ£º/home/test2
usermod -l test2 /home/test2 test(test2Ŀ¼ҪÊÖ¹¤½¨)
-p:ÐÞ¸ÄÃÜÂë
-e£ºÉ趨Õ˺ŹýÆÚʱ¼ä
-s: É趨shell
-p: É趨ÃÜÂë
3¡¢ ¸ÄÃÜÂ룺passwd username
4¡¢ ɾ³ýÓû§£ºuserdel username
5¡¢ ÏÞ¶¨¿ÉÒÔÖ´ÐУºsu ÃüÁîµÄÓû§£ºÆÕͨµÄÓû§Èç¹ûÖªµÀroot
µÄÃÜÂ룬¾Í¿ÉÒÔͨ¹ýsuÃüÁîÈ¡µÃ¸ùÓû§µÄȨÏÞ¡£ºÚ¿ÍÒ²ÓпÉÄÜͨ¹ý±©Á¦ÆƽâµÄ°ì·¨£¬»ñµÃ³¬¼¶È¨ÏÞ£¬Òò´ËÓбØÒª¶Ô¿ÉÒÔÖ´ÐÐsuÃüÁîµÄÓû§½øÐÐÏÞÖÆ¡£¾ßÌå·½·¨ÈçÏ£º
#vi /etc/pam.d/su£¬ÐÞ¸ÄÆäÖÐÒ»ÐУº
#auth required /lib/security/$ISA/pam_wheel.so use_uid
½«ÐÐÊ×#È¥µô£¬ÕâÑù¾ÍÖ»ÓÐwheel×éÖеÄÓû§¿ÉÒÔʹÓÃsuÃüÁîÁË¡£È»ºó½«Ñ¡¶¨µÄÓû§¼ÓÈëµ½wheelÓû§×é¼´¿É¡£

µÚ¶þ½Ú »ù±¾Óû§»·¾³
µ±ÎÒÃÇʹÓÃuserddÃüÁî»òredhat-config-users¹¤¾ßÀ´´´½¨Ò»¸öеÄÓû§µÄʱºò£¬»á×Ô¶¯Éú³ÉÓû§µÄÖ÷Ŀ¼ºÍһЩĬÈϵÄÎļþÉ趨һЩÅäÖ㬼´ËùνµÄÓû§»·¾³¡£ÕâЩĬÈϵÄÅäÖúÍÎļþ´æ´¢ÔÚ/etc/skelÎļþ¼ÐÖС£Ä¬ÈÏÎļþÓÐÒÔÏÂÕâЩ£º.bash_logout¡¢.bash_profile¡¢.bashrc¡¢.kde¡¢.zshrc£¬²»Í¬µÄ°æ±¾µÄlinuxĬÈÏÎļþ¿ÉÄÜÒ²»áÓÐһЩ²î±ð

µÚÈý½Ú Îļþϵͳ¹ÜÀí¼°×Ô¶¯¹Ò½Ó
1¡¢ ¹Ò½ÓÈíÅÌ£ºmount -t vfat /dev/fd0 /mnt/floppy
»òÕߣºmount /mnt/floppy »òÕߣºmount /dev/fd0
2¡¢ÏµÍ³Æô¶¯Ê±×Ô¶¯¹ÒÔÚÈíÅÌ£ºÐÞ¸Ä/etc/fstab Ôö¼ÓÈçÏÂÒ»ÐУº
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
3¡¢Ð¶ÔØÈíÅÌ£ºumount /mnt/floppy
жÔعâÇý£ºumount /mnt/cdrom

µÚËÄ½Ú RPMµÄʹÓüò½é
ËùνrpmÊÇÖ¸redhat package manager¼´ºìñÈí¼þ°ü¹ÜÀíÆ÷£¬ÊÇÓÐredhat¹«Ë¾´´½¨µÄÒ»ÖÖÈí¼þ·¢Ðз¢Ê½£¬rpm¸ñʽ·¢ÐеÄÈí¼þÒ×ÓÚ°²×°£¬Ïà±ÈÆäËûµÄ·¢Ðз½Ê½ÓкܴóµÄÓÅÔ½ÐÔ¡£Ôڴ˼ò½éÆä»ù±¾Ó÷¨¡£
1¡¢rpm -i penguin-3.4.5.-26.i386rp°²×°ÒÔrpmÐÎʽ·¢ÐеÄÈí¼þ
2¡¢rpm -U penguin-3.4.5-26.i386.rpm Éý¼¶Èí¼þ°ü
3¡¢rpm -e penguin-3.4.5.26 ɾ³ýÈí¼þ
4¡¢http://download.fedora.redhat.com/pub/fedora/linux/core/update/i386/kernel-smp-2.6.7-1.494.2.2.i686.rpm °²×°Ô¶³Ìrpm°ü
5¡¢rpm -import /usr/share/rhn/RPM_GPG_KEY µ¼Èëgpg¹«Ô¿
6¡¢ rpm -checksig /mnt/cdrom/RedaHat/pxe-0.1-36.i386.rpmµ¼È빫ԿÒÔºó¶ÔÎļþµÄÍêÕûÐÔ½øÐÐÑéÖ¤
7¡¢ rpm -verify -p /mnt/cdrom/RedaHat/pxe-0.1-36.i386.rpm½øÐÐmd5УÑéºÍµÄÑéÖ¤
8¡¢ rpm --redhatprovides /etc/group²éÕÒij¸öÎļþ¶ÔÓ¦µÄrpm°ü
9¡¢ rpm -q samba ²éѯsambaÊÇ·ñ°²×°£¬ÒÔ¼°°æ±¾
10¡¢ rpm -qf /etc/passwd ²éѯ/etc/passwdÊôÓÚÄĸöÈí¼þ°ü


µÚÎå½Ú ¹ØÓÚrpm Ô´Âë°ü
1¡¢ ͨ¹ýrpm Ô´Âë°ü´´½¨ºÍ¶¨ÖÆrpm
rpm -ivh rpm-build-4.2.3-10.i386.rpm£º°²×°rpmbuild¹¤¾ß
rpm -ivh modutils-2.4.21-22.src.rpm£º°²×°Ô´Âë°ü
ÕâʱÔÚ/usr/src/redhat/SPECSÎļþ¼ÐÄÚ¿ÉÒÔ¿´µ½modutils.spec£¬/usr/src/redhat/SOURCESÎļþ¼ÐÄÚ¿ÉÒÔ¿´µ½ÒÔϵÄÎļþ£ºmodutils-2.4.21.tar.gz¡¢modutils-2.4.21.tar.gz
cd /usr/src/redhat/SPECS/ ½øÈë¸ÃÎļþ¼Ð
rpmbuild -ba modutils.spec ÖØбàÒ뽨Á¢rpm°ü£¬ÔËÐнáÊøºó£¬
cd /usr/src/redhat/RPMS¿ÉÒÔ¿´µ½ÈçÏÂÎļþ£ºmodutils-2.4.21.i386.rpm modutils-debuginfo-2.4.21-22.i386.rpm
ÖÁ´Ërpm°ü³É¹¦½¨Á¢£¬Ê¹ÓÃrpmbuildÃüÁîµÄʱºò£¬Ê¹ÓòÎÊý-bbҲͬÑù¿ÉÒÔÉú³Érpm°ü

µÚÁù½Ú »ù±¾ÍøÂçÅäÖÃ
´ó¶àÊýÇé¿öÏ£¬ÔÚϵͳµÄ°²×°¹ý³ÌÖУ¬ÍøÂçµÄÏà¹ØÉèÖþÍÒѾ­ÉèºÃÁË£¬µ«ÊÇÈç¹ûÄãÅöµ½ÁËÎÊÌ⣬Äã¿ÉÄܾͻáÐèÒªÕï¶ÏÍøÂçµÄ¹ÊÕÏ£¬ÌرðÊÇÅųýÍøÂç¹ÊÕϵÄʱºò£¬¾Í¸üÐèÒªÁ˽âÍøÂçÅäÖõÄ֪ʶ¡£
1¡¢ºÍÍøÂçÏà¹ØµÄÅäÖÃÎļþ´ó¶àÊý¶¼´æ´¢ÔÚ/etc/sysconfigÎļþ¼ÐÀï¡£/etc/syscofig/networkÊDZȽÏÖØÒªµÄÒ»¸ö£¬ÆäÉèÖüò½éÈçÏ£º
networking£º¿ÉÒÔÉèÖÃΪyes»òÕßno ÒÔ´ËÀ´¾ö¶¨µçÄÔÊÇ·ñÁªÍø¡£
Nisdomain: Èç¹ûÄãʹÓÃnisÍøÂ磬ÄãÓ¦¸ÃÔÚÕâ¸öÎļþÖÐÖ¸¶¨nisÓòµÄÃû×Ö
Hostname£ºÉ趨¼ÆËã»úµÄÃû×Ö
Gateway£ºÉ趨Íø¹ØµÄipµØÖ·
Gatewaydev£ºÉ趨ÍøÂçÉ豸£¬ÀýÈçeth0£¬Èç¹ûÄãÖ»ÓÐÒ»¸öÍø¿¨ÄÇôÄãÓ¦¸Ã¿´²»µ½Õâ¸öÑ¡Ïî¡£
2¡¢/etc/syscofnig/network-scripts/ ÃüÁî¼´ÅäÖÃÎļþ½éÉÜ
ifconfig-eth0£ººÍµÚÒ»¿éÍø¿¨ÓйصÄÉèÖã¬ÈçipµØÖ·¡¢×ÓÍøÑÚÂë¡¢ÍøÂçµØÖ·¡¢Íø¹ØµÈµÈ¡£×îºóһλµÄ0´ú±íµÚÒ»¿éÍø¿¨£¬ÈçÓеڶþ¿éÍø¿¨£¬¾Í»áÓÐifconfig-eth1Îļþ£¬ÒÀ´ËÀàÍÆ¡£
Ifconfig-lo:ÅäÖÃlookback É豸µÄÏà¹ØÐÅÏ¢£¬ÄÚÈÝÓëifconfig-eth0ÀàËÆ
Network-functions£º°üº¬ÆäËûµÄÍøÂç½Å±¾ËùʹÓõļ¤»îÍø¿¨¡¢½ûÖ¹Íø¿¨µÈ¹¦ÄÜ
Ifup-* and ifdown-*£ºÓÃÓÚ¼¤»î»òÕß½ûÖ¹Ïà¹ØµÄЭÒé
Ifup eth0£º¼¤»îeth0
Ifdown eth0:½ûÖ¹eth0
Ifconfig:Ö÷ÒªµÄÍøÂçÅäÖÃÃüÁî
2¡¢ ifconfig Ó÷¨½éÉÜ
ifconfig:ÏÔʾµ±Ç°µÄÍøÂçÅäÖÃ
ifconfig eth0 192.168.0.1 netmask 255.255.255.0 ÉèÖÃipµØ
Ö·ºÍ×ÓÍøÑÚÂë¡£¸ÃÃüÁîÖ»ÔÚµ±Ç°ÉúЧ
ifconfig eth0 down£º½ûÓÃÍø¿¨eth0
ifconfig eth0 up£º¼¤»îÍø¿¨eth0
3¡¢netstat -r£ºÏÔʾµ±Ç°µÄ·Óɱí

µÚÆß½Ú »ù±¾Æô¶¯¹ý³Ì
Àí½âϵͳµÄÆô¶¯¼°¹Ø±Õ¹ý³Ì½«¶ÔÄãµÄϵͳ¹ÜÀí¹¤×÷´øÀ´¼«´óµÄÒæ´¦¡£RedhatʹÓõÄÆô¶¯¹ý³Ì³Æ֮Ϊ£ºSystem V init¡£Ò»µ©Äں˱»×°ÔØ£¬ËüÆô¶¯Ò»¸ö³ÌÐò£ºinit£¬ÓÉinitÀ´Æô¶¯ÆäÓàËùÓеÄÏà¹Ø³ÌÐò¡£ÎÒÃǽ«¶ÔlinuxÈçºÎ½«×Ô¼ºÒýµ¼ÎªÒ»¸ö¿ÉÓõÄϵͳÓÐÒ»¸ö´óÖµÄÁ˽⡣RedhatÌṩÁ½¸ö¹¤¾ßÀ´¹ÜÀíËæϵͳÆô¶¯·þÎñ£ºredhat-config-services(ͼÐλ¯¹¤¾ß)¡¢chkconfig(ÃüÁîÐй¤¾ß)¡£Ê×ÏÈÎÒÃÇÒªÁ˽âredhat runlevels¡£
1¡¢runlevel 0 :¹Ø±Õϵͳ
2¡¢runlevel 1: µ¥Óû§Ä£Ê½£¬ÓÃÓÚ¶Ôϵͳ½øÐÐά»¤
3¡¢runlevel 2: ¶àÓû§Ä£Ê½£¬µ«²»ÄÜʹÓÃÍøÂç
4¡¢runlevel 3: ¶àÓû§Ä£Ê½£¬¾ßÓÐÍøÂ繦ÄÜ
5¡¢runlevel 4: δʹÓÃ
6¡¢runlevel 5: ÖØÐÂÆô¶¯
ϵͳÆô¶¯¹ý³Ì£º¼ÆËã»úͨµçÒÔºóÓÉbios»á¼ì²éÄãµÄϵͳѰÕÒÒýµ¼×°ÔسÌÐò£¨grub¡¢lilo£©¡£È»ºóÔÙÓÉÒýµ¼×°ÔسÌÐòÑ°ÕÒlinuxÄںˡ£ÕâÑù¾Í¿ªÊ¼°²×°ÄãÅäÖúõķþÎñ¡£ÄÚºË×ÜÊÇͨ¹ýµ÷ÓÃinitÀ´Æô¶¯¡£Init½ø³ÌÁ¢¿ÌÔËÐÐ/etc/rc.d/rc.sysinit,ÓÉÆäÖ´ÐÐһϵÁеÄÈÎÎñ£¬ÀýÈçÍøÂçÅäÖᢼüÅÌÓ³Éä¡¢·ÖÇø¹Ò½ÓµÈµÈ¡£Init½ø³Ìͨ¹ý²é¿´/etc/inittabÀ´¾ö¶¨½«ÏµÍ³Òýµ¼ÖÁÄĸöÔËÐ춱ð¡£/etc/inittabÖÐÓÐÀàËÆÕâÑùµÄÒ»ÐУºid:5:initdefault£ºÆäÖÐÊý×Ö5´ú±íϵͳµÄĬÈϼ¶±ðΪrunlevel 5,ͨ¹ý¼òµ¥µÄ¸ü¸ÄÕâÀïµÄÊý×Ö¼´¿É¸Ä±äϵͳÆô¶¯Ê±×Ô¶¯ÔËÐеļ¶±ð¡£
/etc/rc.d/Ŀ¼Öаüº¬ÈçÏÂ×ÓĿ¼£º
init.d¡¢rc0.d¡¢rc1.d¡¢rc2.d¡¢rc3.d¡¢rc4.d¡¢rc5.d¡¢rc6.d
³ýinit.dÖ®ÍâµÄÿһ¸öĿ¼¶¼¶ÔÓ¦Ò»¸öÔËÐ춱ð£¬ÆäÖаüº¬¸ÃÔËÐ춱ðÆô¶¯ºÍ¹Ø±ÕµÄ·þÎñ£¬±êÓÐkµÄ·þÎñÊǸÃÔËÐ춱ðĬÈϹرյķþÎñ£¬±êÓÐsµÄ·þÎñΪ¸ÃÔËÐ춱ðĬÈÏÆô¶¯µÄ·þÎñ¡£
/etc/rc.d/init.dĿ¼°üº¬ËùÓзþÎñµÄÆô¶¯½Å±¾£¬ÊÖ¹¤Æô¶¯Ò»¸ö·þÎñ¼´¿ÉÔÚ¸ÃĿ¼ÏÂÖ´ÐУ¬Àý£º/etc/rc.d/init.d/smb stop

µÚ°Ë½Ú ÐéÄâ¿ØÖÆ̨
linux×÷Ϊ¶àÓû§²Ù×÷ϵͳ£¬Äã¿ÉÒÔʹÓÃÏàͬµÄÉí·ÝͬʱµÈ¼µ½²»Í¬µÄÖնˡ£Ê¹ÓÃALT+¹¦ÄܼüÔÚ²»Í¬µÄÖն˴°¿ÚÖ®¼ä½øÐÐÇл»¡£Àý£ºÇл»µ½ÖÕ¶Ë2£ºALT+F2¡£ÔÚͼÐνçÃæÏÂÇл»Ê¹Óãºctrl+alt+¹¦Äܼü
ÐéÄâ¿ØÖÆ̨ÔÚ/etc/inittabÎļþÖÐÅäÖ㬿ÉÒÔ¿´µ½ÓÐÈçÏÂÐУº
ÒýÓÃ:
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

¸ù¾Ý¹Ù·½µÄ˵·¨£¬×î¶àÖ»ÓÐ6¸öÖնˣ¬Êµ¼ÊÊÔÑéµÄ½á¹ûÊÇÔÚÕâÀïÐÞ¸ÄÅäÖÃÎļþÌí¼ÓÖÕ¶ËÊýÁ¿ÒÔºó£¬ÖØÐÂÆô¶¯¡£Öն˵ÄÊýÁ¿Ôö¼ÓÁË£¬µ«ÊÇ¿ÉÓõÄÈÔȻֻÓÐ6¸ö

ÒýÓÃ:
µÚ¾Å½Ú ÆäËûÅäÖù¤¾ß

1¡¢ clock:ÏÔʾµ±Ç°µÄϵͳʱ¼äÉèÖÃ
2¡¢ redhat-config-date£ºÍ¼Ðλ¯µÄʱ¼äÅäÖù¤¾ß
3¡¢ redhat-config-keyboard£ºÍ¼Ðλ¯µÄ¼üÅÌÅäÖù¤¾ß
4¡¢ redhat-config-mouse£ºÍ¼Ðλ¯µÄÊó±êÅäÖù¤¾ß
5¡¢ redhat-config-services£ºÍ¼Ðλ¯µÄ·þÎñÅäÖù¤¾ß£¬¾ö¶¨ÄÄЩ
·þÎñËæϵͳÆô¶¯
6¡¢ chkconfig£ºÈ·¶¨Ä³·þÎñĬÈÏÔÚÄĸö¼¶±ðÔËÐÐ
7¡¢ redhat-config-network:ͼÐλ¯µÄÍøÂçÅäÖù¤¾ß


ÈçҪѧϰ¸ü¶à£¬Çë¿´£ºhttp://www.linuxdiyf.com/articlelist.php?id=29
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 18 ÌõÆÀÂÛ

  1. BeefyMiracle ÓÚ 2012-12-19 22:21:11·¢±í:

    {:2_100:}

  2. felixffffff ÓÚ 2012-11-14 15:27:52·¢±í:

    ¶¥Ò»ÏÂ

  3. liquansanguai ÓÚ 2012-11-13 22:21:22·¢±í:

    :0)1

  4. xiangtianxia ÓÚ 2012-11-03 20:49:53·¢±í:

    лл·ÖÏíÊÕ²ØÁË

  5. hhl68 ÓÚ 2012-09-17 12:06:20·¢±í:

    ·ÖÏíÁ˹þ

  6. xiaotengyi ÓÚ 2012-03-04 13:59:17·¢±í:

    1# ·çÓêÎÞ×è


    Ì«¸ÐлÁË

  7. duo2752 ÓÚ 2010-01-29 22:02:18·¢±í:

    ллÁË

  8. asan2009 ÓÚ 2010-01-29 21:21:09·¢±í:

    ¾­µä°¡ ²»Éõ¸Ð¼¤ ËäÈ»´ó¶à¶¼ºÜ¼òµ¥

  9. asan2009 ÓÚ 2010-01-29 21:21:02·¢±í:

    ¾­µä°¡ ²»Éõ¸Ð¼¤ ËäÈ»´ó¶à¶¼ºÜ¼òµ¥

  10. gostop ÓÚ 2009-10-05 19:51:29·¢±í:

    ºÃ¶«Î÷¶àл·ÖÏí

  11. gostop ÓÚ 2009-10-05 19:51:26·¢±í:

    ºÃ¶«Î÷¶àл·ÖÏí

  12. gostop ÓÚ 2009-10-05 19:51:22·¢±í:

    ºÃ¶«Î÷¶àл·ÖÏí

  13. linshao.Solin ÓÚ 2009-10-05 18:18:50·¢±í:

    Ŷ mygod ºÃ¶à°¡ ²»¹ýлл·ÖÏí

  14. weisan2111 ÓÚ 2007-03-14 12:04:57·¢±í:

    дµÄºÜºÃµÄ,Ï£Íû´ó¼ÒºÃºÃѧϰ
    :time:1

  15. ywc03 ÓÚ 2007-02-27 22:27:06·¢±í:

    ²»´í²»´í£¬Ï£Íûͬ־ÃÇÒÔºó¶à·¢ÕâÖÖ¼¼Êõº¬Á¿½Ï¸ßµÄÌû×Ó¡£

  16. bufferol ÓÚ 2007-02-25 15:57:45·¢±í:

    Ô­ÌûµØÖ·£ºhttp://bbs.chinaunix.net/viewthread.php?tid=492354&fpage=1&highlight=
    [/size]
    [size=13px]±¾ÎÄ´Ó2004Äê10Ô¿ªÊ¼Ð´×÷£¬Æä¼äÊܵ½Á˺ܶàÅóÓѵĹÄÀø£¬ÔÚ´ËÉî±í¸Ðл¡£µ«ÓÉÓÚ¹¤×÷ÉϵÄÔ­Òò£¬¸ÃÎÄÒª´º½ÚÒÔºó²ÅÄܹ»Íê³É£¬ÔÝÇÒ½«ÒÑÍê³ÉµÄ²¿·ÖÖØÐÂÕûÀíÒ»Æð·¢³ö£¬Ï£ÍûÄܹ»¸øÐÂÈëÃŵÄÅóÓÑÃÇ´øÀ´Ò»µãÆôʾ¡£¸ÃÎĵĺóÐø²¿·Ö»¹ÓÐÈýÕ£¬ÎÒ»áÔÚÍê³ÉÒÔºóÒ»Æð·¢³ö¡£Ë®Æ½ÓÐÏÞÍû¸÷λ¸ßÊÖ²»Áߴͽ̣¡

    µÚÒ»Õ »ù±¾ÒªÇó
    µÚÒ»½Ú »ù´¡ÖªÊ¶
    linuxºÍunix¶¼ÊÇͨ¹ýһϵÁеÄÎı¾ÎļþÀ´½øÐйÜÀí¡£Linuxϵͳ¹ÜÀíԱͨ³£²»Ê¹ÓÃͼÐα༭Æ÷À´¹ÜÀíÕâЩÅäÖÃÎļþ¡£¸÷ÖÖÁ÷Ðеı༭Æ÷µÄ¸ñʽÀýÈ磺word¡¢startofficeµÈµÈ£¬linux¶¼ÎÞ·¨Ê¶±ð¡£Linux³£ÓõÄÎı¾±à¼­Æ÷ÓÐÕâô¼¸ÖÖ£ºvi¡¢pico¡¢joe¡¢emacs¡£¾¡¹Üemacs¿ÉÄÜÊÇlinuxÊÀ½ç×îÁ÷Ðеı༭Æ÷£¬µ«ÊÇϵͳ¹ÜÀíÔ±ÈÔÈ»±ØÐ붮µÃviµÄ»ù±¾Ê¹Óá£Emacs¸ü¼ÓÁé»î¸ü¼ÓÁ÷ÐУ¬vi¿ÉÒÔ°ïÖúÄã»Ö¸´ÏµÍ³¡£Èç¹ûÄãҪʹÓýô¼±Òýµ¼ÅÌÀ´»Ö¸´Ò»¸öÖØÒªµÄÎļþ£¬viÊÇΨһ¿ÉÓõı༭Æ÷¡£
    ʵ¼ÊÉÏ£¬RHEL 3 ʹÓÃÔöÇ¿°æ±¾µÄvi,¼´vim.ËüÔö¼ÓÁËÑÕÉ«À´¶ÔÖØÒªµÄÎļþ½øÐÐÇø·Ö¡£ËùÓеÄvi ÃüÁÊÇÔÚvim±à¼­Æ÷£¬Äã¿ÉÒÔͨ¹ýÔÚvim±à¼­ÆäÖÐʹÓãºnohlÃüÁîÀ´È¥µôÑÕÉ«£¬Õâ²¢²»»á¶ÔÄã¹ÜÀíϵͳ´øÀ´ÈκÎÓ°Ïì¡£
    ViµÄ»ù±¾Ó÷¨£ºvi filename
    »ù±¾ÃüÁi ²åÈë
    o ²åÈëÐÂÐÐ
    :w±£´æ
    :qÍ˳ö
    :wq!±£´æ²¢Ç¿ÖÆÍ˳ö
    :q!²»±£´æÇ¿ÐÐÍ˳ö
    Á·Ï°1£ºÊ¹ÓÃviÀ´Ôö¼ÓÐÂÓû§
    1¡¢#vi /etc/passwd,ʹÓÃÃüÁîyy¿½±´µ±Ç°ÐУ¬Ê¹ÓÃÃüÁîp¸´ÖƳöÒ»ÐÂÐУ¬È»ºóÐ޸ġ£¸Ä±äÓû§Ãû£¬Óû§idÓû§×éid£¬ÒÔ¼°homeĿ¼¡£¸ü¸ÄÍê³ÉºóʹÓÃÃüÁî:wq!±£´æÍ˳ö¡£
    2¡¢¸ü¸ÄÐÂÓû§µÄÃÜÂ룺passwd username
    3¡¢½¨Á¢Óû§µÄÖ÷Ŀ¼£ºmkdir /home/username
    µÚ¶þ½Ú ÎļþϵͳµÄ²ã´Î½á¹¹
    linuxÖеÄÈκÎÊÂÇ鶼¿ÉÒÔ¹é½áΪһ¸öÎļþ¡£·ÖÇøºÍÎļþϵͳÉ豸½Úµã¹ØÁª£¬ÀýÈ磺/dev/hda1¡£Ó²¼þ×é¼þ¶ÔÓ¦ÓÚ½ÚµãÎļþÈ磺/dev/modem¡£¼ì²âµ½µÄÉ豸ÔÚ/procĿ¼Öд浵¡£FHSÊÇÓÃÀ´×éÖ¯linuxºÍunixÎļþµÄ·½·¨¡£
    »ù±¾Îļþϵͳ²ã´Î½á¹¹£º
    / ¸ùĿ¼£¬linuxµÄ×î¸ß¼¶Ä¿Â¼
    /bin »ù±¾µÄÃüÁîÐй¤¾ß£¬²»Ó¦¸Ãµ¥¶À¹Ò½Ó¡£
    /boot Òýµ¼Ä¿Â¼£¬°üº¬linuxµÄÆô¶¯Îļþ£¬ÆäÖÐÓÐlinuxÄںˡ£Ä¬ÈÏ´óС
    Ϊ100M
    /dev ËùÓÐÈíÓ²¼þÉ豸µÄÇý¶¯£¬²»Òª½«´ËĿ¼µ¥¶À¹Ò½ÓÔÚÒ»¸ö·ÖÇøÉÏ
    /etc ´æ·Å´ó¶àÊýµÄ»ù±¾ÅäÖÃÎļþ
    /home ´æ·Å´ó¶àÊýÓû§µÄÖ÷Ŀ¼
    /lib Äں˳ÌÐò¿âÒÔ¼°¸÷ÖÖÃüÁîÐй¤¾ß¡£²»Òª½«´ËĿ¼¹Ò½ÓÔÚµ¥¶ÀµÄ·ÖÇøÉÏ
    /mnt ¿ÉÒƶ¯É豸µÄ¹Ò½Óµã£¬°üÀ¨ÈíÅÌ£¬¹âÇýµÈ
    /opt ´æ·ÅÓ¦ÓóÌÐò£¬Èçwordperfect¡¢openofficeÌ×¼þµÈ
    /proc µ±Ç°ÔËÐеĺÍÄÚºËÏà¹ØµÄ½ø³Ì£¬°üÀ¨IRQ ports,I/OµØÖ·,DMAͨµÀ
    /root rootÓû§µÄÖ÷Ŀ¼
    /sbin ϵͳ¹ÜÀíÃüÁ²»Òªµ¥¶À¹Ò½Ó
    /tmp ÁÙʱÎļþ¼Ð
    /usr ¶ÔËùÓÐÓû§¿ÉÓõÄС³ÌÐò£¬°üÀ¨Ò»Ð©ÏµÍ³¹ÜÀíÃüÁîºÍ¹¦ÄÜ
    /var ¿É±äµÄÊý¾Ý°üÀ¨ÈÕÖ¾Îļþ£¬´òÓ¡³Ø
    ÎļþϵͳµÄ¸ñʽ¼°¼ìÑé
    ÓÃÀ´¶Ô²»Í¬µÄÎļþϵͳ½øÐйÜÀíµÄ¹¤¾ßÓÐÈçϼ¸ÖÖ£ºfdisk¡¢mkfs¡¢fsck
    fdisk:¸ÃÃüÁÄÜÇ¿´ó£¬µ«Ê¹ÓøÃÃüÁÄã±ØÐëÖªµÀÄãÐèÒª¶ÔÄǸöÓ²Å̽øÐиü¸Ä£¬¼´±ØÐëÖ¸¶¨¶ÔÓ¦µÄÉ豸¡£Èç¹ûÄãÒª¹ÜÀíµÚÒ»¸öscsiÓ²ÅÌÊäÈëÈçÏÂÃüÁfdisk /dev/sda
    fdiskÃüÁa Ö¸¶¨Òýµ¼·ÖÇø
    l ÁгöÒÑÖª·ÖÇøµÄÀàÐÍ
    n Ôö¼ÓеķÖÇø
    q²»±£´æÍ˳ö
    t ¸Ä±ä·ÖÇøµÄÎļþϵͳ
    mkfs:¸ñʽ»¯Ò»¸ölinuxÎļþϵͳ£¬Ê¹ÓÃmkfsÃüÁÀýÈ磺
    mkfs -t ext3 /dev/hda1
    fsck:´ÅÅ̼ì²éÃüÁÀàËÆÓÚwindows 2000µÄchkdsk£¬Ê¹ÓøÃÃüÁî֮ǰӦ½«ËùÒª¼ì²éµÄ´ÅÅÌжÔØ£¬ÀýÈçÒª¼ì²é¹Ò½ÓÔÚ/varĿ¼ÏµÄhda7·ÖÇø£º#umount /var
    #fsck -t ext3 /dev/hda7
    #mount /dev/hda7 /var
    Á·Ï°£º´´½¨ÐµÄlvm·ÖÇø
    1¡¢ Ôö¼ÓÒ»¸öеÄÓ²ÅÌ
    2¡¢ ´´½¨ÁËÒ»¸öеķÖÇø£¬Ê¹ÓÃfdisk¹¤¾ß½«¸Ã·ÖÇøÉèΪlvmÎļþϵͳ¡£
    3¡¢ ±¸·Ý/homeĿ¼
    4¡¢ ʹÓÃvgscanÃüÁɨÃèlvmÎļþϵͳ£¬ÎªÆäËûµÄlvmÃüÁî´´½¨Êý¾Ý¿â
    5¡¢ ʹÓÃpvcresate /dev/partition´´½¨¾í
    6¡¢ ʹÓÃvgcreate groupname /dev/partition1 /dev/partition2ÃüÁî´´½¨¾í×é
    7¡¢ ʹÓÃlvcreate -L -xyM -n volname groupname groupname´´½¨Âß¼­¾í£¬xyÊǾíµÄ´óС¡£
    8¡¢ ×îºóʹÓÃmkfsÃüÁîÀ´¸ñʽ»¯Âß¼­¾í
    9¡¢ ½«Âß¼­¾í¹Ò½ÓÔÚ/homeĿ¼Ï£¬ÐÞ¸Ä/etc/fstabʹµÃϵͳ×Ô¶¯¹ÒÔØ/homeĿ¼
    µÚÈý½Ú »ù±¾ÃüÁ¾ß
    ×÷ΪunixµÄ±äÌ壬linuxÓò»Í¬µÄ´úÂëʵÏÖÁ˺ÍunixÏàͬµÄ¹¦ÄÜ¡£ÕâÁ½ÖÖϵͳ¶¼ÊÇ»ùÓÚÃüÁîÐеģ¬Ê¹ÓÃÃüÁîÀ´¶Ôϵͳ½øÐÐά»¤
    »ù±¾Îļþ²Ù×÷
    ÿһ¸öÓû§¶¼»áÓÐÒ»¸öÖ÷Ŀ¼£¬~±íʾÓû§µÄÖ÷Ŀ¼¡£
    ·¾¶£º·ÖΪ¾ø¶Ô·¾¶ºÍÏà¶Ô·¾¶£¬ÒÔ/Ŀ¼¿ªÊ¼µÄ·¾¶±íʾ¾ø¶Ô·¾¶£¬Ïà¶ÔÓÚµ±Ç°Ä¿Â¼µÄ·¾¶ÊÇÏà¶Ô·¾¶¡£
    ÏÔʾµ±Ç°Ëù´¦Ä¿Â¼£ºpwdÃüÁîÏÔʾÄᵱǰÏà¶ÔÓÚ¸ùĿ¼µÄ·¾¶¡£
    ½øÈëÆäËûĿ¼£ºcd ʹÓÃÃüÁîcd¿ÉÒÔ½øÈëÆäËûµÄĿ¼£¬ÀýÈ磺cd /boot
    ÏÔʾĿ¼ÖеÄÎļþºÍ×ÓĿ¼£ºls
    ²éÕÒ£ºfind,ÀýÈç²éÕÒÎļþqq find / -name qq
    ÏÔʾÎļþÄÚÈÝ£ºcat filename¡¢less filename¡¢more filename
    head£ºÏÔʾÎļþµÄÇ°nÐÐ
    tail: ÏÔʾÎļþµÄºónÐÐ
    cp£º¿½±´Îļþ
    mv£ºÒƶ¯Îļþ
    ln£º´´½¨·ûºÅÁ´½ÓÎļþ
    sort£ºÅÅÐòÃüÁÀýÈ磺sort /etc/passwd
    grep and egrep£º²éÕÒÎļþ£¬ÀýÈ磺grep ¡®zhao¡¯ /etc/passwd
    wc£º¶ÔÎı¾Îļþ½øÐÐͳ¼Æ£¬µÃ³öÆäÖеÄ×Ö·ûÊý¡¢ÐÐÊýµÈÐÅÏ¢
    sed£ºÓÃÓÚÌæ»»ÎļþÖÐÖ¸¶¨µÄ×Ö·û£¬ÀýÈ磺ʹÓÃlinuxÌæ»»windows
    sed ¡®s/windows/linux¡¯ filename >; newfile Ìæ»»µÚÒ»¸ö·ûºÏµÄÏî
    sed ¡®s/windows/linux¡¯ filename >;newfile Ìæ»»ËùÓзûºÏµÄÏî
    awk£ºÊý¾Ý¿â¹ÜÀíÃüÁ¿ÉÒÔ¶Á³öÖ¸¶¨µÄÁдÓijÐУ¬Àý£ºÕÒ³öº¬ÓÐzhao µÄÐÐ
    awk ¡®/zhao/ {print $1}¡¯ /etc/passwd
    ps£ºÏÔʾµ±Ç°µÄ½ø³Ì
    who and w£ºÏÔʾµ±Ç°µÇ½µÄÓû§£¬¿ÉÒÔ¿´µ½Ë­µÇ½ÔÚÄǸöÖÕ¶ËÉÏ£¬µÇ½µÄʱ¼äÔËÐеĽø³Ì
    ͨÅä·û£º*¿ÉÒÔÆ¥ÅäÈÎÒâ×Ö·û
    £¿¿ÉÒÔÆ¥ÅäÈÎÒâµ¥×Ö·û
    [] Àý£ºls abc[123],ÈôÎļþ´æÔÚÔòÏÔʾabc1¡¢abc2¡¢abc3
    shells
    shellÊÇÒ»ÖÖÓû§½çÃ棬Äã¿ÉÒÔͨ¹ýshellʹÓø÷ÖÖ¸÷ÑùµÄÃüÁîÀ´ºÍ¼Æ
    Ëã»ú½øÐн»»¥£¬Í¨¹ýÕýÈ·µÄȨÏÞ£¬Äã¿ÉÒÔ°ÑÃüÁî·½Ôڽű¾ÎÄ
    ¼þÖÐÔÚÖ¸¶¨µÄʱ¼äÔËÐУ¬ÉõÖÁÊÇÔÚÉîÒ¹¡£LinuxÖ´ÐÐÃüÁîµÄ
    ˳Ðò£¬È¡¾öÓÚÄã¶Ôÿ¸öÃüÁîµÄÊäÈëÓÚÊä³öµÄ°²ÅÅ¡£
    ÔÚ¸÷ÖÖshellÖÐÃüÁîµÄÔËÐз½Ê½ºÜ´ó³Ì¶ÈÉÏÈ¡¾öÓÚ¸ÃÃüÁîµÄ²ÎÊýºÍÑ¡Ïî¡£²¿·Ö±äÁ¿¶ÔÓÚ¸÷ÖÖshellÊÇͨÓõġ£
    linuxĬÈϵÄshellÊÇbash,ÔÚÓû§ÖÐÁ÷ÐеÄÆäËüºÜ¶àshellÒ²ÊÇ¿ÉÓõģ¬È磺c shell¡¢k shell
    Ìí¼Ópathµ½×Ô¼ºµÄ·¾¶:
    #PATH=$PATH:/sbin
    #export PATH
    ²é¿´×Ô¼ºµ±Ç°µÄpath:
    #echo $PATH
    ²é¿´Îı¾ÎļþµÄÄÚÈÝ£º
    #cat filename
    Öض¨Ïò°ÑÒ»¸öÎļþµÄÊä³ö×÷ΪÁíÍâÒ»¸öµÄÊäÈ룬Àý£º
    #database < datafiles ½«Îļþdatafiles×÷Ϊ³ÌÐòdatabaseµÄÊäÈë
    Êä³öÖض¨Ïò£º
    #cat /etc/passwd >;filenam°ÑÊä³ö½á¹ûÖض¨Ïòµ½Îļþfilename
    #cat /etc/group >;>;filename ½«Êä³öµÄÄÚÈÝ×·¼Óµ½filename
    ²é¿´Æô¶¯ÐÅÏ¢£º
    #dmesg | less :·ÖƽÏÔʾÆô¶¯ÈÕÖ¾
    Öض¨Ïò´íÎóÐÅÏ¢£º
    #redhat-config-network 2>;error Èç¹ûÔËÐÐÕý³£ÔòÎÞÊä³ö£¬ÈôÓдíÎóÔò½«´íÎóÐÅÏ¢Öض¨Ïòµ½Îļþerror
    µÚËÄ½Ú »ù±¾°²È«
    linuxµÄ°²È«ÐÔÊÇ»ùÓÚÎļþµÄȨÏÞ¹ÜÀí¡£Ä¬ÈϵÄȨÏÞͨ¹ýumask±äÁ¿À´½øÐÐÉ趨¡£SuidºÍsgidȨÏÞ¸³Óèÿһ¸öÖ¸¶¨µÄÎļþ¡£¶ÔȨÏÞºÍÊôÖ÷½øÐиü¸Ä·Ö±ðʹÓÃÃüÁchmod chown chgrp
    umask:
    ÓÃÓÚÉèÖÃĬÈϵÄÎļþȨÏÞ£¬Àý£ºumask=123,ÔòĬÈϵÄȨÏÞΪ777-123=654£¬µ«Êµ¼ÊÉϲ»ÂÛumaskµÄ×îºóһλÊÇʲô£¬Ä¬ÈϵÄȨÏÞ×îºóһλһ¶¨ÊÇ0£¬¼´²»¾ßÓпÉÖ´ÐÐȨÏÞ¡£
    Suid and sgid:
    ΪÁË·ÀÖ¹¸³Óèÿһ¸öÓû§ÍêÈ«µÄȨÏÞµ¼ÖµÄDZÔÚµÄÍþв£¬¿ÉÒÔÉèÖÃsuidºÍsgidÀ´¼õС·çÏÕ£¬ÏêÇé¼þºóÐøÕ½Ú
    shadow passwords
    ²é¿´/etc/passwdÎļþµÄʱºò£¬Äã»á·¢ÏÖÓÐÕâôһÁУºx.¾É°æ±¾µÄlinuxÔÚÕâ¸öλÖý«ÃÜÂë¼ÓÃÜ¡£ÓÉÓÚ/etc/passwd¶ÔËùÓеÄÓû§¶¼ÊÇ¿ÉÒÔ·ÃÎʵģ¬ËùÒԾͻáÓкڿͽ«Õâ¸öÎļþ¿½±´Ö®ºó½øÐÐÆƽâÒԴεõ½¸Ã¼ÆËã»úµÄÃÜÂë¡£Õâ¸öÎÊÌâµ¼ÖÂÁËshadow passwords suiteµÄ³öÏÖ¡£
    Shadow password suite
    Shadow password suiteΪÃÜÂëÌṩÁ˸ü½øÒ»²½µÄ±£»¤£¬Ëü°Ñ¼ÓÃܺóµÄÃÜÂë´æ·ÅÔÚshadowÎļþÖУ¨/etc/shadow¡¢/etc/gshadow£©¡£´ËÎļþÖ»ÓÐrootÓû§¿ÉÒÔ¶ÁÈ¡¡£
    Shadow password command
    Pwconv: ½«/etc/passwdת»¯Îª/etc/shadow
    Pwunconv:½«/etc/shadowת»¯Îª/etc/passwd
    Grpconv:½«/etc/groupת»¯Îª/etc/gshadow
    Grpunconv:½«/etc/gshadowת»¯Îª/etc/group
    µÚÎå½Ú ϵͳ¹ÜÀí
    ´ó¶àÊý¹ÜÀíÈÎÎñÐèÒªroot»òÕß³¬¼¶Óû§È¨ÏÞ¡£ÄãÓ¦¸ÃÒѾ­¶ÔÒ»²¿·Ö»ù±¾µÄlinuxϵͳ¹ÜÀíÃüÁîºÍÎļþ·Ç³£ÊìϤ¡£±ê×¼Óû§Îļþ´æ´¢ÔÚ/etc/skelÎļþÖС£ÊØ»¤½ø³ÌÔÚºǫ́ÔËÐв¢ÇÒÖ´Ðи÷ÖÖ²»Í¬µÄ·þÎñ¡£CronÊÇÒ»ÖÖÌØÊâµÄÊØ»¤½ø³Ì£¬Ëü¿ÉÒÔÔÚÖ¸¶¨µÄ³¡ºÏÔËÐÐÖ¸¶¨µÄ½Å±¾Îļþ¡£¶ÔÓÚÎçÒ¹Ö´Ðеı¸·ÝÈÎÎñ£¬ÕâÏÄܷdz£ÓÐÓá£
    ×ÜÌåÀ´Ëµ£¬×÷Ϊϵͳ¹ÜÀíÔ±¿ÉÒÔÖ´ÐÐÆÕͨÓû§µÄÈκÎÈÎÎñ¡£½ö½öµ±ÐèÒªµÄʱºò²ÅʹÓ󬼶Óû§ÊÇÒ»¸öºÜºÃµÄÖ÷Òâ¡£ºÃµÄϵͳ¹ÜÀíÔ±ÔÙÈÎÎñÍê³ÉÒÔºó»á·µ»ØÆÕͨÓû§µÄÉí·Ý¡£¹ÜÀíÔ±µÄ´íÎó¿ÉÄÜ»á¸øϵͳ´øÀ´ºÜ´óµÄÉ˺¦¡£
    Su :superuserÃüÁsu -c Ö»¶ÔÒ»¸öÌض¨µÄÃüÁîÉ趨¸ùÓû§È¨ÏÞ¡£
    Su - root£ºÇл»µ½¸ùÓû§
    Sudo£º¸ÃÃüÁîÔÊÐí/etc/sudoersÖÖµÄÓû§ÔËÐйÜÀíÔ±µÄÃüÁî
    /etc/skel£º¶Ô¸öÌåÓû§¿ÉÓõÄÅäÖÃÎļþ´æÔÚÓÚ/etc/skel/Ŀ¼ÖÐ
    tar czvf home.tar.gz /home ±¸·Ý/homeĿ¼Ϊhome.tar.gz
    tar xzvf home.tar.gz /home ½«home.tar.gz ½âѹËõ
    gzip hello.jpg ѹËõhello.jpgÎļþ
    gunzip hello.jpg.zip ½âѹËõhello.jpg.zip
    µÚÎå½Ú tcp/ip»ù´¡ÖªÊ¶
    tcp/ipÊÇ·Ö²ã×éÖ¯µÄһϵÁÐЭÒ飬³Æ֮ΪЭÒé×å¡£ËüÊÇ´ÓunixÉÏ·¢Õ¹¶øÀ´×îÖÕ³ÉΪÒòÌØÍøÉϵÄͨÐűê×¼¡£Äã¿ÉÒÔʹÓÃipµØÖ·À´×éÖ¯ÄãµÄÍøÂç¡£ÓÐһϵÁеŤ¾ß¿ÉÒÔ°ïÖúÄãÀ´ÅäÖÃÄãµÄÍøÂç¡£
    »ù±¾¹¤¾ß£º
    ping£ºÓÃÀ´²âÊÔÍøÂçÁ¬½ÓÊÇ·ñÓйÊÕÏ¡£Àý£ºping 127.0.0.1
    ifconfig:×îÖØÒªµÄÍøÂçÅäÖÃÃüÁÀý£ºifconfig eth0 192.168.0.1 netmask 255.255.255.0 ·ÖÅäipµØÖ·¡£Ifconfig eth1 irq 10 ·ÖÅäÖжϺš£Ifconfig eth0 up/downÆôÓûòÍ£Ö¹Ö¸¶¨µÄÍø¿¨
    netstat:²é¿´ºÍÍøÂçÏà¹ØµÄÐÅÏ¢£¬Àý£ºnetstat -r ²é¿´Â·Óɱí
    /etc/hosts: ipµØÖ·ºÍÖ÷»úÃûµÄ¶ÔÓ¦±í
    /etc/resolv.conf: ¸ÃÎļþÖ¸¶¨ÁËÓòÃû·þÎñÆ÷
    /etc/host.conf: ¸ÃÎļþÖ¸¶¨ÁËÒÔºÎÖÖ˳Ðò²éѯÖ÷»úÃû
    /etc/nsswitch.conf£º²»ÊǺÜÁ˽⣬Çë¸÷λָµã¡£
    µÚÁù½Ú »ù´¡Ó²¼þ֪ʶ
    redhatËäÈ»¿ÉÒÔÓ¦ÓÃÓÚ¸÷ÖÖÓ²¼þƽ̨£¬ÖîÈ磺alpha¡¢itanium¡¢s/390,µ«RHCEºÍRHCT¿¼ÊÔÊÇ»ùÓÚintel32λ¼Ü¹¹µÄ¼ÆËã»úµÄ¡£Pc»úµÄ¼Ü¹¹¾ö¶¨ÁËËüËùʹÓõÄ×é¼þºÍËü¿ÉÒÔʹÓõÄÉ豸¡£ËùÓеÄÈí¼þ¶¼ÊÇΪÌض¨¼Ü¹¹µÄ¼ÆËã»úд³öÀ´µÄ¡£µ«²¢²»ÊÇËùÓлùÓÚintelµÄÈí¼þ¶¼¿ÉÒÔÔËÐÐÔÚlinuxµÄ»úÆ÷ÉÏ¡£Òò´ËÎÒÃÇÓбØÒªÁ˽â»ù±¾µÄintel¼ÆËã»úµÄ¼Ü¹¹¡£
    IRQ Settings
    IrqÊÇÓÉÍâΧÉ豸·¢Ë͸ø´¦ÀíÆ÷ÒªÇó´¦Àíʱ¼äµÄÐźš£Á¬½Óµ½¼ÆËã»úµÄÿһ¸öÉ豸¶¼ÐèÒªÒ»¸öirq¶Ë¿Ú¡£Õý³£Çé¿öÏ£¬Ã¿Ò»¸öÉ豸ÐèÒªÒ»¸öרÓõÄirq¡£Intel¼Ü¹¹µÄ¼ÆËã»úÖ»ÓÐÊ®Áù¸öirq£¨0-15£©£¬ÏÖÔÚÕâЩirq¶Ë¿ÚºÅ³£³£»áÏԵò»¹»Óá£Í¨¹ý¹²Ïí¶Ë¿ÚºÅ¿ÉÒÔÖ§³Ö¸ü¶àµÄÉ豸¡£2000ÄêÒÔºóÉú²úµÄ¼ÆËã»ú´ó¶à¶¼Ö§³Ö¸Ã¹¦ÄÜ¡£¿ÉÒÔ¹²ÏíirqµÄÖ÷ÒªÊÇPci¡¢usb½Ó¿ÚµÄÉ豸¡£
    DMA:
    DmaÉ豸֮¼ä¿ÉÒÔÖ±½ÓͨÐŶø²»¾­¹ýcpu£¬µ«ÊÇdmaÉ豸ÈÔÈ»ÐèÒªirq¶Ë¿ÚºÅ£¬ÒÔ¹²Óа˸ö±ê×¼dmaͨµÀ£¨0-7£©£¬ÆäÖÐdma4ÊôÓÚ±£ÁôºÅÂ룬²»ÄÜÓÃÓÚÈκÎÉ豸¡£
    ÄÚ´æÐèÇó
    ¶ÔÓÚas3.0×îÉÙÐèÒª256mÄڴ棬ʵ¼ÊÉÏÎÒµÄÄÚ´æÉÙÓÚ256ÔËÐеÄÒ²»¹ËãÕý³££¬Ö»ÊÇÂýÁ˵㡣ϵͳËùÐèµÄ×î´óÄÚ´æÊÇÄãͬʱÔËÐÐËùÓгÌÐòËùÐèÒªµÄÄÚ´æÈÝÁ¿£¬ÕâÄÑÓÚ¼ÆË㣬ËùÒÔÄãÓ¦¸Ã¾¡Á¿¹ºÂò´óÒ»µãµÄÄڴ棬ÕâÑù¿ÉÒÔÈÃÄãµÄϵͳÔËÐеĸüºÃ¡£As3.0Ö§³ÖµÄ×î´óÄÚ´æÊÇ64g¡£Èç¹ûÄãµÄÄÚ´æ´óÓÚ16g£¬ÄãÐèÒª°²×°hugemenmÄںˣ¬ÏêÇéÈݺó½éÉÜ¡£
    ¹ØÓÚÓ²ÅÌ£º
    ÔÚÄãµÄ¼ÆËã»ú½«linuxÔØÈçϵͳ֮ǰ£¬biosÒ»¶¨ÒªÄܹ»Èϳö°üº¬Òýµ¼ÎļþµÄÖ÷·ÖÇø¡£ÕâÑùÓ²ÅÌÉϵÄlinux²ÅÄÜÆô¶¯£¬ÄãÓ¦¸ÃÖªµÀÏÂÃæÕâЩ¹ØÓÚÓ²Å̵Ä֪ʶ¡£
    ±ê×¼intel¼Ü¹¹Ö§³Ö4¸öideÓ²ÅÌ
    ×î¶àÖ§³Ö31Ò»¸ö²»Í¨µÄscsiÓ²ÅÌ
    linux¿ÉÒÔ°²×°ÔÚÇ°Á½¸öÓ²ÅÌÉÏ£¬·ñÔòÄã¾ÍÐèÒªÒ»ÕÅÆô¶¯ÈíÅÌÀ´Òýµ¼ÏµÍ³ÁË
    ¾¡¹ÜÄã¿ÉÒÔʹÓÃusbÓ²ÅÌ»ò1394Ó²Å̵«ÊÇÄã²»Ó¦¸Ã½«ÏµÍ³°²×°ÔÚÕâÁ½ÖÖÉ豸ÉÏ£¬ÒòΪ¼È²»ÄÜ´ÓÕâÁ½ÖÖÓ²ÅÌÒýµ¼£¬Ò²²»ÄÜʹÓÃÈíÅÌÀ´Òýµ¼×ÅÁ½ÖÖÓ²ÅÌÉϵÄϵͳ¡£
    µÚÆß½Ú Ó²¼þ¼æÈÝÐÔ
    ¼øÓÚ´ó¶àÊýÈËʹÓõÄÓ²¼þ¶¼¿ÉÒÔ±»linuxÖ§³Ö£¬´Ë½Ú¾Í´ËÂÔ¹ý
    µÚ°Ë½Ú ÅäÖÃÍâΧÉ豸 ÂÔ


    µÚ¶þÕ ´ÅÅ̹ÜÀí
    µÚÒ»½Ú ´ÅÅÌ·ÖÇø
    ´ÅÅÌʹÓÃ֮ǰ±ØÐë½øÐиñʽ»¯³ÉijÖÖ¸ñʽ²ÅÄܹ»Ê¹Óã¬linuxÖ§³Ö¶àÖÖÎļþϵͳ¡£Ã¿Ò»¸öÓ²ÅÌ×î¶à¿ÉÒÔ»®·ÖΪ16¸ö·ÖÇø¡£
    ´ÅÅÌ·ÖÇø£ºÍƼöʹÓÃfdisk¡£¾ÙÀý˵Ã÷£º
    #fdisk /dev/hda hdaÖ¸µÚÒ»¿éideÓ²ÅÌ£¬scsiÓ²ÅÌΪsda»òsdbµÈ
    command(m for help): nÔö¼Ó´ÅÅÌ·ÖÇø
    command action
    e extended
    p primary partition (1-4)
    p Ôö¼ÓÖ÷·ÖÇø
    Partition number (1-4):1
    First cylinder (1-512, default 1):
    Using default value 1
    Last cylinder or +size or +sizeM +sizeK(1-512,default512):+200M
    Command (m for help):p ²é¿´µ±Ç°´ÅÅÌÐÅÏ¢
    Device Boot Start End Blocks Id System
    /dev/sdb1 1 192 196592 83 Linux
    Command (m for help):w ±£´æÍ˳ö
    Mount£ºÏÔʾµ±Ç°¹Ò½ÓµÄĿ¼
    Df£º²é¿´´ÅÅÌÐÅÏ¢
    Du: ²é¿´Îļþ¼ÐµÄ¿Õ¼äʹÓÃЧÂÊ
    ´ÅÅ̸ñʽ»¯£ºmkfs ,Àý£º¸ñʽ»¯/dev/sda1: mkfs -t ext3 /dev/sda1
    µÚ¶þ½Ú À©Õ¹´ÅÅÌ¿Õ¼ä
    ÏÖÓеĴÅÅ̵Ŀռä¿ÉÄÜ»áËæ×Åʱ¼äµÄÔö³¤¶ø±äµÃÔ½À´Ô½²»¹»Óá£ÔÚÕâÖÖÇé¿öϾÍÐèÒªÔö¼ÓеĴÅÅÌÀ´¶ÔÔ­ÏȵÄÓ²Å̽øÐÐÀ©Õ¹¡£·½·¨ÈçÏ£º
    1¡¢ ½«ÐµÄÓ²Å̽Ӻ㬽øÈëϵͳºóʹÓÃfdisk½øÐзÖÇø£¬È»ºó¸ñʽ»¯¡£
    2¡¢ ½¨Á¢Ò»¸ö¿ÕĿ¼£¬ÀýÈ磺mkdir /mnt/newdisk.
    3¡¢ ¹Ò½ÓеÄÓ²Å̵½Ð½¨µÄ¿ÕĿ¼£ºmount /dev/sda1 /mnt/newdisk
    4¡¢ ÐÞ¸Ä/etc/fstabʹ¸Ã·ÖÇø×Ô¶¯¹ÒÔØ
    µÚÈý½Ú Âß¼­¾í¹ÜÀí£¨lvm£©
    ´ÅÅÌÉϵÄijһ¸öĿ¼´æ´¢µÄÎļþÔö³¤Ñ¸ËÙ¿Õ¼äÈÕ½¥²»¹»Ê¹ÓÃ
    ÕâʱºòÄã¿ÉÒÔʹÓÃlvmÀ´½â¾öÕâ¸öÎÊÌ⡣ʵÏÖ·½·¨ÈçÏ£º¼ÙÉèÒªÔö¼Ó/homeĿ¼µÄ¿Õ¼ä¡£
    1¡¢ Ôö¼ÓеÄÓ²ÅÌ£¬·ÖÇø¡¢¸ñʽ»¯£¬¼Ù¶¨ÒªÔö¼ÓµÄеķÖÇøΪ/dev/sdb2,/homeĿ¼µÄ·ÖÇøΪ£º/dev/sda7
    2¡¢ ±¸·Ý/homeÎļþ¼ÐµÄÄÚÈÝ
    3¡¢ #umount home
    4¡¢ #vgscan ½øÐÐɨÃè²¢´´½¨Ïà¹ØµÄÎļþ
    5¡¢ #pvcreate /dev/sda7 /dev/sdb2 ´´½¨ÎïÀí¾í
    6¡¢ #vgcreate vgtest /dev/sda7 /dev/sdb2 ´´½¨¾í×é
    7¡¢ #lvcreate vgtest -L 2000M -nlvtest
    8¡¢ #mkfs -t ext3 /dev/vgtest/lvtest
    9¡¢ #mount /dev/vgtest/lvtest /home
    10¡¢ #vi /etc/fstab,ɾ³ýºÍhome Ïà¹ØµÄÐУ¬²¢Ôö¼ÓÈçÏÂÐУº/dev/vgtest/lvtest /home ext3 defaults 0 0
    11¡¢ #reboot
    µÚËÄ½Ú ´ÅÅÌÕóÁÐ
    ´ÅÅÌÕóÁпÉÒÔÓÐЧµÄÌá¸ßÊý¾ÝµÄ¶ÁдËٶȺÍÊý¾ÝµÄ¿É¿¿ÐÔ¡£¾ßÌå·ÖÀàÈçÏ£ºraid 0¡¢raid 1¡¢raid 2¡¢raid 3¡¢raid 4¡¢raid5ÆäÖг£ÓõÄÊÇ£ºraid 0¡¢raid 1¡¢raid 5,¼ò½éÈçÏ£º
    raid 0£ºÊ¹ÓÃÁ½¿éÓ²ÅÌ£¬Êý¾Ý·Ö±ð´æ·ÅÔÚÁ½¿éÓ²ÅÌÉÏ£¬¶ÁдËٶȽϿ죬µ«²»ÌṩÊý¾ÝÈßÓà¡£
    Raid 1: Ò²³ÆΪ´ÅÅ̾µÏñ£¬ÔÚÁ½¿éÓ²ÅÌÉÏͬʱ´æ´¢ÍêÈ«ÏàͬµÄ
    Êý¾Ý£¬Ð´ÈëËÙ¶ÈÒ»°ã£¬µ«¶ÁÈ¡ËÙ¶ÈÔö¼ÓÒ»±¶¡£ÈÎÒâ Ò»¿éÓ²ÅÌË𻵲»»á¶ÔÊý¾ÝÔì³ÉË𺦡£
    Raid 5: Ò²³ÆΪ´øÆæżУÑéµÄ´ÅÅÌÌõ´ø»¯£¬×îÉÙÐèÒª3¿éÓ²
    ÅÌ£¬×î¶àÖ§³Ö32¿éÓ²ÅÌ£¬¿ÉÓôÅÅÌÊýÁ¿Îªn -1¿éÓ²
    ÅÌ¡£¶ÁÈ¡ËٶȺÍдÈëËٶȶ¼ÓÐÒ»¶¨³Ì¶ÈµÄÌá¸ß¡£Îª
    ×î³£ÓõÄÕóÁÐÐÎʽ¡£
    ʵÏÖ·½·¨£º¼Ù¶¨Ìí¼ÓÁËËÄ¿éÓ²Å̵½¼ÆËã»ú£¬·Ö±ðΪ/dev/sdb¡¢
    /dev/sdc¡¢/dev/sdd¡¢/dev/sde,ʵÏÖ²½ÖèÈçÏ£º
    1¡¢ ·Ö±ð½øÐзÖÇø¸ñʽ»¯
    2¡¢ ¸ü¸Ä·ÖÇøÀàÐÍ£ºfdisk /dev/sdb1
    t
    fd
    p
    w
    ¶Ôÿһ¿éÓ²Å̽øÐÐÈçÉϲÙ×÷£¬°Ñ·ÖÇøÀàÐÍ
    ¸ÄΪraid
    3¡¢ ´´½¨/etc/raitab
    #vi /etc/raidtabÈçÏÂÄÚÈÝ£º
    raiddev /dev/md0
    raid-level 1
    nr-raid-disks 2
    nr-spare-disks 0
    persistent-superblock 1
    chunk-size 4
    device /dev/sdb1
    raid-disk 0
    device dev/sdc1
    raid-disk 1
    ±£´æÍ˳ö¡£
    #mkdir /dev/md0 ´´½¨ÕóÁÐmd0
    #mkfs -t ext3 /dev/md0 ¶ÔÕóÁнøÐиñʽ»¯
    µÚÎå½Ú Ôö¼Ó½»»»·ÖÇø
    #mkswap /dev/sdb1 ´´½¨½»»»·ÖÇø
    #swapon /dev/sdb1 ¿ªÆôÐÂÔöµÄ½»»»·ÖÇø
    #cat /proc/swaps ²é¿´µ±Ç°µÄ½»»»·ÖÇø
    µÚÁù½Ú Ôö¼Ó½»»»Îļþ
    #dd if=/dev/zero of=/swapfile bs=1024 count=8192
    #mkswap /swapfile
    #swapon /swapfile
    ½»»»Îļþ×î¶à8¸ö£¬Ã¿¸ö×î´óÈÝÁ¿Îª16M
    µÚÆß½Ú ¶ÁÈ¡windowsµÄÎļþ
    #mkdir /mnt/windows ½¨Á¢Ò»¸ö¿ÕĿ¼
    #mount -t vfat /dev/hda4 /mnt/windows ¹Ò½Ówindows
    µÄfat·ÖÇø
    #mount -t ntfs /dev/hda5 /mnt/windows ¹Ò½Óntfs·ÖÇø£¬linuxÄÚºÍĬÈϲ»Ö§³Öntfs·ÖÇø£¬ÒªÈÃlinuxʶ±ðntfs·ÖÇø±ØÐëÒªÖØ Ð±àÒëÄں˼ÓÈë¶ÔntfsµÄÖ§³Ö¡£















    µÚÈýÕ »ù±¾ÅäÖú͹ÜÀí
    µÚÒ»½Ú Óû§¹ÜÀí
    1¡¢Ôö¼ÓÓû§£º·½·¨1£º#useradd username -p password
    Àý£ºÔö¼ÓÓû§kk,ÃÜÂëkk #useradd kk -p kk
    ·½·¨2£ºÖ±½ÓÐÞ¸Ä/etc/passwdÎļþ£¬È»ºóÊÖ¹¤´´
    ½¨ÏàÓ¦µÄÓû§Ö÷Ŀ¼
    2¡¢ÐÞ¸ÄÓû§£º#usermod -l newusername -c ¡°comment¡± -d /home/newusername oldusername
    Àý£º°Ñtest Óû§Ãû¸ÄΪtest2,Ö÷Ŀ¼¸ÄΪ£º/home/test2
    usermod -l test2 /home/test2 test(test2Ŀ¼ҪÊÖ¹¤½¨)
    -p:ÐÞ¸ÄÃÜÂë
    -e£ºÉ趨Õ˺ŹýÆÚʱ¼ä
    -s: É趨shell
    -p: É趨ÃÜÂë
    3¡¢ ¸ÄÃÜÂ룺passwd username
    4¡¢ ɾ³ýÓû§£ºuserdel username
    5¡¢ ÏÞ¶¨¿ÉÒÔÖ´ÐУºsu ÃüÁîµÄÓû§£ºÆÕͨµÄÓû§Èç¹ûÖªµÀroot
    µÄÃÜÂ룬¾Í¿ÉÒÔͨ¹ýsuÃüÁîÈ¡µÃ¸ùÓû§µÄȨÏÞ¡£ºÚ¿ÍÒ²ÓпÉÄÜͨ¹ý±©Á¦ÆƽâµÄ°ì·¨£¬»ñµÃ³¬¼¶È¨ÏÞ£¬Òò´ËÓбØÒª¶Ô¿ÉÒÔÖ´ÐÐsuÃüÁîµÄÓû§½øÐÐÏÞÖÆ¡£¾ßÌå·½·¨ÈçÏ£º
    #vi /etc/pam.d/su£¬ÐÞ¸ÄÆäÖÐÒ»ÐУº
    #auth required /lib/security/$ISA/pam_wheel.so use_uid
    ½«ÐÐÊ×#È¥µô£¬ÕâÑù¾ÍÖ»ÓÐwheel×éÖеÄÓû§¿ÉÒÔʹÓÃsuÃüÁîÁË¡£È»ºó½«Ñ¡¶¨µÄÓû§¼ÓÈëµ½wheelÓû§×é¼´¿É¡£
    µÚ¶þ½Ú »ù±¾Óû§»·¾³
    µ±ÎÒÃÇʹÓÃuserddÃüÁî»òredhat-config-users¹¤¾ßÀ´´´½¨Ò»¸öеÄÓû§µÄʱºò£¬»á×Ô¶¯Éú³ÉÓû§µÄÖ÷Ŀ¼ºÍһЩĬÈϵÄÎļþÉ趨һЩÅäÖ㬼´ËùνµÄÓû§»·¾³¡£ÕâЩĬÈϵÄÅäÖúÍÎļþ´æ´¢ÔÚ/etc/skelÎļþ¼ÐÖС£Ä¬ÈÏÎļþÓÐÒÔÏÂÕâЩ£º.bash_logout¡¢.bash_profile¡¢.bashrc¡¢.kde¡¢.zshrc£¬²»Í¬µÄ°æ±¾µÄlinuxĬÈÏÎļþ¿ÉÄÜÒ²»áÓÐһЩ²î±ð
    µÚÈý½Ú Îļþϵͳ¹ÜÀí¼°×Ô¶¯¹Ò½Ó
    1¡¢ ¹Ò½ÓÈíÅÌ£ºmount -t vfat /dev/fd0 /mnt/floppy
    »òÕߣºmount /mnt/floppy »òÕߣºmount /dev/fd0
    2¡¢×Ô¶¯¹ÒÔÚÈíÅÌ£ºÐÞ¸Ä/etc/fstab Ôö¼ÓÈçÏÂÒ»ÐУº
    /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
    3¡¢Ð¶ÔØÈíÅÌ£ºumount /mnt/floppy
    жÔعâÇý£ºumount /mnt/cdrom
    µÚËÄ½Ú RPMµÄʹÓüò½é
    ËùνrpmÊÇÖ¸redhat package manager¼´ºìñÈí¼þ°ü¹ÜÀíÆ÷£¬ÊÇÓÐredhat¹«Ë¾´´½¨µÄÒ»ÖÖÈí¼þ·¢Ðз¢Ê½£¬rpm¸ñʽ·¢ÐеÄÈí¼þÒ×ÓÚ°²×°£¬Ïà±ÈÆäËûµÄ·¢Ðз½Ê½ÓкܴóµÄÓÅÔ½ÐÔ¡£Ôڴ˼ò½éÆä»ù±¾Ó÷¨¡£
    1¡¢rpm -i penguin-3.4.5.-26.i386rp°²×°ÒÔrpmÐÎʽ·¢ÐеÄÈí¼þ
    2¡¢rpm -U penguin-3.4.5-26.i386.rpm Éý¼¶Èí¼þ°ü
    3¡¢rpm -e penguin-3.4.5.26 ɾ³ýÈí¼þ
    http://download.fedora.redhat.com/pub/fedora/linux/core/update/i386/kernel-smp-2.6.7-1.494.2.2.i686.rpm°²×°Ô¶³Ìrpm°ü
    5¡¢rpm -import /usr/share/rhn/RPM_GPG_KEY µ¼Èëgpg¹«Ô¿
    6¡¢ rpm -checksig /mnt/cdrom/RedaHat/pxe-0.1-36.i386.rpmµ¼È빫ԿÒÔºó¶ÔÎļþµÄÍêÕûÐÔ½øÐÐÑéÖ¤
    7¡¢ rpm -verify -p /mnt/cdrom/RedaHat/pxe-0.1-36.i386.rpm½øÐÐmd5УÑéºÍµÄÑéÖ¤
    8¡¢ rpm --redhatprovides /etc/group²éÕÒij¸öÎļþ¶ÔÓ¦µÄrpm°ü
    9¡¢ rpm -q samba ²éѯsambaÊÇ·ñ°²×°£¬ÒÔ¼°°æ±¾
    10¡¢ rpm -qf /etc/passwd ²éѯ/etc/passwdÊôÓÚÄĸöÈí¼þ°ü
    µÚÎå½Ú ¹ØÓÚrpm Ô´Âë°ü
    1¡¢ ͨ¹ýrpm Ô´Âë°ü´´½¨ºÍ¶¨ÖÆrpm
    rpm -ivh rpm-build-4.2.3-10.i386.rpm£º°²×°rpmbuild¹¤¾ß
    rpm -ivh modutils-2.4.21-22.src.rpm£º°²×°Ô´Âë°ü
    ÕâʱÔÚ/usr/src/redhat/SPECSÎļþ¼ÐÄÚ¿ÉÒÔ¿´µ½modutils.spec£¬/usr/src/redhat/SOURCESÎļþ¼ÐÄÚ¿ÉÒÔ¿´µ½ÒÔϵÄÎļþ£ºmodutils-2.4.21.tar.gz¡¢modutils-2.4.21.tar.gz
    cd /usr/src/redhat/SPECS/ ½øÈë¸ÃÎļþ¼Ð
    rpmbuild -ba modutils.spec ÖØбàÒ뽨Á¢rpm°ü£¬ÔËÐнáÊøºó£¬
    cd /usr/src/redhat/RPMS¿ÉÒÔ¿´µ½ÈçÏÂÎļþ£ºmodutils-2.4.21.i386.rpm modutils-debuginfo-2.4.21-22.i386.rpm
    ÖÁ´Ërpm°ü³É¹¦½¨Á¢£¬Ê¹ÓÃrpmbuildÃüÁîµÄʱºò£¬Ê¹ÓòÎÊý-bbҲͬÑù¿ÉÒÔÉú³Érpm°ü
    µÚÁù½Ú »ù±¾ÍøÂçÅäÖÃ
    ´ó¶àÊýÇé¿öÏ£¬ÔÚϵͳµÄ°²×°¹ý³ÌÖУ¬ÍøÂçµÄÏà¹ØÉèÖþÍÒѾ­ÉèºÃÁË£¬µ«ÊÇÈç¹ûÄãÅöµ½ÁËÎÊÌ⣬Äã¿ÉÄܾͻáÐèÒªÕï¶ÏÍøÂçµÄ¹ÊÕÏ£¬ÌرðÊÇÅųýÍøÂç¹ÊÕϵÄʱºò£¬¾Í¸üÐèÒªÁ˽âÍøÂçÅäÖõÄ֪ʶ¡£
    1¡¢ºÍÍøÂçÏà¹ØµÄÅäÖÃÎļþ´ó¶àÊý¶¼´æ´¢ÔÚ/etc/sysconfigÎļþ¼ÐÀï¡£/etc/syscofig/networkÊDZȽÏÖØÒªµÄÒ»¸ö£¬ÆäÉèÖüò½éÈçÏ£º
    networking£º¿ÉÒÔÉèÖÃΪyes»òÕßno ÒÔ´ËÀ´¾ö¶¨µçÄÔÊÇ·ñÁªÍø¡£
    Nisdomain: Èç¹ûÄãʹÓÃnisÍøÂ磬ÄãÓ¦¸ÃÔÚÕâ¸öÎļþÖÐÖ¸¶¨nisÓòµÄÃû×Ö
    Hostname£ºÉ趨¼ÆËã»úµÄÃû×Ö
    Gateway£ºÉ趨Íø¹ØµÄipµØÖ·
    Gatewaydev£ºÉ趨ÍøÂçÉ豸£¬ÀýÈçeth0£¬Èç¹ûÄãÖ»ÓÐÒ»¸öÍø¿¨ÄÇôÄãÓ¦¸Ã¿´²»µ½Õâ¸öÑ¡Ïî¡£
    2¡¢/etc/syscofnig/network-scripts/ ÃüÁî¼´ÅäÖÃÎļþ½éÉÜ
    ifconfig-eth0£ººÍµÚÒ»¿éÍø¿¨ÓйصÄÉèÖã¬ÈçipµØÖ·¡¢×ÓÍøÑÚÂë¡¢ÍøÂçµØÖ·¡¢Íø¹ØµÈµÈ¡£×îºóһλµÄ0´ú±íµÚÒ»¿éÍø¿¨£¬ÈçÓеڶþ¿éÍø¿¨£¬¾Í»áÓÐifconfig-eth1Îļþ£¬ÒÀ´ËÀàÍÆ¡£
    Ifconfig-lo:ÅäÖÃlookback É豸µÄÏà¹ØÐÅÏ¢£¬ÄÚÈÝÓëifconfig-eth0ÀàËÆ
    Network-functions£º°üº¬ÆäËûµÄÍøÂç½Å±¾ËùʹÓõļ¤»îÍø¿¨¡¢½ûÖ¹Íø¿¨µÈ¹¦ÄÜ
    Ifup-* and ifdown-*£ºÓÃÓÚ¼¤»î»òÕß½ûÖ¹Ïà¹ØµÄЭÒé
    Ifup eth0£º¼¤»îeth0
    Ifdown eth0:½ûÖ¹eth0
    Ifconfig:Ö÷ÒªµÄÍøÂçÅäÖÃÃüÁî
    2¡¢ ifconfig Ó÷¨½éÉÜ
    ifconfig:ÏÔʾµ±Ç°µÄÍøÂçÅäÖÃ
    ifconfig eth0 192.168.0.1 netmask 255.255.255.0 ÉèÖÃipµØ
    Ö·ºÍ×ÓÍøÑÚÂë¡£¸ÃÃüÁîÖ»ÔÚµ±Ç°ÉúЧ
    ifconfig eth0 down£º½ûÓÃÍø¿¨eth0
    ifconfig eth0 up£º¼¤»îÍø¿¨eth0
    3¡¢netstat -r£ºÏÔʾµ±Ç°µÄ·Óɱí
    µÚÆß½Ú »ù±¾Æô¶¯¹ý³Ì
    Àí½âϵͳµÄÆô¶¯¼°¹Ø±Õ¹ý³Ì½«¶ÔÄãµÄϵͳ¹ÜÀí¹¤×÷´øÀ´¼«´óµÄÒæ´¦¡£RedhatʹÓõÄÆô¶¯¹ý³Ì³Æ֮Ϊ£ºSystem V init¡£Ò»µ©Äں˱»×°ÔØ£¬ËüÆô¶¯Ò»¸ö³ÌÐò£ºinit£¬ÓÉinitÀ´Æô¶¯ÆäÓàËùÓеÄÏà¹Ø³ÌÐò¡£ÎÒÃǽ«¶ÔlinuxÈçºÎ½«×Ô¼ºÒýµ¼ÎªÒ»¸ö¿ÉÓõÄϵͳÓÐÒ»¸ö´óÖµÄÁ˽⡣RedhatÌṩÁ½¸ö¹¤¾ßÀ´¹ÜÀíËæϵͳÆô¶¯·þÎñ£ºredhat-config-services(ͼÐλ¯¹¤¾ß)¡¢chkconfig(ÃüÁîÐй¤¾ß)¡£Ê×ÏÈÎÒÃÇÒªÁ˽âredhat runlevels¡£
    1¡¢runlevel 0 :¹Ø±Õϵͳ
    2¡¢runlevel 1: µ¥Óû§Ä£Ê½£¬ÓÃÓÚ¶Ôϵͳ½øÐÐά»¤
    3¡¢runlevel 2: ¶àÓû§Ä£Ê½£¬µ«²»ÄÜʹÓÃÍøÂç
    4¡¢runlevel 3: ¶àÓû§Ä£Ê½£¬¾ßÓÐÍøÂ繦ÄÜ
    5¡¢runlevel 4: δʹÓÃ
    6¡¢runlevel 5: ÖØÐÂÆô¶¯
    ϵͳÆô¶¯¹ý³Ì£º¼ÆËã»úͨµçÒÔºóÓÉbios»á¼ì²éÄãµÄϵͳѰÕÒÒýµ¼×°ÔسÌÐò£¨grub¡¢lilo£©¡£È»ºóÔÙÓÉÒýµ¼×°ÔسÌÐòÑ°ÕÒlinuxÄںˡ£ÕâÑù¾Í¿ªÊ¼°²×°ÄãÅäÖúõķþÎñ¡£ÄÚºË×ÜÊÇͨ¹ýµ÷ÓÃinitÀ´Æô¶¯¡£Init½ø³ÌÁ¢¿ÌÔËÐÐ/etc/rc.d/rc.sysinit,ÓÉÆäÖ´ÐÐһϵÁеÄÈÎÎñ£¬ÀýÈçÍøÂçÅäÖᢼüÅÌÓ³Éä¡¢·ÖÇø¹Ò½ÓµÈµÈ¡£Init½ø³Ìͨ¹ý²é¿´/etc/inittabÀ´¾ö¶¨½«ÏµÍ³Òýµ¼ÖÁÄĸöÔËÐ춱ð¡£/etc/inittabÖÐÓÐÀàËÆÕâÑùµÄÒ»ÐУºid:5:initdefault£ºÆäÖÐÊý×Ö5´ú±íϵͳµÄĬÈϼ¶±ðΪrunlevel 5,ͨ¹ý¼òµ¥µÄ¸ü¸ÄÕâÀïµÄÊý×Ö¼´¿É¸Ä±äϵͳÆô¶¯Ê±×Ô¶¯ÔËÐеļ¶±ð¡£
    /etc/rc.d/Ŀ¼Öаüº¬ÈçÏÂ×ÓĿ¼£º
    init.d¡¢rc0.d¡¢rc1.d¡¢rc2.d¡¢rc3.d¡¢rc4.d¡¢rc5.d¡¢rc6.d
    ³ýinit.dÖ®ÍâµÄÿһ¸öĿ¼¶¼¶ÔÓ¦Ò»¸öÔËÐ춱ð£¬ÆäÖаüº¬¸ÃÔËÐ춱ðÆô¶¯ºÍ¹Ø±ÕµÄ·þÎñ£¬±êÓÐkµÄ·þÎñÊǸÃÔËÐ춱ðĬÈϹرյķþÎñ£¬±êÓÐsµÄ·þÎñΪ¸ÃÔËÐ춱ðĬÈÏÆô¶¯µÄ·þÎñ¡£
    /etc/rc.d/init.dĿ¼°üº¬ËùÓзþÎñµÄÆô¶¯½Å±¾£¬ÊÖ¹¤Æô¶¯Ò»¸ö·þÎñ¼´¿ÉÔÚ¸ÃĿ¼ÏÂÖ´ÐУ¬Àý£º/etc/rc.d/init.d/smb stop
    µÚ°Ë½Ú ÐéÄâ¿ØÖÆ̨
    linux×÷Ϊ¶àÓû§²Ù×÷ϵͳ£¬Äã¿ÉÒÔʹÓÃÏàͬµÄÉí·ÝͬʱµÈ¼µ½²»Í¬µÄÖնˡ£Ê¹ÓÃALT+¹¦ÄܼüÔÚ²»Í¬µÄÖն˴°¿ÚÖ®¼ä½øÐÐÇл»¡£Àý£ºÇл»µ½ÖÕ¶Ë2£ºALT+F2¡£ÔÚͼÐνçÃæÏÂÇл»Ê¹Óãºctrl+alt+¹¦Äܼü
    ÐéÄâ¿ØÖÆ̨ÔÚ/etc/inittabÎļþÖÐÅäÖ㬿ÉÒÔ¿´µ½ÓÐÈçÏÂÐУº
    1:2345:respawn:/sbin/mingetty tty1
    2:2345:respawn:/sbin/mingetty tty2
    3:2345:respawn:/sbin/mingetty tty3
    4:2345:respawn:/sbin/mingetty tty4
    5:2345:respawn:/sbin/mingetty tty5
    6:2345:respawn:/sbin/mingetty tty6
    ¸ù¾Ý¹Ù·½µÄ˵·¨£¬×î¶àÖ»ÓÐ6¸öÖնˣ¬Êµ¼ÊÊÔÑéµÄ½á¹ûÊÇÔÚÕâÀïÐÞ¸ÄÅäÖÃÎļþÌí¼ÓÖÕ¶ËÊýÁ¿ÒÔºó£¬ÖØÐÂÆô¶¯¡£Öն˵ÄÊýÁ¿Ôö¼ÓÁË£¬µ«ÊÇ¿ÉÓõÄÈÔȻֻÓÐ6¸ö
    µÚ¾Å½Ú ÆäËûÅäÖù¤¾ß
    1¡¢ clock:ÏÔʾµ±Ç°µÄϵͳʱ¼äÉèÖÃ
    2¡¢ redhat-config-date£ºÍ¼Ðλ¯µÄʱ¼äÅäÖù¤¾ß
    3¡¢ redhat-config-keyboard£ºÍ¼Ðλ¯µÄ¼üÅÌÅäÖù¤¾ß
    4¡¢ redhat-config-mouse£ºÍ¼Ðλ¯µÄÊó±êÅäÖù¤¾ß
    5¡¢ redhat-config-services£ºÍ¼Ðλ¯µÄ·þÎñÅäÖù¤¾ß£¬¾ö¶¨ÄÄЩ·þÎñËêϵͳÆô¶¯
    6¡¢ redhat-config-network£ºÍ¼Ðλ¯µÄÍøÂçÅäÖù¤¾ß
    7¡¢ chkconfig£ºÈ·¶¨Ä³·þÎñĬÈÏÔÚÄĸö¼¶±ðÔËÐÐ









    µÚËÄÕ Äںˡ¢Óû§¹ÜÀíºÍÈÎÎñ×Ô¶¯»¯
    µÚÒ»½Ú shellÅäÖÃÎļþ
    1¡¢ËùÓеÄshellÅäÖÃÎļþ¶¼±£´æÔÚ/etcĿ¼ÖУ¬°üÀ¨£ºbashrc¡¢profileÒÔ¼°/etc/profileĿ¼ÖеĽű¾Îļþ¡£¼ò½éÈçÏ£º
    /etc/bashrc£ºÉ趨±ðÃûºÍһЩÆäËüµÄ¹¦ÄÜ£¬Äã¿ÉÒÔʹÓÃÎı¾±à¼­Æ÷À´²é¿´¸ÃÎļþ£¬¸ÃÎļþÉ趨ÁËumaskµÄÊýÖµ¸Ã²ÎÊý¾ö¶¨ÁËд´½¨µÄÎļþµÄĬÈÏȨÏÞ£¬ÁíÍ⻹É趨ÁËÃüÁîÐÐϵÄÌáʾ·û¡£
    /etc/profile£ºÓÃÓÚÉ趨ϵͳ»·¾³£¬É趨PATH¡¢USER¡¢
    LOGINNAME¡¢MAIL¡¢HOSTNAME¡¢HISTSIZEÒÔ¼°INPUTRC±äÁ¿¡£ÒÔ¼°×îºóÔËÐÐ/etc/profile.dĿ¼ÖеĽű¾Îļþ¡£
    /etc/profile.d£ºÒ»¸ö°üº¬Èô¸ÉÓÃÓÚbash shell½Å±¾ÎļþµÄĿ¼£¬ÕâЩ½Å±¾ÎļþÓÉ/etc/profileÆô¶¯ÔËÐС£
    µÚ¶þ½Ú ʵÏÖ´ÅÅÌÅä¶î
    1¡¢ ²é¿´µ±Ç°µÄÄÚºËÊÇ·ñÖ§³Ö´ÅÅÌÅä¶î£º
    #grep CONFIG_QUOTA /boot/config-2.4.21-4.EL
    Èç¹ûÊä³öµÄÄÚÈÝÈçÏÂÔòÄÚºËÖ§³Ö´ÅÅÌÅä¶î£º
    CONFIG_QUOTA=y
    Èç¹ûÄã¿´µ½µÄÊä³öÈçÏÂ,ÔòÄãÐèÒª×ÔÐбàÒëÄںˣº
    CONFIG_QUOTA=n
    2¡¢ ²é¿´Ïà¹ØÈí¼þ°üÊÇ·ñÒÑ°²×°£º
    rpm -q quota
    3¡¢ ¾ÙÀý˵Ã÷´ÅÅÌÅä¶îµÄʵÏÖ·½·¨£º
    #useradd linux Ôö¼ÓÓû§linux
    #passwd linux ÐÞ¸ÄÓû§linuxµÄÃÜÂë
    #mkdir /www/linux ½¨Á¢ÐÂÎļþ¼Ð
    #chown linux.linux /www/linux ¸ü¸ÄÎļþ¼ÐµÄÊôÖ÷
    #vi /etc/fstab Ôö¼ÓÈçÏÂÐУº
    /dev/hda7 /www ext3 defaults,usrquota 0 0
    #mkfs -t ext3 /dev/sdb1 ¸ñʽ»¯·ÖÇø
    #quotacheck -cu /www Éú³Éaquota.user Îļþ
    #quotacheck -vu /www Éú³ÉÏà¹ØµÄÐÅÏ¢
    #repquota -au ÏÔʾËùÓеĴÅÅÌÅä¶îÐÅÏ¢
    #edquota -u linux ¶ÔÓû§linuxÉèÖÃÅä¶î
    #edquota -t ÉèÖÿíÏÞÆÚ
    #edquotaon /www ¿ªÆô/wwwĿ¼ÉϵĴÅÅÌÅä¶î
    µÚÈý½Ú Äں˻ù´¡ÖªÊ¶
    ÄÚºËÊÇÕû¸ö²Ù×÷ϵͳµÄºËÐIJ¿·Ö¡£Ëü¹ÜÀíÓ²¼þÖ®¼äµÄͨѶ£¬¾ö¶¨Äĸö½ø³ÌÔËÐУ¬Ìṩÿһ¸ö½ø³ÌÔËÐÐËùÐèµÄÏà¶Ô¸ôÀëµÄÐéÄâµÄµØÖ·¿Õ¼ä¡£ÄÚºËÓÉÒýµ¼³ÌÐò£¨grub¡¢lilo£©×°Èëϵͳ¡£Äں˸ºÔð½«Çý¶¯³ÌÐò£¬Ä£¿é×°Èëϵͳ¡£×ÔÐбàÒëÄÚºËÒÔºó¿ÉÒÔ´øÀ´ÒÔÏ·½ÃæµÄºÃ´¦£º
    ¼«´óµÄÌá¸ßºËÐÄ·þÎñµÄÔËÐÐËÙ¶È
    ÌṩÓû§·þÖ¸¶¨µÄ·þÎñµÄÄÚºËÖ±½ÓÖ§³Ö
    ¶ÔÊʵ±µÄ·þÎñÒÔÄ£¿é»¯µÄÐÎʽ¶¯Ì¬Ö§³Ö
    ͨ¹ý¼õÉÙ²»±ØÒªµÄ·þÎñ¿ÉÒÔ½µµÍÄں˵ÄÄÚ´æÐèÇó
    ÅäÖÃÖ§³Ö¸ß¶ËÓ²¼þ£¬ÀýÈç´óÓÚ4GµÄÄڴ棬ӲÅÌÕóÁУ¬¶Ô³Æʽ¶àcpu
    ±àÒëÄں˵Ľ¨Ò飺 Ö»ÓÐÔÚÐèÒªµÄʱºò²Å±àÒëÄںˣ¬Ö±½Ó±àÒë½øÄں˵Ä
    ¶«Î÷Ô½ÉÙϵͳÔËÐÐÔ½¿ì¡£Èç¹ûÄã²»ÐèÒªÉù¿¨£¬Äã¿ÉÒÔ´ÓÄÚºËÒƳý¶ÔÉù¿¨µÄÖ§³Ö¡£Í¨¹ýÒƳýÄã²»ÐèÒªµÄÉ豸£¬Äã¿ÉÒÔ×öµ½¼õСÄÚºË,ÔÚ²»¸Ä±äÉ豸µÄÇé¿öÏÂÌá¸ßϵͳÔËÐеÄËٶȡ£ÎªÆäËüµÄÓ²¼þÁôϸü¶àµÄ¿ÉÓÃ×ÊÔ´¡£
    ×ÜÌå¶øÑÔ½«¸÷ÖÖÓ²¼þµÄÉ豸µÄÇý¶¯×÷Ϊģ¿é¶¯Ì¬µÄ¼ÓÔغÍжÔØÊÇÒ»¸ö
    ½ÏºÃµÄ°ì·¨¡£Ä£¿éÊÇÄں˵ÄÀ©Õ¹£¬ËäȻûÓÐÖ±½Ó±àÒë½øÄںˣ¬µ«ÊÇ¿ÉÒÔ
    ËæÐèÒª¼ÓÔغÍжÔØ¡£
    Äں˸ÅÄ
    ¶ÔÓÚϵͳ¹ÜÀíÔ±¶øÑÔ£¬¶ÔϵͳµÄÄÚºËÓ¦¸ÃÓÐÒ»¶¨µÄÁ˽⣬ÕâÑù²ÅÄܸüºÃµÄ±àÒëÄںˡ£
    µ¥ÄÚºËÓëÄ£¿é»¯ÄÚºË
    µ¥ÄںˣºËùÓеÄÉ豸ģ¿éÖ±½Ó±àÒë½øÄÚºË
    Ä£¿é»¯ÄںˣºÐí¶àÉ豸ÒÑÄ£¿éµÄÐÎʽµ¥¶À¼ÓÔØ
    µ¥ÄÚºËÓëÉ豸µÄͨѶËٶȿ죬ģ¿é»¯ÄÚºËÓëÓ²¼þͨÐÅҪͨ¹ýÄ£¿é
    ÁÐ±í£¬²»ÐеÄÊǵ¥Äں˹ýÓÚÅÓ´ó¡£´óÄں˼õÉÙÁË¿ÉÓõÄÄÚ´æ¡£ÓÐ
    ЩϵͳÉõÖÁ²»ÄÜÆô¶¯ÕâÑù´óµÄÄںˡ£Linux¹ýȥʹÓõ¥Äںˣ¬linux
    Ò»¶ÈÔÚ×°ÔØÄ£¿é»¯Äں˵ÄʱºòÓÉÓÚijЩӲ¼þ¶ø²úÉúÎÊÌ⡣ʹÓõ¥
    ÄÚºËÔòϵͳ°²×°Íê³ÉÖ®ºóËùÓеÄÇý¶¯³ÌÐò¾ÍÒѾ­×°ºÃÁË¡£Ä£¿é»¯
    ÄÚºËÓм«´óµÄÁé»îÐÔ¡£Äã¿ÉÒÔ½«¼¸ºõËùÓеÄÇý¶¯³ÌÐò×÷Ϊģ¿é±à
    Ò룬ÕâÑùÔÚ±ØÒªµÄʱºòÕâЩģ¿é¾Í»á±»ÔØÈëϵͳ¡£Ä£¿é»¯Ê¹µÃÄÚ
    ºËÊ®·ÖµÄС£¬Õâ¾Í¼õÉÙÁËÆô¶¯ËùÐèÒªµÄʱ¼äÌá¸ßÁËϵͳÕûÌåÐÔÄÜ¡£
    Èç¹ûlinux×°ÔØÄ£¿éµÄʱºò²úÉúÎÊÌ⣬Äã¿ÉÒÔʹÓÃmodprobe»òÕß
    insmodÃüÁîÀ´ÊÖ¶¯×°ÔØÄ£¿é¡£
    Éý¼¶ÄںˣºÉý¼¶Äںϲ¢²»Ïñ¿´ÆðÀ´µÄÄÇôÄÑ¡£ÄãÓ¦¸Ã×ÜÊDZ£Áô¾ÃµÄÄںˣ¬ÒÔÃâÓÉÓÚÐÂÄں˵ĴíÎó¶øµ¼ÖÂϵͳÎÞ·¨Òýµ¼¡£¶Ôgrub»òÕßlilo¶øÑÔеÄÄں˾ÍÊÇÒ»¸öеIJÙ×÷ϵͳ¡£Èç¹ûʹÓÃrpm°ü°²×°ÁËеÄÄںˣ¬Òýµ¼³ÌÐòÒ²×Ô¶¯±»Éý¼¶¡£Èç¹ûÄã·¸ÁËÒ»¸ö±È½Ï´óµÄ´íÎ󣬵¼ÖÂÎÞ·¨Òýµ¼£¬Äã¿ÉÒÔÔÚÖØÐÂÆô¶¯ºóÑ¡ÔñʹÓþɵÄÄںˡ£ÄãÓ¦¸Ã±£´æÄÚºËÅäÖÃÎļþÕâÑùÄã¾Í¿ÉÒÔÇáËɵĽ«Æ俽±´µ½ÐµÄÄں˼ÌÐøʹÓá£ÏêÇéºóÐø²¿·Ö½«Ïêϸ½éÉÜ¡£
    /bootĿ¼£º linuxµÄÄں˴洢ÔÚÕâ¸öĿ¼ÀеÄÄÚºËÒ²±ØÐë´æ·ÅÓÚÕâ¸öĿ¼£¬²ÅÄܹ»Ê¹Ó᣸ÃĿ¼µÄĪÈË´óСʱ100M,×ã¹»´æ´¢µ±Ç°µÄÄÚºËÒÔ¼°Éý¼¶Äں˵ÄʱºòµÄ¸½¼ÓÄںˡ£
    /proc Ŀ¼£ºÕâ¸öĿ¼»ùÓÚÒ»¸öÐéÄâµÄÎļþϵͳ¡£»»¾ä»°ËµËý²»°üº¬Èκδ洢ÔÚÓ²ÅÌÉϵÄÎļþ£¬µ«ËüÊDz鿴¼ÆËã»úµÄÒ»¸ö´°¿Ú¡£Èç¹ûÄãÒª²é¿´µ±Ç°µÄÄÚ´æÐÅϢʹÓøÃÃüÁcat /proc/meminfo
    Ip forwarding£º²é¿´µ±Ç°×´Ì¬£ºcat /proc/sys/net/ipv4/ip_forward,ÈôÊä³öΪ
    1£¬Ôò¸Ã¹¦ÄÜÒÑ¿ªÆô£¬ÈôΪ0£¬Ôò먦Æô¡£
    ¿ªÆôip forward£ºecho 1 >;>; /proc/sys/net/ipv4/ip_forward
    ×èÖ¹ping of death¹¥»÷£º#echo 1 >;>; /proc/sys/net/ipv4/tcp_syncookies
    Àí½âÄÚºËÄ£¿é£º
    µ±Äã±àÒëÄں˵Äʱºò£¬Äã¿ÉÒÔ½«ËùÓеÄÐèÒªµÄÇý¶¯³ÌÐò±àÒë³É½øÄںˣ¬³ÉΪһ¸öµ¥Äںˡ£µ«ÊÇÕâÑùµÄÄÚºËÌ«´óÁË£¬²¢ÇÒÐèÒªºÜ³¤µÄʱ¼ä¼ÓÔØ¡£´ó¶àÊýµÄϵͳ¹ÜÀíԱʹÓÃÄÚºËÄ£¿é¡£ÄÚºËÄ£¿é²¢²»Ö±½Ó±àÒë½øÄںˣ¬¶øÊǸù¾ÝÐèÒª¶¯Ì¬µÄ½øÐмÓÔغÍжÔØ¡£Èç¹ûºÍÄÚºËÄ£¿éÏà¹ØµÄÓ²¼þ³ýÁËÎÊÌ⣬Äã¿ÉÒÔʹÓÃkudzu¡£ÕâÊÇÒ»¸ö×Ô¶¯¼ì²âºÍÅäÖù¤¾ß£¬Ò»°ãÔÚϵͳÆô¶¯µÄʱºò×Ô¶¯ÔËÐУ¬µ±È»ÁËÄãÒ²¿ÉÒÔÊÖ¹¤ÔËÐÐÕâ¸ö¹¤¾ßÀ´Åųý¹ÊÕÏ¡£KmodÊÇÄ£¿é¼ÓÔØ¿ØÖÆÆ÷£¬¸ºÔðÄÚºËÄ£¿éµÄ¼ÓÔغÍжÔØ¡£Ö¸¶¨ÌرðµÄÑ¡ÏéºÍ²ÎÊý¿ÉÒÔÐÞ¸Ä/etc/modules.confÎļþ¡£´ó¶àÊýµÄÓ²¼þ¶¼¿ÉÒÔ×Ô¶¯¼ì²âµ½£¬¶ÔÓÚδʶ±ðµ½µÄÓ²¼þ¿ÉÒÔÖ´ÐУºdepmod -a
    ÊÖ¹¤¼ÓÔØÄ£¿éʹÓãºmodprobeÀý£º#modprobe pcnet32
    ²é¿´µ±Ç°¼ÓÔصÄÄ£¿é£º#cat /proc/modules»òÕß#lsmod
    жÔØÄ£¿é£ºrmmod -r pcnet32
    µÚËÄ½Ú Éý¼¶ÄÚºË
    1¡¢¹ØÓÚÄں˰汾 Äں˰汾ºÅµÄÐÎʽһ°ã¶¼ÊÇÕâÑùµÄ£ºx.x.xÀýÈ磺2.4.21
    µÚÒ»¸öÊý×Ö±íʾÖ÷°æ±¾ºÅ£¬µÚ¶þ¸öÊý×Ö±íʾ¸¨Öú°æ±¾ºÅ£¬µÚÈý¸öºÅÂë´ú±ípatchµÄºÅÂë¡£Ö÷°æ±¾ºÅµÄ±ä¸üÍùÍùÒâζןܴóµÄ¸Ä±ä£¬¿ÉÄÜ»áÓкܶà³ÌÐò²»Äܹ»ÔÚеÄÄÚºËÉÏʹÓ᣸¨Öú°æ±¾ºÅÓÐÁ½¸öº¬Ò壺µÚÒ»Ö÷°æ±¾Äں˵ĵÚx¸ö°æ±¾£¬µÚ¶þxÈôΪÆæÊýÔò±íʾ¸Ã°æ±¾ÎªÕýÔÚ¿ª·¢Öеİ汾£¬²»ÊʺÏÉú²úʹÓã¬ÈôΪżÊýÔò±íʾ¸Ã°æ±¾ÎªÎȶ¨µÄ¿É¿¿°æ±¾£¬¿ÉÒÔÓÃÓÚÉú²ú¡£×îºóÒ»¸öºÅÂë´ú±ípatch¼´²¹¶¡µÄ°æ±¾ºÅ¡£
    2¡¢Éý¼¶ÄÚºË ÐµÄÄÚºËÍùÍù»á°üº¬×Åеļ¼Êõ£¬Òâζ×Åϵͳ¿ÉÒÔÖ§³Ö¸ü¶àµÄÉ豸£¬Ò²ÒâζןüºÃµÄÎȶ¨ÐԺ͸ü¿ìµÄÐÔÄÜ¡£ËùÒÔϵͳ¹ÜÀíÔ±¿ÉÄÜ»áÐèÒª¶ÔÄں˽øÐÐÉý¼¶¡£Éý¼¶ÄÚºËÖ÷ÒªÓÐÁ½ÖÖ·½Ê½£º
    1¡¢ rpm°üÉý¼¶·½Ê½ ´ÓÍøÉÏÏÂÔØÒѾ­±àÒëºÃµÄrpmÄÚºËÈí¼þ
    °ü£¬È»ºó½øÐа²×°£¬Àý£ºrpm -ivh kernel-2.4.21-8.i386.rpm
    2¡¢ ʹÓÃÄں˵ÄÔ´Âë°ü±àÒë°²×°¡£ Õⲿ·Ö½ÏΪ¸´ÔÓ£¬ÔÚºóÐøÕÂ
    ½Ú½øÐÐÏêϸÂÛÊö£¬´Ë´¦ÂÔ¹ý¡£
    3¡¢Äں˲¹¶¡ ΪÁËʹÄãµÄϵͳÔËÐеĸü¼ÓµÄÎȶ¨¡¢¸ßЧ£¬Äã¿ÉÄܾ­³£Òª¸øÄãµÄϵͳ´ò²¹¶¡£¬ÀýÈç´Ó2.4.20µ½2.4.21¡£Äں˲¹¶¡¿ÉÒÔºÜÈÝÒ׵ĴÓÍøÉÏÏÂÔص½¡£°²×°Ò²ºÜÈÝÒ×£¬Àý£º
    #zcat pathch-2.4.22.gz | patch -p0
    3¡¢ ÖÆ×÷Òýµ¼ÅÌ
    #mkbootdisk ¡°µ±Ç°Äں˵İ汾ºÅ¡±
    Àý£ºmkbootdisk 2.4.20
    #dd if=/mnt/cdrom/images/bootnet.img of=/dev/fd0
    ´Ó¹âÅÌ´´½¨°²×°Òýµ¼ÅÌ
    4¡¢ ÄÚºË×ÊÔ´
    linuxµÄÓŵãÖ®Ò»ÊÇÄã¿ÉÒÔ¸ñ¾ÖÄãµÄÐèÒª¶ÔÄÚºË×Ô
    ÓɽøÐвüõ±àÒ룬ʹ֮·ûºÏ×Ô¼ºµÄÐèÒª¡£Òª±àÒëÄں˾ÍÒªÏÈÁ˽âlinuxµÄÔ´´úÂë¡£Ò»µ©°²×°ÁËÔ´Âë°ü£¬Äã¾Í»áÔÚ/usr/srcĿ¼Öп´µ½ÈçÏÂ×ÓĿ¼£ºdebug¡¢redhat¡¢linux-2.4¡¢linux-2.4.21-4.EL¡£linux-2.4ÊÇlinux-2.4.21-4.ELµÄ·ûºÅÁ´½ÓÎļþ¡£°²×°ÄÚºËÔ´Âë°üʹÓÃÈçÏÂÃüÁî
    #mount /mnt/cdrom
    #rpm -Uvh /mnt/cdrom/RedHat/RPMS/kernel-source-*
    »òÕßÄã¿ÉÒÔÏÂÔØlinux tar file£¬¼´ÒÔtar.gzµÄÐÎʽ·¢ÐеÄÔ´Âë°ü¡£
    4¡¢ ÖØбàÒëÄÚºË
    ½«ÏÂÔغõÄÄں˽âѹËõµ½£º/usr/src/Ŀ¼ÏÂ
    #cd /usr/src/ ½øÈë¸ÃĿ¼
    #ln linux-2.4.26 linux-2.4 ´´½¨¸ÃĿ¼µÄ·ûºÅÁ´½ÓÎļþ
    #cd linux-2.4 ½øÈëÄÚºËĿ¼
    ÐÞ¸ÄMakefileÎļþ£¬ÕÒµ½°üº¬EXTAVERSIONµÄÐн«Æä¸ÄΪEXTRAVERSION=qun
    #make mrproper È·±£Ô´ÎļþµÄÒ»ÖÂÐÔ
    #make xconfig Ñ¡ÔñÐèÒª±àÒë½øÄں˵ŦÄÜ
    #make dep ½â¾öÒÀÀµÐÔ
    #make bzImage Éú³ÉÄÚºË
    #make modules ±àÒëÄÚºËÄ£¿é
    #cp usr/src/linux-2.4/arch/i386/boot/bzImage /boot/vmlinuz-2.4.26qun
    #make modules_install °²×°ÄÚºËÄ£¿é
    #mkinitrd /boot/initrd-2.4.26qun.img 2.4.26qun Éú³ÉÆô¶¯¾µÏñÎļþ
    # cp /usr/src/linux-2.4/System.map /boot/System.map-2.4.26qun
    #vi /etc/grub.conf # ÔÚ×îºó²¿·ÖÌí¼ÓÈçÏÂÐУº
    title Red Hat Linux (2.4.26qun)
    kernel /vmlinuz-2.4.26qun ro root=LABEL=/
    initrd /initrd-2.4.26qun.img
    :wq!
    #reboot ÖØÐÂÆô¶¯ºó¾Í¿ÉÒÔ¿´µ½¸Õ¸Õ°²×°ºÃµÄÄÚºËÁË¡£
    #¶ÔÓÚ2.6µÄÄں˶øÑÔ£¬²½Öè¾Í¼òµ¥Á˺ܶàÖ»ÐèÒªÕ⼸¸öÃüÁ
    make xconfig¡¢make¡¢make install
    µÚÎå½Ú ÈÎÎñ×Ô¶¯»¯
    linuxÏÂʵÏÖÈÎÎñ×Ô¶¯»¯µÄ¹¤¾ßÖ÷ÒªÓÐÁ½¸ö:cron¡¢at,
    cronµÄÊØ»¤½ø³ÌÊÇcrond£¬ÔÚĬÈϵÄÇé¿öÏ£¬Ëüÿ·ÖÖÓ¶¼¼ì²éһϵÁеÄĿ¼£¬Èç¹ûÓÐÉ趨µÄ³ÌÐò¾Í»áÔÚÖ¸¶¨µÄʱ¼äÄÚ½«ÆäÆô¶¯¡£Óû§µÄcronÉèÖÃλÓÚ£º/var/spool/cronĿ¼£¬¼ÆËã»úµÄµ÷¶ÈÈÎÎñλÓÚ£º/etc/crontabºÍ/etc/cron.dĿ¼¡£Ö»Óõ±ÐèÒªÔËÐгÌÐòµÄʱºò£¬cronÊØ»¤½ø³Ì²Å»áÆô¶¯¡£
    CronµÄÅäÖ÷½·¨ÈçÏ£º
    Crontab -u username -e,Àý£º
    Crontab -u root -e ¶ÔÓû§root½øÐÐÉèÖÃ
    ÉèÖõľßÌå¸ñʽÈçÏ£º
    minute, hour, day of month, month, day of week, command
    * * * * * command
    Àý£ºcrontab -u root -e
    30 23 * * * * reboot
    É趨ÿÍí23£º30ÖØÐÂÆô¶¯¼ÆËã»ú
    ²é¿´cronÉèÖãºcrontab -lÀý£ºcrontab -l -u zhao²é¿´Óû§zhaoµÄÉèÖÃ
    crontab ²ÎÊý½éÉÜ£º
    -e£º±à¼­ÉèÖÃ
    -u£ºÖ¸¶¨Óû§
    -r£ºÉ¾³ýÉèÖÃ
    -u£ºÁгöµ±Ç°ÉèÖÃ
    ʹÓÃatʵÏÖÈÎÎñ×Ô¶¯»¯£ºÀàËÆÓÚcron£¬atÒ²¿ÉÒÔʵÏÖÈÎÎñ×Ô¶¯ÔÚÖ¸¶¨µÄʱ¼äÖ´ÐУ¬²»Í¬Ö®´¦ÔÚÓÚcronÈÎÎñÊǶà´ÎÑ­»··´¸´Ö´Ðеģ¬¶øatÈÎÎñÊÇÒ»´ÎÐԵģ¬Ö´ÐÐÒ»´ÎÖ®ºó¾Í²»ÔÙÉúЧÁË¡£É趨atÈÎÎñµÄ·½·¨ÈçÏ£º
    #at now + 1 hour
    at>; reboot
    at>;ctrl+D É趨һ¸öСʱ֮ºóÖØÐÂÒýµ¼ÏµÍ³
    ²é¿´atÈÎÎñ£ºatq Àý£º#atq
    1 2004-11-01 00:53 a root
    2 2004-11-01 01:53 a root
    ³ýÈÎÎñ£ºatrm Àý£ºÉ¾³ýµÚÒ»¸öÈÎÎñ£º#atrm 1
    ÔöÇ¿cron¡¢at°²È«ÐÔ£º
    ¿ÉÒÔͨ¹ýÕâÁ½¸öÎļþÀ´¶ÔÓû§½øÐÐȨÏ޵ĿØÖÆ£º/etc/cron.allow¡¢/etc/cron.deny¡£Èç¹ûÕâÁ½¸öÎļþ²»´æÔÚ£¬ÄÇôËùÓеÄÓû§¶¼¿ÉÒÔʹÓÃcront¡¢at¡£Èç¹ûÓÐ/etc/cron.allowÎļþ£¬Ôò¸ÃÎļþ²»°üº¬µÄÓû§½«²»ÄÜʹÓÃcron£¬Èç¹ûûÓÐ/etc/cron.allowÎļþ£¬ÔòÖ»ÓÐ/etc/cron.denyÎļþËù°üº¬µÄÓû§²»ÄÜ·ÃÎÊcron.
    µÚÎåÕÂ linuxÍøÂç·þÎñ
    µÚÒ»½Ú sambaÍøÂç¹²Ïí·þÎñ
    ¹²ÏíÎļþÊÇÍøÂçµÄÒ»ÏîÖØÒª·þÎñ£¬ÔÚlinuxÖÐʵÏÖÀàËƵŦÄÜÖ÷ÒªÓÐÁ½ÖÖ°ì·¨£ºsambaÎļþ¹²Ïí£¬NFSÎļþ¹²Ïí£¬±¾½ÚÖ÷Òª½²½âsambaµÄÍøÂç¹²Ïí·þÎñ¡£Ê¹ÓÃsamba·þÎñ¿ÉÒÔʵÏÖlinuxºÍunixÒÔ¼°windowsÖ®¼äµÄÍøÂçÎļþ¹²Ïí¡£²¢ÇÒʹÓÃsamba·þÎñ£¬linux»¹¿ÉÒÔ×÷ΪwindowsµÄ·þÎñÆ÷£¬Ö÷ÒªÓÐÈçϼ¸ÖÖ£º
    win9xµÄ¹¤×÷×é³ÉÔ±¡¢
    nt/2000/xp/2003µÄÓò³ÉÔ±¡¢
    ³ÉÔ±·þÎñÆ÷ÉõÖÁÊÇÓòÖ÷·þÎñÆ÷¡£
    ¹²ÏíÓû§µÄÖ÷Ŀ¼¡£
    ×÷Ϊwins·þÎñÆ÷
    ×÷ΪÖ÷ä¯ÀÀÆ÷
    Ìṩ¼¯ÖÐʽµÄÉí·ÝÑéÖ¤
    ÅäÖñ¾µØĿ¼×÷Ϊ¹²ÏíÎļþϵͳ
    Ö§³Ömicrosoft·ÃÎÊ¿ØÖÆÁбí
    1¡¢ sambaÓÐÁ½¸öÊØ»¤½ø³Ì£ºsmbd¡¢nmbdλÓÚ/usr/sbin
    2¡¢ Æô¶¯ºÍ¹Ø±Õsamba·þÎñ£º#service smb start¡¢
    #service smb stop
    3¡¢ ʹ֮ËæϵͳһͬÆô¶¯£º #chkconfig -level 35 smb on
    4¡¢samba¹²ÏíÎļþʵÀý£º
    Ä¿±ê£º¹²Ïí±¾»úÉϵÄ/home/zhao£¬Ê¹Óû§zhao£¬¿ÉÒÔͨ¹ýÍøÂç¶Áд£¬Óû§fang¿ÉÒÔ¶Á²»¿ÉÒÔд¡£
    ʵÏÖ²½Ö裺
    1¡¢#vi /etc/samba/smb.conf ±à¼­[global]£¬Ôö¼ÓÈçÏÂÐУº
    netbios name = kodadigital ÉèÖüÆËã»úµÄ¹²ÏíÃû
    workgroup = koda ÉèÖüÆËã»úµÄ¹¤×÷×é
    valid users = zhao ÉèÖÿÉÒÔ·ÃÎÊÕą̂¼ÆËã»úµÄÓû§
    2¡¢Ôö¼ÓÈçÏÂÐУº
    [zhao] ¹²ÏíÎļþ¼ÐµÄÃû×Ö
    comment = welcome ¶Ô¸Ã¹²ÏíÎļþ¼ÐµÄ×¢ÊÍ
    path = "/home/zhao" ¹²ÏíÎļþ¼ÐµÄ·¾¶
    admin users = root ¹ÜÀíÔ±Óû§£¬Êµ¼ÊÉϲ¢Ã»ÓÐȨÏÞ
    valid users = root,zhao,fang ¶Ô¸Ã¹²ÏíÎļþ¼ÐÓзÃÎÊȨÏÞµÄÓû§
    write list = root,zhao ¶Ô¸Ã¹²ÏíÎļþ¼ÐÓÐдȨÏÞµÄÓû§
    3¡¢½«Ä¬ÈϵÄ[homes] ÅäÖÃÎļþ¼°ÆäÑ¡ÏîÈ«²¿ÓÃ#×¢Ê͵ô
    4¡¢#/etc/rc.d/init.d/smb restart
    ˵Ã÷£ºÍ¨¹ýÍøÂç·ÃÎʵÄʱºòÊ×ÏÈҪͨ¹ýglobalÖÐÉ趨µÄvalidÓû§µÄÉí·ÝÑéÖ¤£¬È»ºó¸ù¾Ý·ÃÎʵÄÎļþ¼ÐµÄ²»Í¬£¬
    »¹ÒªÍ¨¹ý¸÷¹²ÏíÎļþ¼Ð¶¨ÒåµÄvalidÓû§Éí·ÝÑéÖ¤¡£
    µÚ¶þ½Ú web·þÎñ¼°ÐéÄâ·þÎñÆ÷(apache)
    ÔÚlinuxÖÐweb·þÎñÖ÷ÒªÒÀ¿¿apacheÀ´ÊµÏÖ¡£ApacheÊǵ±½ñÊÀ½çÉÏÓ¦ÓÃ×îΪ¹ã·º£¬×îΪ¿É¿¿µÄweb·þÎñÆ÷¡£LinuxµÄ¸÷ÖÖ·¢Ðа涼×Ô´øÓз¢ÐÐÐÎʱ×îаæµÄapache¡£ºóÐøµÄ²¿·Ö½«ÒÔÒ»¸öʵÀýÀ´½²½âÈçºÎÅäÖÃapache·þÎñÆ÷¡£
    1¡¢ ÈçºÎ°²×°Èí¼þ´ó¼ÒÓ¦¸Ã¶¼ÒѾ­ºÜÊìÁË£¬¾Í²»½²ÁË¡£
    2¡¢ #service httpd status ²é¿´µ±Ç°ÊÇ·ñÒÑÔËÐÐweb·þÎñ
    3¡¢ #service httpd start Æô¶¯web·þÎñ
    4¡¢ #ʹÓÃä¯ÀÀÆ÷ÔÚµØÖ·À¸Êähttp://127.0.0.1£¬Ó¦¸Ã¿ÉÒÔ
    ¿´µ½apacheµÄ²âÊÔÒ³Ãæ,Èç¹û¿´²»µ½²âÊÔÒ³ÃæʹÓøÃÃüÁiptables -F ¹Øµô·À»ðǽ
    5¡¢ #ÅäÖÃapache·þÎñÆ÷
    ²½Ö裺1¡¢°²×°Íê³Éºó£¬/etc/rc.d/init.d/httpd start, ¹Ø±Õ·À»ðǽ£¬Æô¶¯ä¯ÀÀÆ÷¼´¿É¿´µ½Ä¬ÈϵÄÒ³Ã棬±à¼­/var/www/html/index.html,ÖØÐÂÆô¶¯httpd·þÎñ£¬Ê¹ÉúЧ¡£
    2¡¢ÊµÏÖÓû§µÄ¸öÈËÖ÷Ò³
    #vi /etc/httpd/conf/httpd.conf ɾ³ýUserDir disable, È¥µô UserDir public_html ֮ǰµÄ#ºÅ£¬/etc/rc.d/init.d/httpd restart,ÖØÐÂÆô¶¯web·þÎñ,ÔÚä¯ÀÀÆ÷µØÖ·À¸ÊäÈë192.168.0.4/~zhao/£¬À´ÑéÖ¤¡£Ä¿±ê£ºÊµÏÖ»ù±¾µÄweb·þÎñ£¬Óû§webºÍ»ùÓÚÃû³Æ¡¢ipµØÖ·µÄÐéÄâÖ÷»ú·þÎñ

    3¡¢»ùÓÚÃû×ÖµÄÐéÄâÖ÷»ú£ºvi /etc/hosts,Ôö¼ÓÈçÏÂÐУº192.168.0.4 www.zhao.com zhao
    vi /etc/httpd/conf/httpd.conf ½«×îºóµÄ²¿·Ö¸ÄΪÈçÏ£º
    ;
    ServerAdmin webmaster@zhao.com
    DocumentRoot /var/www/zhao
    ServerName www.zhao.com
    ;
    ;
    ;
    *ʵÏÖ»ùÓÚÃû×ÖµÄÐéÄâÖ÷»úÐèҪʵÏÖÅäÖÃdns·þÎñÆ÷
    /etc/rc.d/init.d/network restart
    /etc/rc.d/init.d/httpd restart
    ´ò¿ªä¯ÀÀÆ÷ÔÚµØÖ·À¸ÊäÈëwww.zhao.com
    4¡¢»ùÓÚipµØÖ·µÄÐéÄâÖ÷»ú£º
    ifconfig eth0:0 192.168.0.5 netmask 255.255.255.0

    vi /etc/httpd/conf/httpd.conf£¬Ôö¼ÓÒÔϲ¿·Ö£º
    ;
    ServerAdmin webmaster@zhao.com
    DocumentRoot /var/www/hit
    ;
    /etc/rc.d/init.d/httpd restart
    ´ò¿ªä¯ÀÀÆ÷ÔÚµØÖ·À¸ÊäÈë:192.168.0.5
    µÚÈý½Ú ʵÏÖsquid´úÀí·þÎñÆ÷
    ¶ÔÓÚ´ó¶àÊýÆóÒµ¶øÑÔ´úÀí·þÎñÆ÷ÊDZز»¿ÉÉٵġ£ÔÚwindowsÊÀ½çÓи÷ÖÖÈí¼þÀ´ÊµÏÖ´úÀí·þÎñÆ÷µÄ¹¦ÄÜ£¬Èç:sygate¡¢wingate¡¢isaµÈµÈ£¬ÔÚlinuxÁìÓòÖÐÕâ¸ö¹¦ÄÜÓÉsquidÀ´ÊµÏÖ¡£SquidÊÇÒ»¿î¹¦ÄÜÇ¿´óµÄ´úÀí·þÎñÆ÷Èí¼þ£¬ÅàÖ²½ÏΪ¼ò½à£¬Ð§Âʷdz£µÄ¸ß¡£±¾½ÚÒÔÒ»¸öÊÀ¼ÍµÄÀý×ÓÀ´½²½âÈçºÎÒ»²½²½µÄÅäÖÃsquid´úÀí·þÎñÆ÷¡£
    1¡¢#vi /etc/squid.conf ±à¼­squidÅäÖÃÎļþ£¬Ôö¼ÓÈçÏÂÐУº
    http_port 8080 ½«´úÀí¶Ë¿ÚÉèΪ8080£¬Èç²»½øÐÐÉèÖÃÔòĬÈϵĴúÀí¶Ë¿ÚΪ£º3128
    cache_men 16 MB ÉèÖôúÀí·þÎñÆ÷µÄ¸ßËÙ»º´æ´óС
    cache_dir ufs /spool/squid 100 16 256 ÉèÖôúÀí·þÎñÆ÷µÄ½»»»¿Õ¼ä£¬/spool/squid±íʾ¸ßËÙ»º´æµÄλÖã¬100±íʾ¿Õ¼äΪ100M£¬16´ú±í16¸öĿ¼£¬256´ú±í¹²ÓÐ256¸ö¶þ¼¶Ä¿Â¼
    cache_access_log /var/log/squid/access.log »º´æ·ÃÎÊÈÕÖ¾
    cache_log /var/log/squid/cache.log »º´æÈÕÖ¾
    cache_store_log /var/log/squid/store.log »º´æ´æ´¢ÈÕÖ¾
    acl InternetAllow src 10.10.10.0 ½¨Á¢ÐµķÃÎÊ¿ØÖÆÁбí
    http_access allow InternetAllow ½¨Á¢ÐµĹæÔòÔÊÐíInternetAllowÁбíÖеÄÖ÷»úʹÓôúÀí·þÎñÆ÷
    2¡¢#wq! ±£´æÍ˳ö
    3¡¢#squid -z ½øÐгõʼ»¯
    4¡¢#service squid start Æô¶¯squid ´úÀí·þÎñ
    5¡¢ squidÉèÖÃÍê³É£¬ÏÖÔھͿÉÒÔʹÓÃÁË¡£
    µÚËÄ½Ú Ftp·þÎñ
    ftpÊÇ»¥ÁªÍøÉϺÜÆÕ±éµÄ·þÎñ£¬ÔÙredhatÖÐ×Ô´øµÄftpÈí¼þÊÇvsftp£¬¸ÃÈí¼þµÄÌصãÊÇÒ×ÓÚʹÓ㬰²È«ÐÔ¼«ºÃ¡£ÒÔÏÂÒ»¸öʵ¼ÊµÄÀý×ÓÀ´½²½âÈçºÎʵÏÖvsftp·þÎñÆ÷µÄÈ«¹ý³Ì¡£
    a) °²×°vsftpÈí¼þ£º°ÑµÚ¶þÕŹâÅ̷ŵ½¹âÇý£¬¹Ò½Óºó½øÈë/mnt/cdrom/RedHat/RPMSĿ¼£¬Ê¹ÓÃÃüÁrpm -ivh vsftd-1.2.0-4.i386.rpm
    b) #service vsftpd start Æô¶¯·þÎñ
    c) ³£ÓÃÅäÖÃÃüÁî:cd¡¢get¡¢mget¡¢put¡¢mput
    µÚÎå½Ú Óʼþ·þÎñÆ÷
    Óʼþ·þÎñÊÇ»¥ÁªÍøÉϵÄÒ»Ïî»ù±¾·þÎñ£¬¾ø´ó¶àÊý¾­³£ÉÏÍøµÄÍøÃñ¶¼ÓÐ×Ô¼ºµÄµç×ÓÐÅÏä,ÓÃÓÚÉÌÒµµÄµç×ÓÐÅÏäÒ²ÈÕÒæÆձ飬¶àÊý¹«Ë¾¶¼»áʹÓõç×ÓÓʼþÓë¿Í»§½øÐÐͨÐÅ¡¢½»Á÷¡£ºÜ¶àµÄʱºò¹«Ë¾ÄÚ²¿Ò²»áÓÐÄÚ²¿µÄµç×ÓÓʼþ·þÎñÆ÷£¬ÔÚ¹«Ë¾ÄÚ²¿Ìṩµç×ÓÓʼþ·þÎñ¡£ÔÚlinux/unixƽ̨֮ÉÏ×î³£Óõç×ÓÓʼþϵͳΪ£ºsendmail¡£¸Ãϵͳ¹¦ÄÜÇ¿´ó£¬ÔËÐÐÎȶ¨£¬¹ã·ºµÄÔËÐÐÓÚÊÀ½ç¸÷µØ£¬ÊÇinternetÉÏ×îΪÁ÷Ðеĵç×ÓÓʼþϵͳ¡£µ«ÊÇsendmailÓÐÒ»¸öȱµã¾ÍÊÇÄÑÓÚÅäÖã¬ÅàÖ²Îļþ·Ç³£ÄÑÒÔ¶Á¶®¡£±¾½ÚµÄÆäÓಿ·ÖÒ»¸öÒÔʵ¼ÊµÄÀý×ÓÀ´¶ÔsendmailµÄÅäÖÃÎļþ½øÐÐÐ޸ģ¬Ï£Íû´ó¼ÒÑϸñ°´ÕÕ±¾ÎĵIJ½ÖèÀ´½øÐвÙ×÷£¬ÒÔÈ·±£Äܹ»Ë³ÀûµÄÆô¶¯Óʼþ·þÎñ£º
    a) °²×°sendmailºÍbind
    b) ÅäÖÃDNS·þÎñÆ÷£º
    1¡¢#vi /etc/named.conf,Ìí¼ÓеÄÓò£ºtest.com
    zone "test.com" IN {
    type master;
    file "test.com.dns";
    allow-update { none; };
    };
    2¡¢touch /var/named/test.com.dns½¨Á¢ÏàÓ¦µÄÓòµÄÅäÖÃÎļþ£º
    $TTL 1d ĬÈϵÄÉú´æÖÜÆÚ
    @ 1d IN SOA ns.test.com. root.test.com. (
    1 ÆðʼÐòÁкÅ
    2d Ë¢ÐÂƵÂÊ
    1h ÖØÊÔƵÂÊ
    1w ʧЧʱ¼ä
    1h) ×î¶ÌTTL
    @ 1d IN NS ns.test.com. ÉèÖÃÓòÃû·þÎñÆ÷µØÖ·
    1d IN MX 10 mail.test.com. ÉèÖÃÓʼþ·þÎñÆ÷µØÖ·
    www IN A 192.168.0.10 ÉèÖÃÓòÃûºÍipµØÖ·µÄ¶ÔÓ¦¹Øϵ
    ns IN A 192.168.0.10
    mail IN A 192.168.0.10
    3¡¢±£´æÍ˳ö£¬service named restart ½«dnsÖ¸Ïò×Ô¼º
    4¡¢²âÊÔ£ºhost -l test.com
    c) ÐÞ¸ÄsendmailµÄÅäÖÃÎļþ£º
    1¡¢#vi /etc/mail/,ÐÞ¸ÄÈçÏÂÐУº
    o DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA
    ½«ÆäÖеÄ127.0.0.1¸ü¸ÄΪsendmail·þÎñÆ÷µÄµØÖ·192.168.0.1£¬È»ºó±£´æ¡£
    2¡¢#vi /etc/mail/access,Ôö¼ÓÈçÏÂÐУº
    test.com RELAY
    192.168.0 RELAY
    Ö´ÐÐÃüÁʹ֮ÉúЧ£º
    makemap -r hash /etc/mail/access.db < /etc/mail/access
    3¡¢# vi /etc/mail/local-host-names,Ìí¼ÓÔÊÐíÖм̵ÄÖ÷»ú
    mail.test.com¡£±£´æÍ˳ö
    d) ÖØÐÂÆô¶¯sendmail·þÎñ£º#service sendmail restart£¬ÏÖÔÚÄã¾Í¿ÉÒÔʹÓÃÕâ¸ösendmail·þÎñÆðÀ´ÊÕ·¢ÓʼþÀ²

    µÚÁù½Ú DNS·þÎñÆ÷
    Ëæ×ÅÍøÂçµÄ·¢Õ¹£¬ÔÚ¹«Ë¾ÄÚ²¿½¨Á¢×Ô¼ºµÄÓʼþ·þÎñÆ÷ÏÔµÃÔ½À´Ô½ÖØÒª£¬Ô½À´Ô½¶àµÄ·þÎñÒªÒÀÀµÓÚdns·þÎñ¡£Linux×Ô´øµÄÓʼþ·þÎñÆ÷ÊÇ£ºbind 9¡£ÒÔϲ¿·ÖÒÔÐÂÔötes.comÓòÃûΪÀý½²½âÅäÖÃdnsµÄ¹ý³Ì¡£
    1¡¢ °²×°
    2¡¢ #vi /etc/named.conf #Ð޸ĸÄÅäÖÃÎļþ£¬Ôö¼Ótest.comµÄÅäÖÃÐÅÏ¢
    zone ¡°tes.com¡± IN { #ÐÂÓòµÄÃû×Ö
    type master; #¸Ã·þÎñÆ÷µÄÀàÐÍ
    file ¡°tes.com.dns¡±; #¸ÃÓòµÄÅäÖÃÎļþ
    allow-update {none;}; #ÊÇ·ñÔÊÐí¶¯Ì¬¸üÐÂ
    };
    3¡¢#touch /var/named/test.com.dns #½¨Á¢test.comÓòµÄÅäÖÃÎļþ
    4¡¢# vi /var/named/test.com.dns #ÐÞ¸ÄÅäÖÃÎļþ£¬Ôö¼ÓÒÔÏÂÄÚÈÝ
    $TTL 1d
    @ 1d IN SOA ns.tes.com. root.test.com (
    1
    1d
    2d
    3d
    1h )
    @ 1d IN NS ns.test.com. Ôö¼ÓÓòÃû·þÎñÆ÷¼Í¼
    1d IN MX 10 mail.test.com. Ôö¼ÓÓʼþ·þÎñÆ÷¼Í¼
    www 1d IN A 192.168.0.1 Ôö¼ÓÖ÷»ú¼Í¼
    ns 1d IN A 192.168.0.1 Ôö»úÖ÷»ú¼Í¼
    mail 1d IN A 192.168.0.1 Ôö»úÖ÷»ú¼Í¼
    5¡¢±£´æÍ˳ö
    6¡¢ÒÔÉϲ¿·ÖΪÕýÏòµÄÓòÃû½âÎö²¿·Ö£¬Ï±ßÊÇ·´Ïò½âÎöµÄÅäÖð취
    7¡¢# vi /etc/named.conf #Ôö¼ÓÈçÏÂÐÐ
    zone ¡°0.168.192.in-addr.arpa¡± {
    type master;
    file ¡°0.168.192.in-addr.arpa.dns¡±;
    allow-update{none;};
    };
    8¡¢#touch /var/named/0.168.192.in-addr.arpa.dns # ´´½¨ÅäÖÃÎļþ
    9¡¢# vi /var/named/0.168.192.in-addr.arpa.dns#ÐÞ¸ÄÅäÖÃÎļþ£¬Ôö¼ÓÈçÏÂÄÚÈÝ
    $TTl 1d 0.168.192.in-addr.arpa £É£Î SOA¡¡£î£ó£®£ô£å£ó£ô£®£ã£ï£í£®£¨
    ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡1107274122
    10800
    3600
    604800
    38400£©
    ¡¡¡¡¡¡0.168.192.in-addr.arpa. IN NS £î£ó£®£ô£å£ó£ô£®£ã£ï£í£®
    ¡¡¡¡¡¡1.0.168.192.in-addr.arpa. IN PTR ns.test.com. Ôö¼Ó»úÖ¸Õë¼Í¼
    1.0.168.192.in-addr.arpa. IN PTR mail.test.com. Ôö¼Ó»úÖ¸Õë¼Í¼
    10¡¢# service named restart #Æô¶¯ÓòÃû·þÎñÆ÷
    # host -l test.com #²âÊÔÓòÃû·þÎñÆ÷ÕýÏò½âÎö
    # host -l 0.168.192.in-addr.arpa #²âÊÔÓòÃû·þÎñÆ÷µÄÄæÏò½âÎö



    [ ±¾Ìû×îºóÓÉ bufferol ÓÚ 2007-2-25 16:01 ±à¼­ ]

  17. 2000b871 ÓÚ 2006-04-24 03:49:31·¢±í:

    ¡¡¶¥£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡

  18. FF0707 ÓÚ 2006-04-14 11:15:07·¢±í:

    ²»´í£¬¸Ðл·ÖÏí