2010月09月16日
さくらの VPS に登録してみた(4) checkinstall, vim, zsh
CentOS 5.5 だと vim のバージョンが古いんですね。
$ vi --version
VIM - Vi IMproved 7.0 (2006 May 7, compiled Sep 19 2009 17:22:08)
Included patches: 1, 3-4, 7-9, 11, 13-17, 19-26, 29-31, 34-44, 47, 50-56, 58-64, 66-73, 75, 77-92, 94-107, 109, 202, 234-237
Modified by <bugzilla@redhat.com>
Compiled by <bugzilla@redhat.com>
Huge version without GUI. Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist
+keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse -mouseshape +mouse_dec +mouse_gpm
-mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme
-netbeans_intg -osfiletype +path_extra +perl +postscript +printer +profile
+python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent
-sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static
-tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
+wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
system vimrc file: "/etc/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -D_REENTRANT -D_GNU_SOURCE -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -I/usr/include/python2.4 -pthread
Linking: gcc -Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -L/usr/local/lib -o vim -lncurses -lselinux -lacl -lgpm -Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/auto/DynaLoader/DynaLoader.a -L/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -lperl -lresolv -lutil -lc -L/usr/lib64/python2.4/config -lpython2.4 -lutil -lm -Xlinker -export-dynamic
と、このまま使うのが無理な感じに微妙なのです。
なのでソースから入れることになるんですが、パッケージ管理は捨てたくないのでまず checkinstall を入れることにします。といっても checkinstall も CentOS のリポジトリに無いのでこちらもソースから。
ソースを落としてきて
$ cd /usr/local/src $ sudo git clone http://checkinstall.izto.org/checkinstall.git $ sudo chown -R mayu:mayu checkinstall $ cd checkinstall
普通に make, make install
$ make $ sudo make install
/usr/local/sbin に入るので、まずは checkinstall 自身を rpm 化。
$ sudo /usr/local/sbin/checkinstall
聞かれる通りに答えていくと rpm ファイルができ上がるので、rpm でインストール。
$ sudo rpm -ivh /usr/src/redhat/RPMS/x86_64/checkinstall-20100916-1.x86_64.rpm
ちゃんと入ったかな?
$ yum info checkinstall
Loaded plugins: fastestmirror
Installed Packages
Name : checkinstall
Arch : x86_64
Version : 20100916
Release : 1
Size : 94 k
Repo : installed
Summary : CheckInstall installations tracker, version 1.6.2
License : GPL
Description: CheckInstall installations tracker, version 1.6.2
:
: CheckInstall keeps track of all the files created or
: modified by your installation script ("make install"
: "make install_modules", "setup", etc), builds a
: standard binary package and installs it in your
: system giving you the ability to uninstall it with your
: distribution's standard package management utilities.
はい、よくできました!
vim
まずソースを持ってきます。download : vim online によると Mercurial をオススメされているのかな?そのまま従います。
$ sudo yum install mercurial $ cd /usr/local/src $ sudo hg clone https://vim.googlecode.com/hg/ vim $ sudo chown -R mayu:mayu vim
ruby を有効にして make, checkinstall
$ cd vim $ ./configure --enable-multibyte --with-features=huge --enable-rubyinterp --disable-selinux $ make $ sudo /usr/local/sbin/checkinstall
$ sudo rpm -ivh /usr/src/redhat/RPMS/x86_64/vim-20100916-1.x86_64.rpm
ちゃんと入ったかな?
vim --version | grep ruby
-python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent
OK!
LANG
続いて .vimrc を編集しようとして日本語が通らないことに気づきました……。
$ echo $LANG
C
きゃーw /etc/sysconfig/i18n に書き込んでおきます。
sudo vi /etc/sysconfig/i18n
LANG=ja_JP.UTF-8
zsh
zsh も 4.2.6 と古いのでこちらもソースから。……そろそろ CentOS を使い続けるのに限界感じてきました。
$ sudo wget http://downloads.sourceforge.net/project/zsh/zsh-dev/4.3.10/zsh-4.3.10.tar.bz2 $ sudo tar jxf zsh-4.3.10.tar.bz2 $ sudo chown mayu:mayu zsh-4.3.10 $ cd zsh-4.3.10 $ ./configure $ make $ sudo /usr/local/sbin/checkinstall $ sudo rpm -ivh /usr/src/redhat/RPMS/x86_64/zsh-4.3.10-1.x86_64.rpm
トラックバック - http://d.hatena.ne.jp/hi_c_mayu/20100916/1284584095
リンク元
- 277 http://pipes.yahoo.com/pipes/pipe.info?_id=tDfBdGWF3RGl9XNm1L3fcQ
- 45 http://www.socialapplication.jp/2010/09/tech/928/
- 24 http://www.google.co.jp/search?q=sakura+vps+vim&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:ja:official&hl=ja&client=firefox-a
- 18 http://www.google.co.jp/url?sa=t&rct=j&q=さくら vps vim&source=web&cd=6&ved=0CFMQFjAF&url=http://d.hatena.ne.jp/hi_c_mayu/20100916/1284584095&ei=lMqiTtKDIenXmAWBsr2bCQ&usg=AFQjCNFEQNFhfTdZH-wedP0J0QB50774AQ
- 15 http://pipes.yahoo.com/pipes/pipe.info?_id=12e453e301454b799b3ac6642aa089b5
- 15 http://webcache.googleusercontent.com/search?q=cache:_q0eSIJjocsJ:d.hatena.ne.jp/hi_c_mayu/20100915/1284496027+rvm+ruby+unicorn+sudo&cd=2&hl=ja&ct=clnk&gl=jp&client=firefox-a
- 15 http://www.google.co.jp/search?sourceid=chrome&ie=UTF-8&q=さくらvps+vim
- 11 http://www.google.co.jp/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cts=1331346672982&ved=0CEMQFjAA&url=http://d.hatena.ne.jp/hi_c_mayu/20100916/1284584095&ei=5bxaT8ngE6T3mAXewtWqDw&usg=AFQjCNFEQNFhfTdZH-wedP0J0QB50774AQ&sig2=BkkuZFXLVOT_FzQTbe56
- 7 http://b.hatena.ne.jp/ToQoz/
- 7 http://www.google.co.jp/search?hl=ja&q=さくら+VPS+vimrc&aq=f&aqi=&aql=&oq=&gs_rfai=
