'''yum »ç¿ëÇϱâ''' '''¹®ÅÂÁØ''' [[DateTime(2006-10-22T08:56:37)]] http://tunelinux.pe.kr http://database.sarang.net [[TableOfContents]] == yum °³·« == yumÀ» ÀÌ¿ëÇÏ¿© º¸¾È¾÷µ¥ÀÌÆ®¸¦ ÀÚµ¿È­ÇÏ´Â ³»¿ë. yum »ç¿ë½Ã ÁÖÀÇ»çÇ×, ÀÚü ÀúÀå¼Ò ¸¶·ÃÇϱ⠵î * ¹®¼­º¯°æ»çÇ× : [[DateTime(2006-10-22T08:56:37)]] yum ·¹ÆÛÁöÅ丮 º°µµ »ý¼ºÇÑ ½ÇÁ¦ ³»¿ë Ãß°¡ == º°µµ rpm Á¦À۽à ÁÖÀÇ»óȲ == {{{ [root@intranet log]# grep yum messages Sep 21 04:31:39 intranet yum: Updated: gzip.i386 1.3.3-16.rhel4 Sep 22 05:14:13 intranet yum: Installed: mysql.i386 4.1.20-1.RHEL4.1 Sep 22 05:14:14 intranet yum: Updated: php-mysql.i386 4.3.9-3.18 Sep 22 05:14:15 intranet yum: Updated: php-pear.i386 4.3.9-3.18 Sep 22 05:14:15 intranet yum: Updated: php.i386 4.3.9-3.18 Sep 22 05:14:20 intranet yum: Erased: MySQL-server-standard Sep 22 05:14:21 intranet yum: Erased: MySQL-client-standard Sep 22 09:04:42 intranet yum: Installed: mx.i386 2.0.5-3 Sep 22 09:04:42 intranet yum: Installed: mysqlclient10.i386 3.23.58-4.RHEL4.1 Sep 22 09:04:42 intranet yum: Installed: MySQL-python.i386 1.0.0-1.RHEL4.1 Sep 22 09:07:47 intranet yum: Installed: php-mysql.i386 4.3.9-3.18 Sep 22 09:09:43 intranet yum: Erased: MySQL-python Sep 22 09:09:44 intranet yum: Erased: MySQL-shared-standard Sep 22 09:09:44 intranet yum: Erased: MySQL-devel-standard Sep 22 09:09:44 intranet yum: Erased: MySQL-server-standard Sep 22 09:13:13 intranet yum: Installed: mysql.i386 4.1.20-1.RHEL4.1 Sep 22 09:20:24 intranet yum: Disabling nightly yum update: Sep 22 09:20:24 intranet yum: succeeded Sep 22 09:20:24 intranet yum: Sep 22 09:20:24 intranet yum: Sep 22 09:20:24 intranet rc: Stopping yum: succeeded Sep 22 09:25:07 intranet yum: Installed: mysql.i386 4.1.20-1.RHEL4.1 Sep 22 09:25:07 intranet yum: Installed: php-mysql.i386 4.3.9-3.18 Sep 22 09:25:10 intranet yum: Erased: MySQL-server-standard Sep 22 09:25:11 intranet yum: Erased: MySQL-client-standard Sep 22 09:30:31 intranet yum: Installed: mysql.i386 4.1.20-1.RHEL4.1 Sep 22 09:32:00 intranet yum: Erased: php-pear Sep 22 09:32:01 intranet yum: Erased: php }}} /etc/init.d/yum ÀÌ È°¼ºÈ­µÇ¾î ÀÖÀ¸¸é ÀÚµ¿À¸·Î yum update¸¦ ½ÇÇàÇÔ. php°¡ ¾÷µ¥ÀÌÆ®°¡ µÇ¸é¼­ ±âÁ¸¿¡ 5.x¿¡ ¸Â°Ô ºôµåÇÑ php °ü·Ã rpmÀ» ÀÚµ¿ »èÁ¦ÇÏ°í mysqlµµ ÀÚµ¿À¸·Î À缳ġÇϸ鼭 ¹®Á¦°¡ ¹ß»ýÇÏ¿´À½. ÀÓ½ÃÁ¶Ä¡·Î ÇØ´ç rpmÀ» À缳ġÇÏ°í ¼­ºñ½º¸¦ º¹±¸ÇÑ ÈÄ yum ÀÚµ¿¾÷µ¥ÀÌÆ®¸¦ ºñÈ°¼ºÈ­ÇÏ°í yum ¿¡¼­ °ü·ÃÆÐÅ°Áö´Â ÀÚµ¿¾÷µ¥ÀÌÆ®¸¦ ÇÏÁö ¾Êµµ·Ï Á¶Á¤ÇÏ¿´À½. == yum ±¸Á¶ == {{{ # cat /etc/init.d/yum lockfile=/var/lock/subsys/yum RETVAL=0 start() { echo -n $"Enabling nightly yum update: " touch "$lockfile" && success || failure RETVAL=$? echo } stop() { echo -n $"Disabling nightly yum update: " rm -f "$lockfile" && success || failure RETVAL=$? echo } }}} ¿©±â ½ºÅ©¸³Æ®¿¡¼­ lockfile À» °Ë»çÇÏ¿© ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÑ´Ù. {{{ [root@intranet cron.daily]# cat /etc/cron.daily/yum.cron #!/bin/sh if [ -f /var/lock/subsys/yum ]; then /usr/bin/yum -R 120 -e 0 -d 0 -y update yum /usr/bin/yum -R 10 -e 0 -d 0 -y shell /etc/yum/yum-daily.yum fi }}} ÇÏ·ç¿¡ Çѹø¾¿ ÀÚµ¿À¸·Î yum update ¸¦ ¼öÇàÇÏ´Â °ÍÀÌ´Ù. {{{ [root@intranet cron.daily]# cat /etc/yum/yum-daily.yum update ts run exit [root@intranet cron.daily]# cat /etc/cron.weekly/yum.cron #!/bin/sh if [ -f /var/lock/subsys/yum ]; then /usr/bin/yum -e 0 -d 0 clean packages fi }}} ÀÏÁÖÀÏ¿¡ Çѹø¾¿ yum ij½¬ µð·ºÅ丮¸¦ Á¤¸®ÇØÁØ´Ù. yum °ú °ü·ÃÇÑ log´Â /var/log/yum.log ¿¡ ³²´Â´Ù. {{{ [root@intranet cron.daily]# cat /etc/logrotate.d/yum /var/log/yum.log { missingok notifempty size 30k create 0600 root root } }}} À§¿Í °°ÀÌ logrotate ¼³Á¤¿¡ µû¶ó ÁÖ±âÀûÀ¸·Î ·Î±×¸¦ ¼øȯ½ÃÄÑÁØ´Ù. yum ÀÇ ¼³Á¤ÆÄÀÏÀº /etc/yum.conf ÀÌ´Ù. {{{ [root@intranet moniwiki]# cat /etc/yum.conf [main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=centos-release tolerant=1 exactarch=1 retries=20 obsoletes=1 gpgcheck=1 # PUT YOUR REPOS HERE OR IN separate files named file.repo # in /etc/yum.repos.d }}} À§¿¡¼­ ¸¸¾à ƯÁ¤ ÆÐÅ°Áö¸¦ Á¦¿ÜÇÏ·Á¸é exclude ¿É¼ÇÀ» ¾²¸é µÈ´Ù. {{{ exclude=http* MySQL* mysql* php* kernel* }}} ´ë¼Ò¹®ÀÚ ±¸º°À» ÇÏ´ÂÁö ¸ô¶ó¼­ Ȥ½Ã³ª »ý±æ ¹®Á¦¿¡ ´ëºñÇÏ¿© ¸ðµÎ ³Ö¾ú´Ù. == yumÀÇ update ±¸Á¶ == === Ŭ¶óÀ̾ðÆ® ¼³Á¤ÆÄÀÏ === /etc/yum.conf °¡ yum Ŭ¶óÀ̾ðÆ® ¼³Á¤ÆÄÀÏÀ̸ç /etc/yum.repos.d µð·ºÅ丮¿¡ ÀúÀå¼Ò¿¡ ´ëÇÑ Á¤º¸¸¦ ³Ö´Â´Ù. {{{ # cat /etc/yum.conf [main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=centos-release tolerant=1 exactarch=1 retries=20 obsoletes=1 gpgcheck=1 # PUT YOUR REPOS HERE OR IN separate files named file.repo # in /etc/yum.repos.d }}} {{{[main]}}} ¿¡ ÁÖ¿ä ¿É¼ÇÀÌ µé¾î°£´Ù. main Àº ÀüüÀûÀ¸·Î Àû¿ëÀÌ µÈ´Ù. distroverpkg ¿¡¼­ »ç¿ëÁßÀÎ ÆÐÅ°ÁöÀÇ ¹èÆ÷ÆÇÀÇ ¹öÀüÀ» ¾Ë¾Æ³»±â À§ÇØ ÇÊ¿äÇÑ °ÍÀ¸·Î ¿©±â¼­ ÁöÁ¤ÇÑ ÆÐÅ°ÁöÀÇ ¹öÀüÀ» ÀÌ¿ëÇÑ´Ù. À§¿¡¼­µµ ¼³¸íÀ» ÇßÁö¸¸ ƯÁ¤ ÆÐÅ°Áö¸¦ Á¦¿ÜÇÏ·Á¸é exclude¸¦ ÀÌ¿ëÇϸç ƯÁ¤ ·¹ÆÛÁöÅ丮¿¡¸¸ Àû¿ëÇÒ ¼ö ÀÖ´Ù. {{{ # ls /etc/yum.repos.d/ CentOS-Base.repo CentOS-Media.repo [root@mytest yum]# cat /etc/yum.repos.d/CentOS-Base.repo # CentOS-Base.repo # # This file uses a new mirrorlist system developed by Lance Davis for CentOS. # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ 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 #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 #packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons #baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 [root@mytest yum]# cat /etc/yum.repos.d/CentOS-Media.repo # CentOS-Media.repo # # This repo is used to mount the default locations for a CDROM / DVD on # CentOS-4. You can use this repo and yum to install items directly off the # DVD ISO that we release. # # To use this repo, put in your DVD and use it with the other repos too: # yum --enablerepo=c4-media [command] # # or for ONLY the media repo, do this: # # yum --disablerepo=\* --enablerepo=c4-media [command] [c4-media] name=CentOS-$releasever - Media baseurl=file:///media/cdrom/ file:///media/cdrecorder/ gpgcheck=1 enabled=0 gpgkey=file:///usr/share/doc/centos-release-4/RPM-GPG-KEY-centos4 }}} {{{[repositoryid]}}} repositoryid °¢ ·¹Æ÷¸®Å丮¸¶´Ù À¯ÀÏÇÑ À̸§ÀÌ´Ù. name Àº name ´Â »ç¶÷ÀÌ Àб⠽±µµ·Ï ¼³¸íÀ» ´Ü °ÍÀÌ´Ù. {{{ [repositoryid] name=Some name for this repository baseurl=url://server1/path/to/repository/ url://server2/path/to/repository/ url://server3/path/to/repository/ }}} baseurl Àº yum ·¹ÆÄÁöÅ丮ÀÇ repodata µð·ºÅ丮°¡ ÀÖ´Â URLÀÌ´Ù. baseurlÀ» ¿©·¯°³ µÎ¸é ¾ÕÀÇ °ÍÀº ¹«½Ã°¡ µÇ¹Ç·Î ÀÌ·± ¹æ½ÄÀ¸·Î »ç¿ëÇÏÁö ¸»°í À§¿Í °°ÀÌ urlÀ» ¿©·¯°³ »ç¿ëÇÏ¸é µÈ´Ù. ±âº»ÀûÀ¸·Î failovermethod °¡ roundrobin À¸·Î µÇ¾îÀִµ¥(±âº»°ªÀÓ) priority ·Î ¹Ù²Ù¸é À§¿¡ ÀÖ´Â °ÍºÎÅÍ Á¶È¸¸¦ ÇÏ°Ô µÈ´Ù. °¡±î¿î ³×Æ®¿öÅ©ÀÇ ¼­¹ö¸¦ °­Á¦·Î ÁöÁ¤ÇÏ´Â °Íµµ ÁÁÀº ¹æ½ÄÀÏ °ÍÀÌ´Ù. gpgcheck ´Â gpg üũ¿©ºÎÀÌ´Ù. enabled ´Â ÇØ´ç ·¹Æ÷ÁöÅ͸®¸¦ È°¼ºÈ­ÇÒ °ÍÀÎÁö¿¡ ´ëÇÑ ¿©ºÎÀ̸ç centosplus, contrib Àº ºñÈ°¼ºÈ­µÇ¾î ÀÖ´Ù. Âü°í·Î cetosplus ·¹ÆÛÁöÅ丮¿¡´Â mysql 5.0, php 5.x µîÀÇ ÃÖ±Ù ÆÐÅ°Áö°¡ µé¾îÀÖ´Ù. $releasever ´Â distroverpkg ¿¡¼­ ÁöÁ¤ÇÑ ÆÐÅ°ÁöÀÇ ¹öÀüÀ» ´ã´Â º¯¼öÀÌ´Ù. $basearch ´Â ±âº»¾ÆÅ°ÅØó·Î $arch °¡ i686 ÀÏ °æ¿ì i386ÀÌ µÈ´Ù. === µ¥ÀÌÅÍ ¹Ì·¯¸µ Çϱâ === óÀ½ ¼³Ä¡½Ã ·¹ÆÄÁöÅ丮 ¼³Á¤Àº mirrorlist¸¦ ÀÌ¿ëÇÑ´Ù. mirrorlist.centos.org ÀÇ »çÀÌÆ®¸¦ ÀÌ¿ëÇÏ¿© ¹Ì·¯»çÀÌÆ®¸¦ ÀÚµ¿À¸·Î ã°í ±× »çÀÌÆ®¸¦ ÀÌ¿ëÇÏ¿© ¾÷µ¥ÀÌÆ®¸¦ ÇÏ´Â °ÍÀÌ´Ù. baseurlÀº Á÷Á¢ ƯÁ¤ urlÀ» ÁöÁ¤ÇÏ´Â °ÍÀÌ´Ù. mirrorlist ½ÇÇàÀ» ¼öµ¿À¸·Î Çؼ­ È®ÀÎÇغ¸¸é ¾Æ·¡¿Í °°´Ù. yum ¿¡¼­ ÀÚµ¿À¸·Î °¡±î¿î Áö¿ª»çÀÌÆ®ÀÇ ¹Ì·¯¸®½ºÆ®¸¦ ã¾ÆÁØ´Ù. °á°ú¸¦ º¸¸é Çѱ¹, Áß±¹, ÀϺ»»çÀÌÆ®ÀÌ´Ù. {{{ http://mirrorlist.centos.org/?release=4.4&arch=i386&repo=os http://mirror.tini4u.net/centos/4.4/os/i386/ http://mirror.secuidc.com/centos/4.4/os/i386/ http://rsync.atworks.co.jp/centos/4.4/os/i386/ http://ftp.nara.wide.ad.jp/pub/Linux/centos/4.4/os/i386/ http://ftp.riken.jp/Linux/centos/4.4/os/i386/ http://ftp.yz.yamagata-u.ac.jp/pub/linux/centos/4.4/os/i386/ http://ftp.iij.ad.jp/pub/linux/centos/4.4/os/i386/ http://mirror.vmmatrix.net/CentOS/4.4/os/i386/ http://mirror.be10.com/centos/4.4/os/i386/ http://centos.hostlink.com.hk/4.4/os/i386/ http://mirrorlist.centos.org/?release=4.3&arch=i386&repo=os 4.3 is not a valid release or hasnt been released yet }}} ÇöÀç °ø½Ä¹Ì·¯»çÀÌÆ®¿¡¼­ Çѱ¹Àº µÎ°¡Áö°¡ ÀÖ´Ù. http://mirror.secuidc.com/centos/ http://mirror.tini4u.net/centos/ === ·¹ÆÛÁöÅ丮 ·ÎÄ÷Π¹Ù²Ù±â === ·¹ÆÄÁöÅ丮¸¦ ·ÎÄó×Æ®¿öÅ©·Î ¹Ù²Ù±â À§Çؼ­ centos 4.3 ÀÇ os, updates ¸¦ rsync¸¦ ÀÌ¿ëÇÏ¿© ·ÎÄÿ¡ ¹Ì·¯¸µÇÏ¿´´Ù. ¹Ì·¯¸µÀº ftp.sayclub.com µî ´Ù¸¥ »çÀÌÆ®¸¦ ÀÌ¿ëÇÒ ¼öµµ ÀÖ´Ù. {{{ * 4.3 ´ë ftp.sayclub.com # rsync -avH --delete ftp.sayclub.com::ftp/pub/linux/centos/4.3/os/i386 /data/centos/4.3/os # rsync -avH --delete ftp.sayclub.com::ftp/pub/linux/centos/4.3/updates/i386 /data/centos/4.3/updates * 4.4 ´ë ftp.sayclub.com # rsync -avH --delete ftp.sayclub.com::ftp/pub/linux/centos/4.4/os/i386 /data/centos/4.4/os # rsync -avH --delete ftp.sayclub.com::ftp/pub/linux/centos/4.4/updates/i386 /data/centos/4.4/updates }}} ¾Æ·¡¿Í °°ÀÌ ¹Ù²Ù¾î 󸮸¦ ÇÏ·Á°í Çߴµ¥ ÀÌ»óÇÏ°Ôµµ releasever °¡ 4.3ÀÌ ¾Æ´Ï¶ó 4·Î ³ª¿Í¼­ ¿¡·¯°¡ »ý°å´Ù. {{{ # cat j2.repo [base] name=CentOS-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os baseurl=http://222.112.137.162/centos/$releasever/os/$basearch/ 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 baseurl=http://222.112.137.162/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 }}} ±×·¡¼­ ¾Æ·¡¿Í °¥ÀÌ $releasever ¸¦ 4.3À¸·Î ¹Ù²Ù¾î ½ÇÇàÇÏ¸é ½ÇÇàÀº µÇÁö¸¸ ½ÇÁ¦ ¾÷µ¥ÀÌÆ®´Â µÇÁö ¾Ê¾Ò´Ù. {{{ [base] name=CentOS-4.3 - Base #mirrorlist=http://mirrorlist.centos.org/?release=4.3&arch=$basearch&repo=os baseurl=http://222.112.137.162/centos/4.3/os/$basearch/ gpgcheck=0 gpgkey=http://222.112.137.162/centos/RPM-GPG-KEY-centos4 #released updates [update] name=CentOS-4.3 - Updates #mirrorlist=http://mirrorlist.centos.org/?release=4.3&arch=$basearch&repo=updates baseurl=http://222.112.137.162/centos/4.3/updates/$basearch/ gpgcheck=0 gpgkey=http://222.112.137.162/centos/RPM-GPG-KEY-centos4 }}} ip¸¦ º¯°æÇÏ´Â °Í¸¸À¸·Î ´Þ¶óÁö´Â °ÍÀº ¼Ò½º¿Í´Â »ó°ü¾ø´Â ¹®Á¦ÀϵíÇÏ¿´´Âµ¥ 4.4, 4.3 µð·ºÅ丮¿¡¼­ 4 °¡ 4.4 ·Î ½Éº¼¸¯ ¸µÅ©°¡ µÇ¾îÀÖ¾ú´Ù. releasever °¡ 4·Î µÇ¾îÀÖ´Â µíÇÏ¿´´Ù. ÀÌ·¸°Ô ½Éº¼¸¯ ¸µÅ©¸¦ °É¾îÁÖ°í ³ª¼­´Â Á¤»óÀûÀ¸·Î ¾÷µ¥ÀÌÆ®°¡ µÇ¾ú´Ù. {{{ # ls -alF ÇÕ°è 20 drwxr-xr-x 4 root root 4096 9¿ù 27 19:36 ./ drwxr-xr-x 3 root root 4096 9¿ù 27 19:26 ../ lrwxrwxrwx 1 root root 3 9¿ù 27 19:36 4 -> 4.4/ drwxr-xr-x 4 root root 4096 9¿ù 26 20:43 4.3/ drwxr-xr-x 4 root root 4096 9¿ù 27 16:15 4.4/ -rw-r--r-- 1 root root 1795 2¿ù 27 2005 RPM-GPG-KEY-centos4 }}} ÁÖ±âÀûÀ¸·Î cron À¸·Î os ¹× ¾÷µ¥ÀÌÆ®¸¦ µ¿±âÈ­ÇÏ°í ³»ºÎÀûÀ¸·Î ÀÌ »çÀÌÆ®¸¦ ÀÌ¿ëÇÏ¿© ¼³Ä¡ ¹× º¸¾È¾÷µ¥ÀÌÆ®¸¦ ÀÌ¿ëÇÏ¸é ºÒÇÊ¿äÇÑ Æ®·¡ÇÈÀ» ÁÙÀÌ°í ¼Óµµµµ °³¼±ÀÌ µÉ °ÍÀÌ´Ù. === º°µµÀÇ ÀúÀå¼Ò »ý¼ºÇϱâ === ¿¹Àü yum-arch °¡ Çß´ø ¿ªÇÒÀÌ createrepo ·Î ¹Ù²î¾ú´Ù. yum-arch °¡ ÇÏ´Â ÀÏÀº µð·ºÅ丮¿¡ µé¾îÀÖ´Â rpmÀ» °£Ã߸®°í °¢°¢ÀÇ rpmÀ» À§ÇÑ Çì´õ¸¦ ¸¸µé¾î³½´Ù. ÇØ´ç µð·ºÅ丮¿¡ headers ¶ó´Â µð·ºÅ丮°¡ ÀÌ¿¡ ÇØ´çÇÑ´Ù. ±×·±µ¥ ¾ðÁ¦ºÎÅÍÀÎÁö´Â ¸ð¸£Áö¸¸ cent os 4.4 ÇöÀç´Â headers ¶ó´Â µð·ºÅ丮¸¦ ¾²Áö ¾Ê°í repodata ¸¦ ÀÌ¿ëÇÑ´Ù. ±×·¡¼­ yum-arch ¸¦ ½ÇÇàÇÏ¸é ´ÙÀ½ ¸Þ½ÃÁö°¡ ³ª¿Â´Ù. {{{ THIS PROGRAM IS DEPRECATED! You should be generating xml metadata instead. Please see http://linux.duke.edu/metadata }}} ÇöÀç´Â createrepo ¶ó´Â ÇÁ·Î±×·¥À» ÀÌ¿ëÇÏ¿© xml ÇüÅ·Πrpm Á¤º¸¸¦ ¸¸µé¾î³½´Ù. createrepo ÇÁ·Î±×·¥À» ÀÌ¿ëÇÏ¿© ¿øÇÏ´Â µð·ºÅ丮¿¡¼­ ½ÇÇàÀ» Çϸé repodata ¶õ µð·ºÅ丮°¡ »ý±â¸é¼­ Á¤º¸°¡ »ý±ä´Ù. http://linux.duke.edu/projects/metadata/ {{{ # yum-arch /data/centos/joon/i386 }}} ¸í·É½ÇÇàÈÄ /data/centos/joon/i386/headers µð·ºÅ丮¸¦ »ý¼ºÇÑ´Ù. ÀÌÁ¦ createrepo ÇÁ·Î±×·¥¿¡ ´ëÇØ ¾Ë¾Æº¸ÀÚ. ¸ÕÀú createrepo ÇÁ·Î±×·¥À» ¼³Ä¡ÇÑ´Ù. {{{ # yum -y install createrepo }}} createrepo ÇÁ·Î±×·¥À» ÀÌ¿ëÇÏ¿© rpm Á¤º¸¸¦ ¸¸µç´Ù. {{{ # createrepo /data/centos/joon/i386 [root@mytest i386]# ls repodata/ filelists.xml.gz other.xml.gz primary.xml.gz repomd.xml }}} headers ¶ó´Â µð·ºÅ丮´Â ½ÇÁ¦ ¾ø¾îµµ µÇ´Â µð·ºÅ丮¶ó º¼ ¼ö ÀÖ´Ù. yum install µîÀ» Çϸé À̶§ repodata ¿¡¼­ ÆÐÅ°Áö Á¤º¸¸¦ Àо Àڱ⠷ÎÄÃÀÇ /var/cache/yum ÀÇ ÇØ´çÇÏ´Â Ç׸ñ¿¡ headers ¸¦ »ý¼ºÇÏ´Â °ÍÀÌ´Ù. À§¿¡¼­ ¸¸µç ÀúÀå¼Ò¸¦ ÀÌ¿ëÇÏ·Á¸é Ŭ¶óÀ̾ðÆ®ÀÇ /etc/yum.repos.d ÀÇ ·¹Æ÷ÁöÅ丮 ¼³Á¤ÆÄÀÏÀ» ¼öÁ¤ÇØ¾ß ÇÑ´Ù. ±âº»ÆÄÀϸíÀº CentOS-Base.repo ÀÌÁö¸¸ ´Ù¸¥ ÆÄÀϸíÀ¸·Î ¹Ù²Ù¾îµµ »ó°ü¾ø´Ù. {{{ [joon] name=CentOS-joon baseurl=http://cent.tunelinux.pe.kr/centos/joon/i386 gpgcheck=0 enabled=1 }}} ¸¸¾à ÀúÀå¼Ò(rpm ÀÖ´Â yum ¼­¹ö)¿¡¼­ ÆÐÅ°Áö º¯°æÀÌ »ý±ä °æ¿ì¿¡´Â rpm ÀúÀå¼Ò°¡ ÀÖ´Â ¼­¹ö¿¡¼­´Â createrepo ÇÁ·Î±×·¥À» ´Ù½Ã ½ÇÇàÇØÁÖ¸é µÇ´Âµ¥ ÀúÀå¼Ò¸¦ ÀÌ¿ëÇÏ·Á´Â ÂÊ¿¡¼­´Â ij½¬¸¦ Áö¿öÁÖ¾î¾ß ÇÑ´Ù. clean ¿¡¼­ packages ´Â ´Ù¿î¹ÞÀº rpmÀ» Áö¿öÁÖ°í headers ´Â ´Ù¿î¹ÞÀº Çì´õÆÄÀÏÀ» Áö¿öÁִµ¥ ÀÌ»óÇÏ°Ôµµ clean all À» ÇØ¾ß ¹Ù²ï ºÎºÐÀÌ ¹Ý¿µÀÌ µÇ¾ú´Ù. {{{ yum clean packages Eliminate any cached packages from the system. Note that packages are not automatically deleted after they are downloaded. yum clean headers Eliminate all of the files which yum uses to determine the remote availability of packages. Using this option will force yum to download all the headers the next time it is run. yum clean all Runs yum clean packages and yum clean headers as above. }}} ¹°·Ð CentOS ¹èÆ÷ÆÇ¿¡¼­´Â RPM ¸ñ·ÏÀÌ ¹Ù²ðÀÏÀÌ ¾øÁö¸¸ ÀÚüÀûÀ¸·Î ÀúÀå¼Ò¸¦ ¸¸µé¾î ¿î¿µÇÏ´Â °æ¿ì¿¡´Â ºó¹øÇÑ º¯°æÀÌ »ý±æ ¼ö°¡ ÀÖ´Ù. À̶§¹®¿¡ ÀÚü ÀúÀå¼Ò¸¦ ¸¸µé¾î ÀÌ¿ëÇÏ´Â °æ¿ì¿¡´Â °¢ yum client ¿¡¼­ ij½¬¸¦ Á¤±âÀûÀ¸·Î Áö¿öÁÖ´Â °ÍÀÌ ÇÊ¿äÇÒ °ÍÀÌ´Ù. == yum ·¹ÆÛÁöÅ丮 º°µµ »ý¼ºÇÑ ½ÇÁ¦ ³»¿ë == yum ¼­¹ö¸¦ mirror.direct.co.kr ·Î ÁöÁ¤ÇÑ °æ¿ìÀÌ´Ù. À¥¼­¹ö¿¡¼­ /var/www/html/data ¸¦ /data µð·ºÅ丮·Î ½Éº¼¸¯ ¸µÅ©½ÃŲ °æ¿ìÀÌ´Ù. centos µð·ºÅ丮´Â centos 4.4 ¿¡ ´ëÇÑ ¹Ì·¯»çÀÌÆ®·Î i386/x86_64 ¾ÆÅ°ÅØÃÄ¿¡ ´ëÇÑ os, updates ¸¦ ¹Ì·¯¸µÇÏ°í ÀÖ´Ù. samjung µð·ºÅ丮´Â ÀÚüÀûÀ¸·Î »ç¿ëÇÏ´Â rpmÀ» ¿Ã·Á³õÀº °÷À¸·Î ÇöÀç mysql 5.x ¿Í mysq 5.x¿¡ ¸ÂÃá php rpmÀ» »ç¿ëÇÏ°í ÀÖ´Ù. {{{ [root@mirrot data]# pwd /data [root@mirrot data]# tree -d . |-- centos | |-- 4 -> 4.4/ | `-- 4.4 | |-- os | | |-- i386 | | | |-- CentOS | | | | |-- RPMS | | | | `-- base | | | |-- NOTES | | | |-- headers | | | |-- images | | | | `-- pxeboot | | | |-- isolinux | | | `-- repodata | | `-- x86_64 | | |-- CentOS | | | |-- RPMS | | | `-- base | | |-- NOTES | | |-- headers | | |-- images | | | `-- pxeboot | | |-- isolinux | | `-- repodata | `-- updates | |-- i386 | | |-- RPMS | | |-- headers | | `-- repodata | `-- x86_64 | |-- RPMS | |-- headers | `-- repodata `-- samjung |-- 4 -> 4.4 `-- 4.4 |-- SRPMS |-- i386 | |-- RPMS | `-- repodata `-- x86_64 |-- RPMS `-- repodata }}} À§¿¡¼­ php, mysql 5.x ÆÐÅ°Áö´Â /data/samjung/4.4/i386 ¿¡ ÀÖ´Ù. ¿©±â¼­ ÀÌ µð·ºÅ丮¸¦ yum Ŭ¶óÀ̾ðÆ®¿¡¼­ ÀÌ¿ëÇϱâ À§Çؼ­´Â ¾Æ·¡¿Í °¥ÀÌ ¼¼ÆÃÀ» ÇÑ´Ù. RPMS_DIR=/data/samjung/4.4 # /usr/bin/createrepo $RPMS_DIR/i386/ /data/samjung/4.4/i386/repodata ´Â rpm Á¤º¸¿¡ ´ëÇÑ ¸ÞŸµð·ºÅäÀÌ´Ù. ÀÌÁ¦ ¾Æ·¡¿Í °°ÀÌ Çؼ­ yum client ¿¡¼­ »ç¿ëÀ» ÇÏ¸é µÈ´Ù. ÁÖ¸ñÇÒ ¿É¼ÇÀº ¾Æ·¡¿Í °°´Ù. baseurl À» ¿©·¯°³ ÁöÁ¤ÇßÀ¸¸ç failovermethod=priority ·Î Çصθé baseurl¿¡ ÁöÁ¤ÇÑ ¼ø¼­´ë·Î ¼­¹ö¸¦ ã´Â´Ù. ±âº»Àº randomÀÌ´Ù. base, update ¿¡¼­ exclude ¸¦ ÁöÁ¤ÇÏ¿© mysql, php ´Â samjung repository ¿¡¼­ ÀÌ¿ëÇϵµ·Ï Çصξú´Ù. {{{ [root@localhost yum.repos.d]# cat /etc/yum.repos.d/samjung.repo [base] name=CentOS-$releasever - Base baseurl=http://mirror.direct.co.kr/centos/$releasever/os/$basearch/ http://mirror.secuidc.com/centos/$releasever/os/$basearch/ http://mirror.tini4u.net/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 failovermethod=priority exclude=MySQL* mysql* php* #released updates [update] name=CentOS-$releasever - Updates baseurl=http://mirror.direct.co.kr/centos/$releasever/updates/$basearch/ http://mirror.secuidc.com/centos/$releasever/updates/$basearch/ http://mirror.tini4u.net/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 failovermethod=priority exclude=MySQL* mysql* php* [samjung] name=CentOS-samjung baseurl=http://mirror.direct.co.kr/samjung/$releasever/$basearch/ gpgcheck=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 enabled=1 }}} See also: [Yum-HOWTO]