* 솔라리스에서 처음으로 개발하다보니 솔라리스 환경에 적응 하기가 어려워 고민하다가 우연히 좋은 사이트를 찾았다.^^
1. Solaris 10 다운로드
http://kr.sun.com/software/solaris/ 여기서 다운로드를 누르고 회원가입후 로그인해서 다운가능
현재 버젼은 Solaris 10 10/08 버젼이다.
2. Solaris 10 설치
이건 다른 블로그들 참조... (그렇게 어렵진 않아요...)
3. SSH 설정 - root 접근 허용 설정(개인적으로 root로 작업하는걸 좋아해서..)
#vi /etc/ssh/sshd_config
(132번줄) PermitRootLogin no -> PermitRootLogin yes
#svcadm disable ssh
#svcadm enable ssh
4. root 유저 기본 쉘 설정
#vi /etc/passwd
root:x:0:0:Super-User:/export/home/root:/usr/bin/bash <-각자 환경에 맞게 홈디렉토리나 등등 설정
5. Coreutils / vim 설치
http://www.sunfreeware.com 에서 자신에 CPU 타입에 맞게 린크 접속
coreutils-6.4-sol10-XXXXX-local.gz / vim-7.2-sol10-XXXX-local.gz 다운로드
및 서버에 업로드 (의존성 걸린 프로그램 있으면 전부 다운로드 및 업로드)
#gzip -d coreutils-6.4-sol10-XXXXX-local.gz
#pkgadd -d coreutils-6.4-sol10-XXXXX-local
#gzip -d vim-7.2-sol10-XXXX-local.gz
#pkgadd -d vim-7.2-sol10-XXXX-local
6. bash 관련 설정파일 생성
##################################################################
~/.bashrc
##################################################################
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
##################################################################
##################################################################
~/.bash_profile
##################################################################
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
MAIL=/usr/mail/${LOGNAME:?}
PATH=/usr/local/bin:/usr/ccs/bin:$PATH
export PATH
##################################################################
##################################################################
/etc/bashrc
##################################################################
if [ "$TERM" = "xterm" ]
then
alias ls='/usr/local/bin/ls --color'
alias grep='/usr/local/bin/grep --color'
alias egrep='/usr/local/bin/egrep --color'
alias vi='vim'
else
alias ls='/usr/local/bin/ls'
alias grep='/usr/local/bin/grep'
alias egrep='/usr/local/bin/egrep'
fi
if [ "$PS1" ]; then
if [ "x`tput kbs`" != "x" ]; then # We can't do this with "dumb" terminal
stty erase `tput kbs`
fi
case $TERM in
xterm*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}
@${HOSTNAME}: ${PWD}\007"'
;;
vt100*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}
@${HOSTNAME}: ${PWD}\007"'
;;
*)
;;
esac
PS1="[\u@\h \W]\\$ "
if [ "x$SHLVL" != "x1" ]; then # We're not a login shell
for i in /etc/profile.d/*.sh; do
if [ -x $i ]; then
. $i
fi
done
fi
fi
##################################################################
7. vim 관련 설정
##################################################################
~/.vimrc 및 /etc/vimrc
##################################################################
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=utf-8,latin1
endif
set nocompatible " Use Vim defaults (much better!)
set bs=indent,eol,start " allow backspacing over everything in insert mode
"set ai " always set autoindenting on
"set backup " keep a backup file
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
" Only do this part when compiled with support for autocommands
if has("autocmd")
" In text files, always limit the width of text to 78 characters
autocmd BufRead *.txt set tw=78
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal! g'\"" |
\ endif
endif
if has("cscope") && filereadable("/usr/bin/cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
if &term=="xterm"
set t_Co=8
set t_Sb=^[[4%dm
set t_Sf=^[[3%dm
endif
##################################################################
8. 설정이 새로운 유저에게도 적용되도록 설정파일 복사
#cp ~/.bashrc /etc/skel/.bashrc
#cp ~/.bash_profile /etc/skel/.bash_profile
#cp ~/.vimrc /etc/skel/.vimrc
위 설정에 <tab> 자동완성 및 vim 을 통하여 컬러설정 ls 시 컬러설정까지 포함되어있다.
사실 솔라리스만 딱 깔고났을때는 너무나 익숙했던 것들이 전부 달라서....
쉘상에서 화살표키를 사용할때나 vi 에서 키이동이나.. 등등... 그게 너무 불편했기에....
이제 새롭게 터미널을 접속해보면... 짜잔~ 거의 흡사하게 리눅스시스템과 비슷하다고
느낄수 있을것이다..^^
'솔라리스/리눅스' 카테고리의 다른 글
SVM(Solaris Volume Manager) 간단 정리 (0) | 2011.11.29 |
---|---|
Solaris 10 hostname 변경 (0) | 2011.11.24 |
IPMP: IP Multipathing(랜카드 이중화) Solaris (0) | 2011.11.14 |
prstat manpage (0) | 2011.10.12 |
What is NLWP on Solaris? (0) | 2011.10.12 |