查看是否安装:
[[email protected] ~]# rpm -qa| grep vim
vim-minimal-7.2.411-1.8.el6.x86_64
vim-common-7.2.411-1.8.el6.x86_64
vim-enhanced-7.2.411-1.8.el6.x86_64
[[email protected] ~]# rpm -evim-minimal-7.2.411-1.8.el6.x86_64 vim-enhanced-7.2.411-1.8.el6.x86_64vim-common-7.2.411-1.8.el6.x86_64 --nodeps
[[email protected] ~]# rpm -aq|grep vim
注:--nodeps 选项是去掉依赖卸载,不加会报:vim-minimal is needed by (installed) sudo-1.8.6p3-15.el6.x86_64 之类的错。
II> 编译安装VIM 7.4
一、下载
[[email protected] src]# wgetftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
[[email protected] src]# wgetftp://ftp.vim.org/pub/vim/extra/vim-7.2-extra.tar.gz
[[email protected] src]# wgetftp://ftp.vim.org/pub/vim/extra/vim-7.2-lang.tar.gz
二、解压缩
[[email protected] src]# tar jxvfvim-7.4.tar.bz2
[[email protected] src]# tar zxvf vim-7.2-extra.tar.gz
[[email protected] src]# tar zxvfvim-7.2-lang.tar.gz
[[email protected] src]# mv vim72 vim74
三、安装依赖库
[[email protected] src]# yum installncurses-devel -y
四、配置confure文件
[[email protected] src]# cd vim74/src
[[email protected] src]# ./configure--with-features=huge --enable-rubyinterp --enable-pythoninterp--enable-luainterp --enable-multibyte --enable-sniff --enable-fontset --enable-cscope--enable-gui=auto --prefix=/usr --enable-xsmp--enable-xim --enable-gpm
五、编译
[[email protected] src]# make
[[email protected]]# make install
六、测试是否升级成功
[[email protected] src]# vim --version
七、增加gvim支持
[[email protected] src]# yum install vim-X11-y
八、检查是否安装成功
[[email protected] src]# rpm -qa |grep vim
vim-common-7.2.411-1.8.el6.x86_64
vim-X11-7.2.411-1.8.el6.x86_64