b{b Internet WACracker bOӦhFIo Cracker |QΤwgsbtκ|}AӶi氻BJIzDA ]AFӬ[]𤧥~A̭n Linux `zu@ALMɯŤFI LAgѨC[wqҧiM|}AHεݦUj distribution woǺ|}Ӵ RPM ɮסAH Client ӤɯŪL{AbOIwCڡI]A ثeNܦhuWsX{FIFoǽuWs RPM qPkAڭ̨tκzbzDtΤWAiNPhoIӬݬݧaI |
[root@linux ~]# vi /etc/yum.repos.d/CentOS-Base.repo [base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch &repo=os&cc=tw # `NIWOP@I gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 #released updates [update] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch &repo=updates&cc=tw # `NIWOP@I gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 ......(Uٲ)..... |
[root@linux ~]# yum [option] [u@] [M] ѼơG optionGDnѼơA]AG -y G yum ߰ݨϥΪ̪NɡADʦ^ yes ӤݭnLJF --installroot=/some/path Gw˦bL|AӤbثeؿ𪺬[cF إߵ۷UILA@ϥΪӥΤC [u@]GѩPϥαAӦ@ǿܪءA]AG install Gww˪MW١AҥH᭱ݱy MW z update GiɯŪ欰FM]iHYӮMAȤɯŤ@ӮMF remove GYӮMA᭱ݱMW١F search GjMYӮMΪ̬OnrF list GCXثe yum ҺzҦMWٻPAI rpm -qaF info GPWALI rpm -qai 浲GF clean GUɮ׳Q /var/cache/yum Aiϥ clean NLA iMءGpackages | headers | metadata | cache F t~Ab[u@]٥iH㦳ӸsծMwˤ觋ApUҥܡG grouplist GCXҦiϥΪyMաzAҦp Development Tools F groupinfo G᭱ group_nameAhiAѸ group tҦMWF groupinstallGoӦnΡIiHwˤ@ժMsաA۷ΡI `P --installroot=/some/path @ΨӦw˷st groupupdate GɯžӮMsաF groupremove GYӮMsաF dҤ@GjM CentOS sDWO_ RAID Ϻа}CMH [root@linux ~]# yum search raid .....eٲ..... mdadm.i386 1.6.0-3 base Matched from: mdadm controls Linux md devices (software RAID arrays) mdadm is used to create, manage, and monitor Linux MD (software RAID) .....᭱ٲ..... # ݨ_HXƪSr騺@NܤFAiHw˪MWٵMAiHoˡG [root@linux ~]# yum info mdadm Name : mdadm Arch : i386 Version: 1.6.0 Release: 3 Size : 84 k Repo : base Summary: mdadm controls Linux md devices (software RAID arrays) Description: .....᭱ٲ..... # @@@ڡIMW١BƤjpB٦ӮMXB (base)I # ݭn`NݪO Summary P Description oӪ`NƶeI |
dҤGGwˬYӮMaIH mdadm ҡG [root@linux ~]# rpm -q mdadm package mdadm is not installed # DèSw˳oӪNҥHU}lw˥I [root@linux ~]# yum install mdadm Setting up Install Process Setting up repositories update 100% |=========================| 951 B 00:00 base 100% |=========================| 1.1 kB 00:00 addons 100% |=========================| 951 B 00:00 extras 100% |=========================| 1.1 kB 00:00 # WoӶqbŪ RPM ɮתYơF --> Populating transaction set with selected packages. Please wait. ---> Downloading header for mdadm to pack into transaction set. mdadm-1.6.0-3.i386.rpm 100% |=========================| 8.2 kB 00:00 ---> Package mdadm.i386 0:1.6.0-3 set to be updated --> Running transaction check # WoӶqhObUɮץHηdzƧsq Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: mdadm i386 1.6.0-3 base 84 k Transaction Summary ============================================================================= Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 84 k Is this ok [y/N]: y # ܩoӶqhbRۨݩʡAåBϥΪ̽T{U}l wnloading Packages: (1/1): mdadm-1.6.0-3.i386 100% |=========================| 84 kB 00:00 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: mdadm ######################### [1/1] Installed: mdadm.i386 0:1.6.0-3 Complete! # ̲hUPw˪GI |
[root@linux ~]# yum clean packages
Cleaning up Packages
2 packages removed
|
[root@linux ~]# yum -y update
|
dҤTGdPwˡyMsաz [root@linux ~]# yum grouplist Installed Groups: Administration Tools Authoring and Publishing Compatibility Arch Support .....ٲ..... Available Groups: Development Tools XFCE-4.2 .....ٲ..... Done # ݨSIWNCXӧAwgw˪MsաA٦|iw˪LMsաA # uOD`KIpD Development Tools ̭ԣNNH [root@linux ~]# yum groupinfo "Development Tools" Group: Development Tools Required Groups: <==һݭnۨݩʸ Development Libraries Default Metapkgs: <==w]һݭn~M Emacs Optional Metapkgs: <==̦n٧toǮM Ruby XEmacs .....ٲ..... Mandatory Packages: <==@ǩһݭnM pkgconfig gcc-ppc32 make gcc autoconf .....ٲ..... Default Packages: gcc-g77 cscope .....ٲ..... Optional Packages dejagnu ElectricFence gcc-gnat .....ٲ..... # `@|CXӳoӡyMsաztUơApGAݭnw˪ܡANiHG [root@linux ~]# yum groupinstall "Development Tools" |
DGг]w@Uu@Ƶ{AA centOS iHCѦ۰ʧst G
40 5 * * * root yum -y update && yum clean packageso˴NiH۰ʧsFA ɶqbCѪ 5:40 AåBs|DʪNUMƲI |
1. ק /etc/yum.conf [root@linux ~]# vi /etc/yum.conf .....eٲ..... # bɮת̩U[Jo@ӼW[@B~\G plugins=1 2. Aק /etc/yum.repos.d/CentOS-Base.repo [root@linux ~]# vi /etc/yum.repos.d/CentOS-Base.repo # ePy yum ]wɡzۦPAЦ^쥻p`̫ed\ӳ]w |
[root@linux ~]# yum upgrade
|
0. eBzGdzƦnAơAHΧRݭn [root@linux ~]# yum clean packages headers # R쥻 yum ơA] FC1 ϥΪ]O yum A # ҥH̦nNe FC1 yum ƧRA|DF |
1. wˤɯũһݭn RPM ɮסG [root@linux ~]# rpm --import \ > http://ftp.isu.edu.tw/pub/Linux/CentOS/4.3/os/i386/RPM-GPG-KEY-centos4 [root@linux ~]# rpm -Uvh centos-release-4-3.2.i386.rpm [root@linux ~]# rpm -Uvh centos-yumconf-4-4.5.noarch.rpm [root@linux ~]# rpm -ivh --force --nodeps kernel-2.6.9-34.EL.i686.rpm # boӰʧ@ɡAѩڭ̪֤ߨëDO CentOS AҥHoӰʧ@|oͤ@ǿ~A # nzLAݷ|ʧ@AsBzYiC [root@linux ~]# rpm -ivh --force --nodeps udev-039-10.12.EL4.i386.rpm |
2. |Ĭ 2.4 ֤ߡAsPlX [root@linux ~]# rpm -qa | grep kernel kernel-2.4.22-1.2197.nptl kernel-2.4.22-1.2115.nptl kernel-2.4.22-1.2199.nptl kernel-source-2.4.22-1.2197.nptl kernel-source-2.4.22-1.2199.nptl .....Lٲ..... [root@linux ~]# rpm -e kernel-source-2.4.22-1.2199.nptl [root@linux ~]# rpm -e kernel-source-2.4.22-1.2197.nptl [root@linux ~]# rpm -e kernel-2.4.22-1.2115.nptl [root@linux ~]# rpm -e kernel-2.4.22-1.2197.nptl [root@linux ~]# rpm -e kernel-2.4.22-1.2199.nptl # ϥNO֤P֤߭lXMANNLIOoMWG # kernel P kernel-source ALΰʡI [root@linux ~]# rpm --rebuilddb |
3. Wd]w [root@linux ~]# vi /etc/yum.upgrade [main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=fedora-release installonlypkgs=kernel kernel-smp kernel-hugemem kernel-unsupported tolerant=1 exactarch=1 plugins=1 [upgrade] name=CentOS-4.3 - upgrade baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/4.3/os/i386/ [update] name=CentOS-4.3 - Updates baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/4.3/updates/i386/ |
4. }lɯŪʧ@G [root@linux ~]# yum -y -t -c /etc/yum.upgrade upgrade |
5. swˮ֤ߡAóBz RPM ƮwPsLM [root@linux ~]# rpm -ivh --force --nodeps kernel-2.6.9-34.EL.i686.rpm [root@linux ~]# rpm --rebuilddb [root@linux ~]# yum update |
6. ]w}]w [root@linux ~]# vi /boot/grub/menu.lst default=0 timeout=10 splashimage=(hd0,0)/boot/grub/splash.xpm.gz title CentOS (2.6.9-34.0.2) root (hd0,0) kernel /boot/vmlinuz-2.6.9-34.0.2.EL ro root=/dev/hda1 hdd=ide-scsi rhgb initrd /boot/initrd-2.6.9-34.0.2.EL.img title CentOS (2.6.9-34.EL) root (hd0,0) kernel /boot/vmlinuz-2.6.9-34.EL ro root=/dev/hda1 hdd=ide-scsi rhgb initrd /boot/initrd-2.6.9-34.EL.img |
1. Bz APT Aӷ]wơG [root@linux ~]# vi /etc/apt/sources.list deb ftp://debian.tnc.edu.tw/pub/debian/ stable main non-free contrib deb http://security.debian.org/ sarge/updates main contrib non-free deb ftp://debian.tnc.edu.tw/pub1 b2d/ deb http://ftp2.de.debian.org/debian-volatile sarge/volatile main # W榡Oo˪G # <deb Y榡> <APTA}> <۹}|> <ؿ@> <ؿG> ... |
[root@linux ~]# apt-get [-qy] [-c config_file] [s] [MW] ѼơG -q GnbùWXTA`ΦbIҪI -y G۰ʦbi apt-get ɦ^ y ^F -c G᭱O]wɡA@tη|DʪH /etc/apt ]wɬ̾ڡC [s]Gn apt-get i檺u@ADnoXG update GNOsAPΤݪMYMAoӰʧ@ȥniI install G᭱ݭn[Wnw˪MW٤~I upgrade GiywwˮMzɯšALwˮMhwˡF dist-upgradeGH upgrade ۦAOsMLۨݩʪM[JɡA ª upgrade NLkiwˡAɴNonϥ dist-upgrade FI clean GMwgU /var/cache/apt/archives/ MɮסC remove GYӮMڡI dҤ@GiMYsAiMsʧ@ [root@linux ~]# apt-get update U:1 ftp://debian.tnc.edu.tw stable/main Packages [3349kB] U:2 http://ftp2.de.debian.org sarge/volatile/main Packages [3893B] .....ٲ..... Ū 3868kB ΤF 24s (159kB/s) ŪMM椤... [root@linux ~]# apt-get dist-upgrade ŪMM椤... FѮM̦sY... weɯŮM... UCMNQiRjG blt-common ettercap-plugins libgdbmg1-dev UCisjMNQwˡG dictionaries-common ettercap-common .....᭱ٲ..... UCMNª: fontconfig libxft-dev libxft2 libxft2-dbg .....᭱ٲ..... UCMNs: apache apache-common apache-utils apache2 .....᭱ٲ..... s 105 ӮMAsw 32 ӮMAR 3 ӮMAts 7 ӮMC ݭnU 122MB ɮסC YN 39.6MB ŶC ~ܡH O [Y] A_ [n] y U:1 ftp://debian.tnc.edu.tw stable/main libc6-dev 2.3.2.ds1-22sarge3 [2535kB] U:2 http://security.debian.org sarge/updates/main login 1:4.0.3-31sarge8 [576kB] .....ٲ..... Ū 122MB ΤF 11m47s (172kB/s) bw]wM ... (bŪƮw ... tΥثe`@w˦ 112550 ɮשMؿC) wƴ libc6-dev 2.3.2.ds1-22 (ϥ .../libc6-dev_2.3.2.ds1-22sarge3_i386.deb) bYM libc6-dev ... .....ٲ..... Please *restart* your Apache2 ! Y/N ? y .....ٲ..... [root@linux ~]# apt-get clean # oӰʧ@|NUX deb MLI`ٵwЪŶI |
[root@linux ~]# vi /etc/crontab 40 5 * * * root /usr/bin/apt-get update && /usr/bin/apt-get -y dist-upgrade |
[root@linux ~]# apt-cache [jM] ѼơG [jM]Gapt-cache iHjM apt ҦCXMYƳIiζئG pkgnamesGCXtΤWҦMW١III (rpm -qa)F dump GCXҦMYHΨۨݩʮMI search G᭱injMrAҦp apt-cache search postfix show G᭱MW١AiHܥXӮMDneyzI showpkg GCX᭱ұMۨݩʥHӨMѪ\I depends GiHCXP᭱ұMۨݩʩΪ̬OĬ𪺬ơI dҤ@GXP grep M [root@linux ~]# apt-cache search grep .....eٲ..... grep - GNU grep, egrep and fgrep grep-dctrl - Grep Debian package information .....᭱ٲ..... [root@linux ~]# apt-cache show grep Package: grep Essential: yes Priority: required Section: base Installed-Size: 660 Maintainer: Ryan M. Golbeck <rmgolbeck@debian.org> Architecture: i386 Version: 2.5.1.ds1-4 Provides: rgrep Pre-Depends: libc6 (>= 2.3.2.ds1-4) Conflicts: rgrep Filename: pool/main/g/grep/grep_2.5.1.ds1-4_i386.deb Size: 170290 MD5sum: 68196ad14b098b0eb4b91f4a7cfa8ff2 Description: GNU grep, egrep and fgrep 'grep' is a utility to search for text in files; it can be used from the command line or in scripts. Even if you don't want to use it, other packages on your system probably will. [root@linux ~]# apt-cache depends grep grep SO̦sY: libc6 Ĭ: <rgrep> |
[root@linux ~]# apt-get install zlibc
|