升级CentOS 6.5中VIM7.2到VIM7.4
查看是否安装:
[root@localhost ~]# 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
[root@localhost ~]# 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
[root@localhost ~]# rpm -aq|grep vim
注:--nodeps 选项是去掉依赖卸载,不加会报:vim-minimal is needed by (installed) sudo-1.8.6p3-15.el6.x86_64 之类的错。
II> 编译安装VIM 7.4
一、下载
[root@localhost src]# wgetftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
[root@localhost src]# wgetftp://ftp.vim.org/pub/vim/extra/vim-7.2-extra.tar.gz
[root@localhost src]# wgetftp://ftp.vim.org/pub/vim/extra/vim-7.2-lang.tar.gz
二、解压缩
[root@localhost src]# tar jxvfvim-7.4.tar.bz2
[root@localhost src]# tar zxvf vim-7.2-extra.tar.gz
[root@localhost src]# tar zxvfvim-7.2-lang.tar.gz
[root@localhost src]# mv vim72 vim74
三、安装依赖库
[root@localhost src]# yum installncurses-devel -y
四、配置confure文件
[root@localhost src]# cd vim74/src
[root@localhost 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
五、编译
[root@localhost src]# make
[root@localhostsrc]# make install
六、测试是否升级成功
[root@localhost src]# vim --version
七、增加gvim支持
[root@localhost src]# yum install vim-X11-y
八、检查是否安装成功
[root@localhost 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