Wednesday, August 21, 2013

Add CentOS6 Repo to Amazon AMI

Step 1, add centos.repo to /etc/yum.repos.d
[base]
name=CentOS-6 - Base
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=i386&repo=os
#baseurl=http://mirror.centos.org/centos/6/os/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#released updates
#[updates]
name=CentOS-6 - Updates
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=i386&repo=updates
#baseurl=http://mirror.centos.org/centos/6/updates/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-6 - Extras
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=i386&repo=extras
#baseurl=http://mirror.centos.org/centos/6/extras/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 - Plus
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=i386&repo=centosplus
#baseurl=http://mirror.centos.org/centos/6/centosplus/i386/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-6 - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=i386&repo=contrib
#baseurl=http://mirror.centos.org/centos/6/contrib/i386/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

Step 2,
sudo rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

No comments:

Post a Comment