How strong is your server kung fu?

Error Updating Openssh-Clients

There appears to be a problem with Centos 5.2 when trying to upgrade openssh-clients to version 4.3p2-26.el5.

root@server [/usr/src]# yum update openssh-clients

Loading “protectbase” plugin
Loading “fastestmirror” plugin
Loading mirror speeds from cached hostfile
* base: mirror.sanctuaryhost.com
* updates: mirror.sanctuaryhost.com
* addons: mirrors.rit.edu
* extras: updates.interworx.info
Excluding Packages in global exclude list
Finished
0 packages excluded due to repository protections
Setting up Update Process
Resolving Dependencies
–> Running transaction check
—> Package openssh-clients.i386 0:4.3p2-26.el5 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
openssh-clients i386 4.3p2-26.el5 base 446 k

Transaction Summary
=============================================================================
Install 0 Package(s)
Update 1 Package(s)
Remove 0 Package(s)

Total download size: 446 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : openssh-clients ######################### [1/2]
Error unpacking rpm package openssh-clients – 4.3p2-26.el5.i386
error: unpacking of archive failed on file /usr/bin/ssh: cpio: rename

Updated: openssh-clients.i386 0:4.3p2-26.el5
Complete!

UPDATE: I finally figured out why Openssh was not updating.

If you lsattr /usr/bin/ssh it will probably show that the file has been modified using chattr -i -a to prevent modification.

Written by admin on July 2nd, 2008 with comments disabled.
Read more articles on Centos and Linux.

How To Check What Version of Centos You Are Using?

There are a few ways to see what version of Centos your server has installed.

Steps

1) While logged in as root, enter the following commands.

cat /etc/redhat-release

This should produce a response like this:

CentOS release 5.2 (Final)

2) Another method is to enter the following command:

rpm -qa | grep centos

This should produce results like this:

root@server [~]# rpm -qa | grep centos
procmail-3.22-17.1.el5.centos
comps-extras-11.1-1.1.el5.centos
basesystem-8.0-5.1.1.el5.centos
gdm-2.16.0-46.el5.centos
pm-utils-0.99.3-6.el5.centos.19
yum-fastestmirror-1.1.10-9.el5.centos
specspo-13-1.el5.centos
rhgb-0.16.4-8.el5.centos.1
nss-3.11.99.5-2.el5.centos
centos-release-notes-5.2-2
desktop-backgrounds-basic-2.0-40.el5.centos
anacron-2.3-45.el5.centos
pango-1.14.9-3.el5.centos
kdelibs-3.5.4-16.el5.centos
system-config-date-1.8.12-3.el5.centos.2
gnome-session-2.16.0-6.el5.centos
gnome-desktop-2.16.0-1.el5.centos.1
redhat-logos-4.9.99-8.el5.centos
redhat-artwork-5.1.0-26.el5.centos
redhat-lsb-3.1-12.3.EL.el5.centos
pirut-1.3.28-13.el5.centos
httpd-manual-2.2.3-6.el5.centos.1
filesystem-2.4.0-1.el5.centos
mod_ssl-2.2.3-6.el5.centos.1
ntp-4.2.2p1-8.el5.centos.1
nss-tools-3.11.99.5-2.el5.centos
gzip-1.3.5-10.el5.centos
busybox-1.2.0-4.el5.centos
initscripts-8.45.19.EL-1.el5.centos.1
firstboot-tui-1.4.27.3-1.el5.centos
firstboot-1.4.27.3-1.el5.centos
crash-4.0-5.0.3.el5.centos
Deployment_Guide-en-US-5.2-9.el5.centos
kdebase-3.5.4-18.el5.centos
yum-protectbase-1.1.10-9.el5.centos
xorg-x11-proto-devel-7.1-9.el5.centos
setuptool-1.19.2-1.el5.centos
centos-release-5-2.el5.centos
yum-3.2.8-9.el5.centos.2.1
bluez-utils-3.7-2.el5.centos
httpd-2.2.3-6.el5.centos.1
firefox-3.0-0.beta5.6.el5.centos

3) To check your Kernel version, you could enter this command.

uname -a

Written by admin on June 25th, 2008 with comments disabled.
Read more articles on Centos and How To.

Yum commands

Yum is word that may inspire fear in hearts of many noobie server admins because they don’t understand what it does and fear it make break their server if used.

Yum stands for “Yellow Updater, Modified” and is similar to commands apt-get and up2date in function.

Here are some common Yum commands used while you are logged in as root.

# yum upgrade
# yum update
# yum install bind

Yum usage:

yum [options] <update | upgrade | install |
info | remove | list |clean | provides |
search | check-update | groupinstall |
groupupdate | grouplist>

Yum Options
-c [config file] - specify the config file
to use

-e [error level] - set the error logging
level

-d [debug level] - set the debugging level

-y answer yes to all questions

-t be tolerant about errors in package
commands

-R [time in minutes] - set the max amount of
time to randomly run in.

-C run from cache only - do not update the cache

--installroot=[path] - set the install root
(default '/')

--version - output the version of yum

-h, --help this screen

Written by admin on June 24th, 2008 with comments disabled.
Read more articles on Centos and Linux.