I had trouble getting several things to work, and configuring yum would make it much, much easier. So, I found this article and figured it was time to give it a try.
All of this is done in the terminal window, and so, I will go skimpy on the screenshots for this post.
Uninstalling Yum
The article mentions removing yum. This made me a little worried, but I exported it nonetheless.
The following command will display the yum installed packages:
[pshr@hrdmosys ~]$ rpm -qa | grep yum
yum-metadata-parser-1.1.2-2.el5
yum-3.2.8-9.el5
yum-updatesd-0.9-2.el5
yum-security-1.1.10-9.el5
Removing yum makes me wary, and so, I ran a test uninstall first and found that it was not as simple as removing just yum. Several other packages depend on yum.
[pshr@hrdmosys ~]$ rpm -e --test `rpm -qa | grep yum`
error: Failed dependencies:
yum-metadata-parser is needed by (installed) createrepo-0.4.11-3.el5.noarch
yum >= 3.2.5-2 is needed by (installed) pirut-1.3.28-13.0.1.el5.noarch
yum is needed by (installed) system-config-kickstart-2.6.19.6-1.0.1.el5.noarch
yum >= 2.9.2 is needed by (installed) anaconda-11.1.2.113-1.0.1.i386
Then, I noticed that the yum version in the CentOS repository is the same version as what I have installed. So, I decided to skip the uninstall and reinstall process.
Creating the Repository
sudo vi /etc/yum.repos.d/CentOS-Base.repo
or
sudo gedit /etc/yum.repos.d/CentOS-Base.repo
Place this in the file:
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos-5
priority=1
protect=1
enabled=1
[update]
name=CentOS-$releasever – Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos-5
priority=1
protect=1
enabled=1
[addons]
name=CentOS-$releasever – Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos-5
priority=1
protect=1
enabled=1
[extras]
name=CentOS-$releasever – Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos-5
priority=1
protect=1
enabled=1
[centosplus]
name=CentOS-$releasever – Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos-5
priority=2
protect=1
Now, here is the Repository List:
[pshr@hrdmosys ~]$ yum repolist
Loading "security" plugin
repo id repo name status
addons CentOS-5 - Addons enabled
base CentOS-5 - Base enabled
centosplus CentOS-5 - Plus enabled
extras CentOS-5 - Extras enabled
update CentOS-5 - Updates enabled
Then, update with
sudo yum update
Enterprise-Release issue
When I did the yum update I got this issue:
Error: Missing Dependency: enterprise-release is needed by package up2date
I did a few queries to find out more about the enterprise-release package:
[pshr@hrdmosys ~]$ rpm -q --whatrequires enterprise-release
up2date-5.10.1-41.8.el5
[pshr@hrdmosys ~]$ rpm -q --whatprovides enterprise-release
enterprise-release-5-0.0.9
[pshr@hrdmosys ~]$ man rpm
[pshr@hrdmosys ~]$ rpm -q --whatprovides enterprise-release --provides
config(enterprise-release) = 6:5-0.0.9
redhat-release
enterprise-release = 6:5-0.0.9
[pshr@hrdmosys ~]$ rpm -q --whatprovides enterprise-release --requires
/bin/sh
config(enterprise-release) = 6:5-0.0.9
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
I also checked on the up2date package. Here is what it provides:
[pshr@hrdmosys ~]$ rpm -q --whatprovides up2date --provides
config(up2date) = 5.10.1-41.8.el5
dmimodule.so
up2date = 5.10.1-41.8.el5
Here is what it requires:
[pshr@hrdmosys ~]$ rpm -q --whatprovides up2date --requires
/bin/bash
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/sbin/chkconfig
/usr/bin/env
/usr/bin/python
anaconda
anaconda-runtime
config(up2date) = 5.10.1-41.8.el5
e2fsprogs
enterprise-release
gnupg
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.1.3)
libxml2-python
mkinitrd >= 3.2.2
newt
oracle-logos
perl
pirut
policycoreutils >= 1.18.1-4.9
python >= 2.2.2
python(abi) = 2.4
python-optik
rhnlib >= 1.8.7
rhpl >= 0.194.1-1.0.1
rpm >= 4.2.3-24_nonptl
rpm-python
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)
sh-utils
system-config-kickstart
I don’t know what the solution is here. If you have any ideas, please let me know.
Installing Samba
Here is what the repository contains:
[pshr@hrdmosys ~]$ yum list | grep -i smb
gnome-vfs2-smb.i386 2.16.2-4.el5 installed
pam_smb.i386 1.1.7-7.2.1 installed
[pshr@hrdmosys ~]$ yum list | grep -i samba
samba-client.i386 3.0.28-0.el5.8 installed
samba-common.i386 3.0.28-0.el5.8 installed
samba.i386 3.0.28-1.el5_2.1 update
samba-client.i386 3.0.28-1.el5_2.1 update
samba-common.i386 3.0.28-1.el5_2.1 update
samba-swat.i386 3.0.28-1.el5_2.1 update
sblim-cmpi-samba.i386 0.5.2-31.el5 base
sblim-cmpi-samba-devel.i386 1-31.el5 base
sblim-cmpi-samba-test.i386 1-31.el5 base
system-config-samba.noarch 1.2.39-1.el5 base
Then, I installed the graphical configuration tool to make this easier.
sudo yum install system-config-samba
This installed the other programs as well:
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
system-config-samba noarch 1.2.39-1.el5 base 263 k
Updating:
samba-common i386 3.0.28-1.el5_2.1 update 8.7 M
Installing for dependencies:
samba i386 3.0.28-1.el5_2.1 update 16 M
Updating for dependencies:
samba-client i386 3.0.28-1.el5_2.1 update 4.9 M
Transaction Summary
=============================================================================
Install 2 Package(s)
Update 2 Package(s)
Remove 0 Package(s)
I did get this error message:
GPG key retrieval failed: [Errno 14] HTTP Error 404: Not Found
I didn’t take the time to troubleshoot it. I just wanted it installed, and so, I used the command
sudo yum install system-config-samba --nogpgcheck
Now, I can use the command system-config-samba to configure samba. Also, I can start the samba services with:
sudo /sbin/service smb start
Resources