CentOS

Redhat Enterprise Linux AS 升级 openssh 5.x

适用于 RHEL 4.x / 5.x (Redhat Enterprise Linux AS) 以及 CentOS 4.x / 5.x. 无缝平滑升级 openssh. 可远程操作(不会断开 ssh 连接). 不用修改其他系统配置. 感谢 [BigYong] 指导

1, 下载 [openssh-5.4p1.tar.gz]

wget http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-5.4p1.tar.gz

2, 解压缩 / 配置 / 编译 / 安装

tar zxvf openssh-5.4p1.tar.gz

./configure –prefix=/usr \
–sysconfdir=/etc/ssh \
–with-ssl-dir=/usr/share/ssl \
–with-zlib \
–with-pam \
–with-md5-passwords \
–with-kerberos5 \

# 编译
make

# 编译安装
make install

3, 检查 openssh 版本

ssh -V
OpenSSH_5.4p1, OpenSSL 0.9.7a Feb 19 2003

4, 重新启动 sshd 服务

/etc/init.d/sshd restart

RHEL 5.4 Add/Remove Packages 添加/删除软件包

RHEL 5.4 Add/Remove Packages 添加/删除软件包(自动处理依赖关系)

1. 设置本地光盘yum源

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

[cdrom]
enabled = 1
name = cdrom
baseurl = file:///mnt/cdrom/Server
gpgcheck = 0

注意: 如果 baseurl 只写 file:///mnt/cdrom/ 将会报错:

“No such file or directory: repomd.xml”
“Unable to retrieve software information”

因为无法找到: repomd.xml 文件

2. 配置 yum repo 配置文件

vi /usr/lib/python2.4/site-packages/yum/yumRepo.py

查找:

remote = url + ‘/’ + relative

替换:

remote = “/mnt/cdrom” + ‘/’ + relative

3. 挂载光盘 (DVD)

mount /dev/cdrom /mnt/cdrom

4. 清除 yum 缓存.更新 yum

yum clean all
yum update

5. 运行 system-config-packages 配置工具

system-config-packages

关闭 Linux UTC 同步

vi /etc/default/rcS

# off UTC syn
UTC=no

关闭 Linux System Beep 声音

vi /etc/profile

# off system beep
setterm -blength 0

CentOS yum – CentOS-Base.repo

# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.

[base]
name=CentOS-5.2 – Base
baseurl=http://mirror.be10.com/centos/5.2/os/i386
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-5.2 – Updates
baseurl=http://mirror.be10.com/centos/5.2/updates/i386
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-5.2 – Addons
baseurl=http://mirror.be10.com/centos/5.2/addons/i386
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-5.2 – Extras
baseurl=http://mirror.be10.com/centos/5.2/extras/i386
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5.2 – Plus
baseurl=http://mirror.be10.com/centos/5.2/centosplus/i386
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-CentOS-5