Friday, December 7, 2012

Solaris 10: Vim and MC - Can't live without it

Installing Vim:
1. Unzip all packages needed:
# gunzip libgcc-3.4.6-sol10-sparc-local.gz
# gunzip glib-1.2.10-sol10-sparc-local.gz
# gunzip gtk+-1.2.10-sol10-sparc-local.gz
# gunzip ncurses-5.7-sol10-sparc-local.gz
# gunzip libiconv-1.11-sol10-sparc-local.gz
# gunzip libintl-3.4.0-sol10-sparc-local.gz
# gunzip vim-7.2-sol10-sparc-local.gz


2. Unset LD_LIBRARY_PATH if available. Save the value first to file, then restore at the end of steps.
  # echo $LD_LIBRARY_PATH > /tmp/vim/ld_path_file
    At the end of steps:
  # export LD_LIBRARY_PATH=`cat /tmp/vim/ld_path_file`
3. Run the following commands in given sequence, Sequence must be followed otherwise installation may fail. Provide your inputs at the prompt during package installation (you can simply accept the defaults):
     # pkgadd -d libgcc-3.4.6-sol10-sparc-local
  # pkgadd -d glib-1.2.10-sol10-sparc-local
  # pkgadd -d gtk+-1.2.10-sol10-sparc-local
  # pkgadd -d ncurses-5.7-sol10-sparc-local
  # pkgadd -d libiconv-1.11-sol10-sparc-local
  # pkgadd -d libintl-3.4.0-sol10-sparc-local
  # pkgadd -d vim-7.2-sol10-sparc-local
4. Add following line to your .vimrc:
  set number
  set term=xterm-color
  syntax on
  colorscheme elflord
  set expandtab sw=4 ts=4 sts=4
  set backspace=2 " make backspace work like most other apps
  set backspace=indent,eol,start


Installing MC:
1. Unzip all packages needed;
     # gunzip slang-2.2.4-sol10-sparc-local.gz
  # gunzip mc-4.6.1-sol10-sparc-local.gz
2. Install packages:
     # pkgadd -d slang-2.2.4-sol10-sparc-local
  # pkgadd -d mc-4.6.1-sol10-sparc-local
3. Add following lines in .bash_profile:
  alias mc='/usr/bin/env TERM=xterm-color mc'
  alias mcedit='/usr/bin/env TERM=xterm-color mcedit'

Extra - Coloring Bash:
1. Unzip then install packages needed:
  # pkgadd -d gmp-4.2.1-sol10-sparc-local
  # pkgadd -d coreutils-8.19-sol10-sparc-local
2. Add following line in .bash_profile:
  alias ls='/usr/local/bin/ls --color=auto --group-directories-first'
  #export PS1="\n\u@\h:\w\n\! $> "
  export PS1="\e[1;32m\n\u@\h\e[m:\e[1;34m\w\e[m$ "

References:
http://vim.wikia.com/wiki/Installing_on_Solaris,
http://themattreid.com/wordpress/2010/04/26/how-to-get-colored-output-from-ls-on-solaris10/,
http://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/

0 comments:

Post a Comment