版本信息:
uname -a
Linux localhost.localdomain 2.6.32-131.0.15.el6.x86_64 #1 SMP Tue May 10 15:42:40 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/issue
Red Hat Enterprise Linux Server release 6.1 (Santiago)
Kernel \r on an \m
- 在网上找了一些~/.vimrc文件,写入~/.vimrc文件,用source ~./.vimrc生效。
再通过vim编辑时会提示错误
Error detected while processing /root/.vimrc:
line 9:
E492: Not an editor command: Plugin ‘VundleVim/Vundle.vim‘
line 13:
E492: Not an editor command: Plugin ‘tpope/vim-fugitive‘
line 17:
E492: Not an editor command: Plugin ‘git://git.wincent.com/command-t.git‘
line 20:
E492: Not an editor command: Plugin ‘file:///home/gmarik/path/to/plugin‘
line 26:
E492: Not an editor command: Plugin ‘rstacruz/sparkup‘, {‘rtp‘: ‘vim/‘} - 查到是需要安装Vundle的插件:
安装Vundle命令:
#git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
报错没装git,继续安装git - 用yum提示搜索不到软件git,安装其他软件也一样。在网上查知需要配置yum源,于是找了RHEL6 配置yum源的方法:
a. 删除本地已安装的yum
#rpm -aq|grep yum|xargs rpm -e --nodeps
b. 下载了相应rpm包
python-iniparse-0.3.1-2.1.el6.noarch.rpm
python-urlgrabber-3.9.1-11.el6.noarch.rpm
yum-3.2.29-81.el6.centos.noarch.rpm
yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
rpm包是在163镜像上下载:
http://mirrors.163.com/centos/6/os/x86_64/Packages/
命令:#wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
其他类似
c.安装下载的rpm包
#rpm -Uvh python-urlgrabber-3.9.1-11.el6.noarch.rpm #更新
#rpm -ivh yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
d. 配置yum源
cp /etc/yum.repos.d/rhel-source.repo /etc/yum.repos.d/rhel-source.repo.bak
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
#packages used/produced in the build but not released
#[addons]
#name=CentOS-$releasever - Addons
#baseurl=http://mirrors.163.com/centos/6/addons/$basearch/
#gpgcheck=1
#gpgkey=http://mirrors.163.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.163.com/centos/6./centosplus/$basearch/
gpgcheck=1
enabled=0
source /etc/yum.repos.d/rhel-source.repo 不知道有没有用
yum及源就已经安装并配置好了
- 用yum安装git,
#yum install git
#git --version
后面报错又发现还需要安装curl和curl-devel
安装curl和curl-devel后,用yum成功安装上了git,对一个新手来说不容易呀 - 安装vim的bundle插件
#git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim - vim没有报错,能够正常识别,完成!
感谢网上的资料~
原文地址:http://blog.51cto.com/tp168/2126736