EDIT: This explains how you could have offline content of specific packages.
You could potentially do the following:
* retrieve the repo file for the files you want to retrieve
* place the repo file in /etc/yum.repos.d/ and make sure enabled=0 (otherwise your host will try to use that repo for updates)
* create an excludepkgs and includepkgs directive in your repo file
* run reposync and identify the repo you just created
* bonus: you could run createrepo (which would create the repomd.xml file and all)
* place the entire repo on some media that you can attach to your server
Repo File (I use this to ONLY grab a few asm files - not the entire repo - hence the include/exclude)
/etc/yum.repos.d/oracle.repo
~~~
[ol6_latest]
name=Oracle Linux 6 Latest (x86_64)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
exclude = *xen*
includepkgs = oracleasm*el6.x86_64 oracle-validated-* oracleasmlib* cvu* kmod-oracleasm*
excludepkgs = oracleasm-2.6*.ol6xen* oracleasm-2.6.*.ol6debug* oraclelinux-release* oracle-logos* oracle-rdbms*
includepkgorder = excludepkg,includepkg
~~~
~~~
SWBASE=/var/satellite/repos/
ARCH=x86_64
REPOID=ol6_latest
PKGDIR=${SWBASE}/${ARCH}/${REPOID}
reposync -q -n -a $ARCH --repoid=${REPOID} -p ${SWBASE}/${ARCH}/ # > /dev/null 2>&1
cd $PKGDIR
createrepo $PKGDIR
tree /var/satellite/repos/x86_64/ol6_latest/
/var/satellite/repos/x86_64/ol6_latest/
|-- getPackage
| |-- kmod-oracleasm-2.0.6.rh1-2.el6.x86_64.rpm
| `-- oracleasm-support-2.1.8-1.el6.x86_64.rpm
`-- repodata
|-- filelists.xml.gz
|-- other.xml.gz
|-- primary.xml.gz
`-- repomd.xml
~~~
I pulled this from a script that I use to do many things, but I think all the pieces are there.
You could potentially do the following:
* retrieve the repo file for the files you want to retrieve
* place the repo file in /etc/yum.repos.d/ and make sure enabled=0 (otherwise your host will try to use that repo for updates)
* create an excludepkgs and includepkgs directive in your repo file
* run reposync and identify the repo you just created
* bonus: you could run createrepo (which would create the repomd.xml file and all)
* place the entire repo on some media that you can attach to your server
Repo File (I use this to ONLY grab a few asm files - not the entire repo - hence the include/exclude)
/etc/yum.repos.d/oracle.repo
~~~
[ol6_latest]
name=Oracle Linux 6 Latest (x86_64)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
exclude = *xen*
includepkgs = oracleasm*el6.x86_64 oracle-validated-* oracleasmlib* cvu* kmod-oracleasm*
excludepkgs = oracleasm-2.6*.ol6xen* oracleasm-2.6.*.ol6debug* oraclelinux-release* oracle-logos* oracle-rdbms*
includepkgorder = excludepkg,includepkg
~~~
~~~
SWBASE=/var/satellite/repos/
ARCH=x86_64
REPOID=ol6_latest
PKGDIR=${SWBASE}/${ARCH}/${REPOID}
reposync -q -n -a $ARCH --repoid=${REPOID} -p ${SWBASE}/${ARCH}/ # > /dev/null 2>&1
cd $PKGDIR
createrepo $PKGDIR
tree /var/satellite/repos/x86_64/ol6_latest/
/var/satellite/repos/x86_64/ol6_latest/
|-- getPackage
| |-- kmod-oracleasm-2.0.6.rh1-2.el6.x86_64.rpm
| `-- oracleasm-support-2.1.8-1.el6.x86_64.rpm
`-- repodata
|-- filelists.xml.gz
|-- other.xml.gz
|-- primary.xml.gz
`-- repomd.xml
~~~
I pulled this from a script that I use to do many things, but I think all the pieces are there.
Comments
Post a Comment