Tuesday, August 13, 2013

yum setup on RHEL 6 and samba installation

Here are the quick steps:

mkdir -p  /var/OSimage/RHEL_6
 mount -o loop /ISO/rhel-server-6.4-x86_64-dvd.iso  /var/OSimage/RHEL_6

To make sure that the iso is mounted after each reboot make it permanent in the fstab file:

[root@RHEL-6 ~]# cat /etc/fstab

/ISO/rhel-server-6.4-x86_64-dvd.iso             /var/OSimage/RHEL_6 loop         defaults 0 0

Create a file:

vi /etc/yum.repos.d/rhel6.repo

[RHEL-6]
name=RedHat nterprise Linux 6
baseurl=file:///var/OSimage/RHEL_6
enabled=1
gpgcheck=0

save and exit

1 means enabled 0 means disabled. Here we are enabling the file:///var/OSimage/RHEL_6 as a yum repository.

Now run following two commands:

1. yum clean all
2. yum repolist

[root@RHEL-6 ~]# yum clean all
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: RHEL-6
Cleaning up Everything

[root@RHEL-6 ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Bad id for repo: Raj's ISO Repository, byte = ' 3
RHEL-6                                                                                                                                                           | 3.9 kB     00:00 ...
RHEL-6/primary_db                                                                                                                                                | 3.1 MB     00:00 ...
repo id                                                                         repo name                                                                                         status
RHEL-6                                                                          RedHat nterprise Linux 6                                                                          3,648
repolist: 3,648

To test I installed samba - It will resolve the dependencies on ots own.

[root@RHEL-6 ~]# yum install samba
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Bad id for repo: Raj's ISO Repository, byte = ' 3
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package samba.x86_64 0:3.6.9-151.el6 will be installed
--> Processing Dependency: samba-winbind-clients = 3.6.9-151.el6 for package: samba-3.6.9-151.el6.x86_64
--> Processing Dependency: samba-common = 3.6.9-151.el6 for package: samba-3.6.9-151.el6.x86_64
--> Processing Dependency: libwbclient.so.0()(64bit) for package: samba-3.6.9-151.el6.x86_64
--> Running transaction check
---> Package samba-common.x86_64 0:3.6.9-151.el6 will be installed
---> Package samba-winbind-clients.x86_64 0:3.6.9-151.el6 will be installed
--> Processing Dependency: samba-winbind = 3.6.9-151.el6 for package: samba-winbind-clients-3.6.9-151.el6.x86_64
--> Running transaction check
---> Package samba-winbind.x86_64 0:3.6.9-151.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================================
 Package                                              Arch                                  Version                                         Repository                             Size
========================================================================================================================================================================================
Installing:
 samba                                                x86_64                                3.6.9-151.el6                                   RHEL-6                                5.0 M
Installing for dependencies:
 samba-common                                         x86_64                                3.6.9-151.el6                                   RHEL-6                                 10 M
 samba-winbind                                        x86_64                                3.6.9-151.el6                                   RHEL-6                                2.2 M
 samba-winbind-clients                                x86_64                                3.6.9-151.el6                                   RHEL-6                                2.0 M

Transaction Summary
========================================================================================================================================================================================
Install       4 Package(s)

Total download size: 19 M
Installed size: 68 M
Is this ok [y/N]: y
Downloading Packages:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                    24 MB/s |  19 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : samba-winbind-3.6.9-151.el6.x86_64                                                                                                                                   1/4
  Installing : samba-winbind-clients-3.6.9-151.el6.x86_64                                                                                                                           2/4
  Installing : samba-common-3.6.9-151.el6.x86_64                                                                                                                                    3/4
  Installing : samba-3.6.9-151.el6.x86_64                                                                                                                                           4/4
RHEL-6/productid                                                                                                                                                 | 1.7 kB     00:00 ...
  Verifying  : samba-winbind-clients-3.6.9-151.el6.x86_64                                                                                                                           1/4
  Verifying  : samba-winbind-3.6.9-151.el6.x86_64                                                                                                                                   2/4
  Verifying  : samba-3.6.9-151.el6.x86_64                                                                                                                                           3/4
  Verifying  : samba-common-3.6.9-151.el6.x86_64                                                                                                                                    4/4

Installed:
  samba.x86_64 0:3.6.9-151.el6

Dependency Installed:
  samba-common.x86_64 0:3.6.9-151.el6                      samba-winbind.x86_64 0:3.6.9-151.el6                      samba-winbind-clients.x86_64 0:3.6.9-151.el6

Complete!
[root@RHEL-6 ~]# rpm -qa | grep -i samba
samba-common-3.6.9-151.el6.x86_64
samba-winbind-3.6.9-151.el6.x86_64
samba-winbind-clients-3.6.9-151.el6.x86_64
samba-3.6.9-151.el6.x86_64










No comments: