Tuesday, 4 October 2011

Yum update or Install packages from DVD

When You installed Linux (sample: Oracle Linux) from DVD and You need to use "yum" command-line to install(update) some packages from DVD. How?
- Check "createrepo" pacakge. 
[root@linuxtest ~]# rpm -qa |grep createrepo
- Mount DVD, Create repomd (xml-rpm-metadata) repository and Clean repo 
[root@linuxtest ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only

[root@linuxtest ~]# 
cd /mnt
[root@linuxtest mnt]# createrepo .

[root@linuxtest mnt]# 
yum clean all
Cleaning repos: local
Cleaning up Everything
- Create config file 
[root@linuxtest mnt]# vi /etc/yum.repos.d/iso.repo
name=Local CD Repo 

- Test 
[root@linuxtest mnt]# yum install gcc
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.i686 0:4.4.5-6.el6 will be installed
--> Processing Dependency: cpp = 4.4.5-6.el6 for package: gcc-4.4.5-6.el6.i686
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.5-6.el6.i686
--> Running transaction check
---> Package cloog-ppl.i686 0:0.15.7-1.2.el6 will be installed
--> Processing Dependency: libppl.so.7 for package: cloog-ppl-0.15.7-1.2.el6.i686
--> Processing Dependency: libppl_c.so.2 for package: cloog-ppl-0.15.7-1.2.el6.i686
---> Package cpp.i686 0:4.4.5-6.el6 will be installed
--> Processing Dependency: libmpfr.so.1 for package: cpp-4.4.5-6.el6.i686
--> Running transaction check
---> Package mpfr.i686 0:2.4.1-6.el6 will be installed
---> Package ppl.i686 0:0.10.2-11.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

Package Arch Version Repository Size
gcc i686 4.4.5-6.el6 local 8.1 M
Installing for dependencies:
cloog-ppl i686 0.15.7-1.2.el6 local 93 k
cpp i686 4.4.5-6.el6 local 3.3 M
mpfr i686 2.4.1-6.el6 local 153 k
ppl i686 0.10.2-11.el6 local 1.3 M
Transaction Summary
Install 5 Package(s)

Total download size: 13 M
Installed size: 29 M
Is this ok [y/N]: y
Downloading Packages:
Total 26 MB/s | 13 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : ppl-0.10.2-11.el6.i686 1/5
Installing : cloog-ppl-0.15.7-1.2.el6.i686 2/5
Installing : mpfr-2.4.1-6.el6.i686 3/5
Installing : cpp-4.4.5-6.el6.i686 4/5
Installing : gcc-4.4.5-6.el6.i686 5/5

gcc.i686 0:4.4.5-6.el6

Dependency Installed:
cloog-ppl.i686 0:0.15.7-1.2.el6 cpp.i686 0:4.4.5-6.el6 mpfr.i686 0:2.4.1-6.el6 ppl.i686 0:0.10.2-11.el6


No comments: