ÎÊ£ºLinuxϵͳÖУ¬ÓÐÄÄЩÖ÷ÒªµÄÈÕÖ¾×Óϵͳ£¿
´ð£ºÁ¬½Óʱ¼äÈÕÖ¾Óɶà¸ö³ÌÐòÖ´ÐУ¬°Ñ¼Ç¼дµ½/var/log/wtmpºÍ/var/run/utmp£¬²¢ÓÉloginµÈ³ÌÐò¸üÐÂwtmpºÍutmpÎļþ£¬Ê¹ÏµÍ³¹ÜÀíÔ±Äܹ»¸ú×ÙËÔÚºÎʱµÇ¼µ½ÏµÍ³¡£
½ø³Ìͳ¼ÆÓÉϵͳÄÚºËÖ´ÐС£µ±Ò»¸ö½ø³ÌÖÕֹʱ£¬ÎªÃ¿¸ö½ø³ÌÏò½ø³Ìͳ¼ÆÎļþ£¨Pacct»òacct£©ÖÐдһ¸ö¼Ç¼¡£½ø³Ìͳ¼ÆµÄÄ¿µÄÊÇΪϵͳÖеĻù±¾·þÎñÌṩÃüÁîʹÓÃͳ¼Æ¡£
´íÎóÈÕÖ¾ÓÉsyslogd£¨8£©Ö´ÐС£¸÷ÖÖϵͳÊØ»¤½ø³Ì¡¢Óû§³ÌÐòºÍÄÚºËͨ¹ýsyslogd£¨3£©ÏòÎļþ/var/log/messages±¨¸æÖµµÃ×¢ÒâµÄʼþ¡£ÁíÍ⣬ÓÐÐí¶àUnix³ÌÐò´´½¨ÈÕÖ¾¡£ÏñHTTPºÍFTPÕâÑùÌṩÍøÂç·þÎñµÄ·þÎñÆ÷Ò²±£³ÖÏêϸµÄÈÕÖ¾¡£
ÎÊ£ºLinuxÏÂtarºÍrsyncÇø±ð£¿
´ð£ºtarÃüÁîÓÃÀ´½¨Á¢×î³õµÄ¸±±¾£¬rsyncÃüÁîÔòÊÇÓÃÀ´»ñÈ¡×îºóÒ»¸ö¸±±¾½¨Á¢ÒÔÀ´Ëù·¢ÉúµÄ±ä¸ü¡£ÔÚ²»´æÔÚÈκÎÄ¿±êÎļþʱ£¬tar±ÈrsyncÒª¿ì¡£Èç¹ûÁ½¸öÎļþϵͳ²îÒìºÜС£¬Ôòrsync±Ètar¿ìÐí¶à¡£
ÎÊ£ºLinuxÓÐÄÄЩ³£ÓõÄϵͳά»¤Îļþ£¿
´ð£º£¨1£©/etc/hosts£ºÖ÷»úÃû×Ö½âÎöÎļþ£¬ÌṩÖ÷»úÃûºÍIPµØÖ·µÄ¶ÔÓ¦¡£
£¨2£©/etc/passwd£º°üº¬ÓпÚÁîÎļþ¡¢µÇ¼Óû§Ãû¡¢¼ÓÃÜ¿ÚÁî¡¢Óû§ID¡¢×éID¡¢³õʼ¹¤×÷Ŀ¼ºÍShell·¾¶µÈÐÅÏ¢¡£
£¨3£©/etc/grofup£º°üº¬ÓÐ×éÃû¡¢¼ÓÃÜÃÜÂë¡¢×éID¼°ËùÓÐÊôÓÚ¸Ã×éµÄÓû§µÄÐÅÏ¢µÈ¡£
£¨4£©/etc/profile£º¿ÉÒÔÉèÖÃͨÓû·¾³±äÁ¿¡£
£¨5£©/etc/inittab£ºÄÚ²¿³õʼ»¯Ö®ºó£¬ÏµÍ³½«Æô¶¯/etc/initÕâ¸öDeamon½ø³Ì£¬Ê¹ /etc/init½ø³ÌÈ¡µÃÒýµ¼ÐòÁÐÊÇ¿ØÖÆȨ¡£
ÎÊ£ºÈç¹û/varĿ¼¿Õ¼ä²»¹»Ó㬿ÉÒÔÒƵ½ÐµÄÓ²ÅÌ¿Õ¼äÖÐÂð£¿
´ð£ºµ±È»¿ÉÒÔ£¬µ«ÊÇҪעÒâÁ½µã£º
1.²»ÊǼòµ¥µÄ´Ó/ varĿ¼Ï¿½±´×ÊÁÏ£¬¶øÊÇÒªÓÃtarzcvf ºÍzxvfÃüÁî´ò°üºÍ½â°üµ½ÐµĹÒÔص㣬ÕâÑù²ÅÄܱ£Ö¤/varµÄÁ´½ÓÎļþ²»»áÊÜÆÆ»µ¡£
2.´Ó½ô¼±Æô¶¯ÈíÅÌÒýµ¼Æô¶¯£¬Èç¹ûûÓÐ×¼±¸¾ÍÓÃLinux °²×°¹âÅÌÓà rescueģʽ½øÈëϵͳ£¬°Ñ/etc/fstabÕâ¸öÎļþÖеÄ/var·ÖÇøÐ޸ijÉÏÖÔڵĹÒÔص㡣×îºóÍ˳öÖØÐÂÆô¶¯£¬Ê¹¹ÒÔØÉúЧ¡£
ÎÊ£ºÎÒµÄLinuxÿ´ÎÆô¶¯Ö±½Ó½øÈëͼÐνçÃ棬ÓÐʲô·½·¨¿ÉÒÔÖ±½Ó½øÈëÖÕ¶ËÂð£¿
´ð£ºÐÞ¸Ä/ e t c / i n i t t a b Îļþ£¬ÕÒµ½¡°i b£ºX £ºinitdefault¡±£¬ÆäÖÐX±íʾÆô¶¯·½Ê½£¬¸ÄΪ3±íʾÖնˣ¬¸ÄΪ5±íʾͼÐΡ£
ÎÊ£ºLinuxÏÂÔõôʵÏÖ·Ö¾íѹËõ£¿
´ð£ºÓÃtarÃüÁîÿ¾í50M·Ö¾íѹËõ£¬ÃüÁîÈçÏ£º
# tar zcvfp - mytarfilr.tar.gz | split -d -b 50m
ÎÊ£ºÈçºÎÓÃUSBÅÌÆô¶¯Linuxϵͳ£¿
´ð£ºÊ×ÏȲ鿴Ö÷°æÊÇ·ñÖ§³Ö´ÓUSBÅÌÆô¶¯£¬Æô¶¯Ê±£¬ÐèÒªµ½BIOSÏÂÉèÖôÓUSBÉ豸Æô¶¯¡£½øÈëBIOSµÄ¡°AdvancedBIOS Features¡±Ïµġ°first boot device¡±Ñ¡Ï¾ÍÓÐusb-fdd¡¢ usb-hdd¡¢usb-zipºÍusb-cdromµÈUSBÉ豸µÄÆô¶¯Ñ¡ÏîÁË£¬È»ºóÖÆ×÷Ò»ÕÅLinuxÆô¶¯ÅÌ¡£½« boot.img±£´æÔÚ¸ù·ÖÇøÏ£¬ÔËÐÐÃüÁ¡°dmesg¡±£¬²é¿´USBÅÌÉ豸ºÅ¡£Ò»°ãÊÇsda¡£
ÔËÐÐÈçÏÂÃüÁ
# dd if=/boot.img of = /dev/sda
Èç¹ûÏÔʾÈçÏ£¬Ôò±íʾÖÆ×÷³É¹¦¡£
2880 +0 records in
2880 +0 records out
ÎÊ£ºÎÒÔÚÓ¦ÓÃһЩÌرðÏûºÄÐéÄâÄÚ´æµÄ³ÌÐò£¨Èçg++£©Ê±£¬·¢ÏÖswap¿Õ¼äÒѾÓÃÍ꣬ÈçºÎÁÙʱÔö¼Óswap¿Õ¼äÄØ£¿
´ð£ºÈç¹ûÊÇÁÙʱÔö¼Óswap¿Õ¼ä£¬¿ÉÒÔʹÓÃswapÎļþÀ´ÊµÏÖ¡£Èç¹ûÔö¼Ó128MBµÄswap¿Õ¼ä£¬¿ÉÒÔʹÓÃÒÔÏÂÃüÁîÀ´ÊµÏÖ£º
# lsof -i :22
COMMAND PID USER FD TYPE DEVICE SIZENODE NAME
sshd 1826 root 3u IPv6 2770 TCP *:ssh(LISTEN)
# dd if=/dev/zero of=/swap bs=1024 count=131070
# mkswap /swap
Setting up swapspace version 1,size = 134209 kB
# swapo
swapoff swapon
ÆäÖУ¬count²ÎÊýÊÇswapÎļþµÄ´óС£¬of²ÎÊýÊÇswapÎļþµÄÃû³Æ¡£Çë×¢Ò⣬ÔÚ´æ·ÅswapÎļþµÄ·ÖÇøÉÏÒªÓÐÏàÓ¦µÄ¿Õ¼ä£¬ÈçÉÏÀýÖС°/¡±·ÖÇøÖÁÉÙÒªÓÐ128MBµÄ¿É¼û²ÅÐС£Ê¹ÓÃÍê±Ïºó£¬¿ÉÒÔÓÃÒÔÏÂÃüÁî½âÊÍÕâ128MBµÄswap·ÖÇø£º
# swapoff /swap
# rm /swap
ÎÊ£ºÈçºÎ·ÀÖ¹ÒÔÍâ»ò±ðÈ˹ÊÒâÐÞ¸ÄÎļþ£¿
´ð£º¶ÔϵͳÖеÄһЩ¹Ø¼üÎļþºÍ¸öÈËÖØÒª×ÊÁÏ£¬¿ÉÒÔͨ¹ýÎļþȨÏÞÀ´±£»¤£¬ÀýÈ罫ÎļþÊôÐÔÉèΪ600¡£ÁíÍ⣬Èç¹ûLinuxʹÓõÄÊÇext2»òext3Îļþϵͳ£¬»¹¿ÉÒÔʹÓá°chattr¡±ÃüÁ¸øÎļþ¼ÓÉÏiÊôÐÔ£¬¼´Ê¹rootÓû§Ò²²»ÄÜÖ±½ÓÐ޸Ļòɾ³ýÕâÀàÎļþ£¬ÒÔÓÐЧ·ÀÖ¹ÒâÍâÐÞ¸ÄÇé¿öµÄ·¢Éú¡£¾ßÌåÃüÁîÈçÏ£º
# chattr +i passwd
È¥³ýiÊôÐÔʹÓÃÈçÏÂÃüÁ
# chattr -i passwd
ÎÊ£ºÎÒÔÚWindowsϲ»Ð¡ÐÄ°Ñswap·ÖÇø¸ñʽ»¯ÁË£¬ÇëÎÊÓÐʲôÃüÁî¿ÉÒÔ»Ö¸´£¿
´ð£ºÊ¹ÓÃmkswapÃüÁÁ¢swap·ÖÇø£¬ÔÙʹÓÃswaponÃüÁîÆôÓÃswap·ÖÇø¼´¿É¡£¹ØÓÚÃüÁîµÄʹÓ㬾ÙÀýÈçÏ£º
££mkswap /dev/sda7
# swapon /dev/sda7
fantlam ÓÚ 2007-07-09 21:51:45·¢±í:
Ö§³ÖÒ»ÏÂ
mir_lww ÓÚ 2006-04-24 13:33:59·¢±í:
Á÷Óð ÓÚ 2005-08-01 23:56:12·¢±í:
Ö§³Ö¼ÓÓÍ£¡£¡£¡£¡£¡
Ììʹ ÓÚ 2005-07-30 14:56:19·¢±í:
Ö§³Ö
wade9900 ÓÚ 2005-06-11 23:16:17·¢±í:
²»´í°¡£¡ºÇºÇ
ÐÂРÓÚ 2005-06-08 00:35:14·¢±í:
¶¥
linux_ ÓÚ 2005-05-21 02:17:36·¢±í:
¶¥