Tag Archive for 'RedHat'

Linux VLM how to

创建和管理LVM

要创建一个LVM系统,一般需要经过以下步骤:

1、 创建分区

使用分区工具(如:fdisk等)创建LVM分区,方法和创建其他一般分区的方式是一样的,区别仅仅是LVM的分区类型为8e。

2、 创建物理卷

创建物理卷的命令为pvcreate,利用该命令将希望添加到卷组的所有分区或者磁盘创建为物理卷。将整个磁盘创建为物理卷的命令为:

1
# pvcreate /dev/hdb

将单个分区创建为物理卷的命令为:

1
# pvcreate /dev/hda5

Continue reading ‘Linux VLM how to’

RHEL AS5 通过yum update自动升级

1.下载并安装yum-2.4.0-1.centos4.noarch.rpm文件,下载地址为:

1
ftp://ftp.pbone.net/mirror/ftp.centos.org/5.0/os/i386/CentOS/yum-cron-0.1-1.el5.centos.noarch.rpm

2.修改或建立/etc/yum.repos.d/rhel-debuginfo.repo为如下内容:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[base]
name=Red Hat Enterprise Linux $releasever -Base
baseurl=http://ftp.riken.jp/Linux/caos/centos/5.0/os/$basearch/
gpgcheck=1
[update]
name=Red Hat Enterprise Linux $releasever  -Updates
baseurl=http://ftp.riken.jp/Linux/caos/centos/5.0/updates/$basearch/
gpgcheck=1
[extras]
name=Red Hat Enterprise Linux $releasever  -Extras
baseurl=http://ftp.riken.jp/Linux/caos/centos/5.0/extras/$basearch/
gpgcheck=1
[addons]
name=Red Hat Enterprise Linux $releasever -Addons
baseurl=http://ftp.riken.jp/Linux/caos/centos/5.0/addons/$basearch/
gpgcheck=1

3.修改或建立/etc/yum.repos.d/dag.repo为如下内容:

1
2
3
4
5
6
[dag]
name=Dag RPM Repository for RHEL5
baseurl=http://ftp.riken.jp/Linux/dag/redhat/el5/en/$basearch/dag/
enabled=1
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt

4.运行update:

1
yum update

5.升级:

1
yum upgrade

6.安装其它软件,例如:

1
yum install mplayer

SSH term problem

redhat rhel4SSH登录RedHat后使用一些命令出现

unknown terminal “rxvt-unicode”

是因为远程服务器 TERM 不能识别“rxvt-unicode”
$HOME/.bash_profile 中加入下面这样的(当然还有其他地方啦)就ok了。

1
2
3
4
5
export PATH
if [ "$TERM" = "rxvt-unicode" ]; then
       TERM="rxvt"
       export TERM
fi

rxvt-unicode 改为服务器识别的就是一个道理。