就是RedHat的企业版。
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]

CentOS 5 更新YUM的库

[| 不指定 2007/09/25 10:13]
去CentOS官网,找一个快点的源。
http://www.centos.org/modules/tinycontent/index.php?id=13
我觉得福建的这个挺快的。
http://mirror.be10.com/centos/
校园网
http://centos.ustc.edu.cn/centos/

一:修改yum库

[root@kook ~]# cd /etc/yum.repos.d/
[root@kook yum.repos.d]# cp CentOS-Base.repo CentOS-Base.repo.bak
[root@kook yum.repos.d]# vi CentOS-Base.repo
执行VI命令如下:
:%s/^mirrorlist/#mirrorlist/g
:%s/^#baseurl/baseurl/g
:%s/mirror.centos.org/mirror.be10.com/g


二:修改后的库文件/etc/yum.repos.d/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-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
在CentOS5 下执行config.sh时,发生僵死的现象。

查进程看到。/opt/bea/jrockit90_150_04/bin/java -Dpython.cachedir=/tmp/cachedir -Xms128m -Xmx256m -jar configwiz.jar -mode=console

奇怪为什么使用这个JDK,这个应该是Weblogic自己的吧。于是查看config.sh的脚本,追到commEnv.sh
路径是:/opt/bea/weblogic92/common/bin

在/opt/bea/weblogic92/common/bin/commEnv.sh中,找到下面

原来的:
JAVA_HOME="/opt/bea/jrockit90_150_04"
修改为:
JAVA_HOME="/opt/bea/jdk150_04"


重新执行,config.sh -mode=console 一切OK!
想来大家都知道Vi其实使用的时候都是alias到vim的。所以在vim-enhanced这个包里面是支持高亮显示的。
不说这么多废话了,如果想让root使用时候高亮显示,直接打vim就可以了。


如果你想用vi的时候就需要简单修改一下配置文件。

[kook@localhost ~]$ rpm -qa | grep vim
vim-enhanced-7.0.109-3
vim-common-7.0.109-3
vim-minimal-7.0.109-3
[kook@localhost ~]$ rpm -qc vim-enhanced
/etc/profile.d/vim.csh
/etc/profile.d/vim.sh
[kook@localhost ~]$ vi /etc/profile.d/vim.sh
if [ -n "$BASH_VERSION" -o -n "$KSH_VERSION" -o -n "$ZSH_VERSION" ]; then
 [ -x /usr/bin/id ] || return
 [ `/usr/bin/id -u` -le 100 ] && return
 # for bash and zsh, only if no alias is already set
 alias vi >/dev/null 2>&1 || alias vi=vim
fi
请自己手工注释第三行。  [ `/usr/bin/id -u` -le 100 ] && return
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]