본문 바로가기

OS/LINUX

CentOS에서 YUM 수행안될때

CentOS 설치 이후 yum 명령어가 수행되지 않을 때가 있다.

yum 수행 저장소(repository)를 우리나라 서버로 사용하도록 수정하면 사용이 가능하다.

아래 경로에 있는 CentOS-Base.repo 파일의 baseurl을 daumkakao의 FTP 서버로 설정한다.


파일명: /etc/yum.repos.d/CentOS-Base.repo


# CentOS-Base.repo

#

# 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://ftp.daumkakao.com/centos/$releasever/os/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6


#released updates

[updates]

name=CentOS-$releasever - Updates

#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates

baseurl=http://ftp.daumkakao.com/centos/$releasever/updates/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6


#additional packages that may be useful

[extras]

name=CentOS-$releasever - Extras

#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras

baseurl=http://ftp.daumkakao.com/centos/$releasever/extras/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6


#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://ftp.daumkakao.com/centos/$releasever/centosplus/$basearch/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6


#contrib - packages by Centos Users

[contrib]

name=CentOS-$releasever - Contrib

#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib

baseurl=http://ftp.daumkakao.com/centos/$releasever/contrib/$basearch/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6



저장한 뒤 yum list | more 명령어로 yum 명령어가 정상적으로 수행되는지 확인한다.


[root@server1 yum.repos.d]# yum list | more

Loaded plugins: refresh-packagekit, security

Installed Packages

ConsoleKit.x86_64                        0.4.1-3.el6                        @anaconda-CentOS-201303020151.x86_64/6.4

ConsoleKit-libs.x86_64                   0.4.1-3.el6                        @anaconda-CentOS-201303020151.x86_64/6.4

ConsoleKit-x11.x86_64                    0.4.1-3.el6                        @anaconda-CentOS-201303020151.x86_64/6.4

DeviceKit-power.x86_64                   014-3.el6                          @anaconda-CentOS-201303020151.x86_64/6.4

GConf2.x86_64                            2.28.0-6.el6                       @anaconda-CentOS-201303020151.x86_64/6.4

GConf2-gtk.x86_64                        2.28.0-6.el6                       @anaconda-CentOS-201303020151.x86_64/6.4

MAKEDEV.x86_64                           3.24-6.el6                         @anaconda-CentOS-201303020151.x86_64/6.4

ModemManager.x86_64                      0.4.0-3.git20100628.el6            @anaconda-CentOS-201303020151.x86_64/6.4

NetworkManager.x86_64                    1:0.8.1-43.el6                     @anaconda-CentOS-201303020151.x86_64/6.4

NetworkManager-glib.x86_64               1:0.8.1-43.el6                     @anaconda-CentOS-201303020151.x86_64/6.4

NetworkManager-gnome.x86_64              1:0.8.1-43.el6                     @anaconda-CentOS-201303020151.x86_64/6.4

ORBit2.x86_64                            2.14.17-3.2.el6_3                  @anaconda-CentOS-201303020151.x86_64/6.4

PackageKit.x86_64                        0.5.8-21.el6                       @anaconda-CentOS-201303020151.x86_64/6.4

PackageKit-device-rebind.x86_64          0.5.8-21.el6                       @anaconda-CentOS-201303020151.x86_64/6.4

PackageKit-glib.x86_64                   0.5.8-21.el6                       @anaconda-CentOS-201303020151.x86_64/6.4

PackageKit-gstreamer-plugin.x86_64       0.5.8-21.el6                       @anaconda-CentOS-201303020151.x86_64/6.4

PackageKit-gtk-module.x86_64             0.5.8-21.el6                       @anaconda-CentOS-201303020151.x86_64/6.4

PackageKit-yum.x86_64                    0.5.8-21.el6                       @anaconda-CentOS-201303020151.x86_64/6.4

PackageKit-yum-plugin.x86_64             0.5.8-21.el6                       @anaconda-CentOS-201303020151.x86_64/6.4

SDL.x86_64                               1.2.14-3.el6                       @anaconda-CentOS-201303020151.x86_64/6.4 


'OS > LINUX' 카테고리의 다른 글

SSH 접속 프롬프트 지연시 해결방법  (0) 2017.02.21