Windows 에 Cygwin 을 이용하면 Linux 와 같은 환경을 이용할 수 있어서 다행이다. 요즘에는 mintty 를 기본 터미널로 제공하여, 기존의 윈도우 cmd 의 제약을 제거하였고, apt-cyg 와 같은 툴을 설치하면, 패키지도 간단하게 설치/제거 할 수 있다. Windows 를 거의 Linux 로 사용할 수 있다. 아래와 같이 설치하면 그 맛을 볼 수 있을 것이다.
  • IE 또는 Explorer 에서 http://www.cygwin.com/setup.exe 실행
  • Choose A Download Source 에서 Install from Internet 선택
  • Select Root Install Directory 에서 기본값인 C:\cygwin 사용
  • Select Local Package DirectoryC:\cygwin_pkg 입력
  • Select Your Internet Connection 에서 Direct Connection 선택
  • Choose A Download Site 에서 http://ftp.jaist.ac.jp 선택
  • Select Packages 에서 curl, wget, patch 선택 → 설치완료
  • 환경변수 PATHC:\cygwin;C:\cygwin\bin 추가
  • 환경변수 CYGWIN_HOMEC:\cygwin 추가
  • 시작 → 실행 에서 mintty - 입력
  • .minttyrc 작성
    $ echo 'Font=NanumGothicCoding' >> ~/.minttyrc; \
    echo 'FontHeight=10' >> ~/.minttyrc; \
    echo 'CursorType=Block' >> ~/.minttyrc
    
  • apt-cyg 설치 (Patch file : enable-execute.zip)
    $ curl http://apt-cyg.googlecode.com/svn/trunk/apt-cyg > apt-cyg; \
    curl http://gauryan.ivyro.net/wiki/lib/exe/fetch.php?media=util:cygwin:enable-execute.zip > enable-execute.patch; \
    patch apt-cyg enable-execute.patch; chmod +x apt-cyg; \
    mv apt-cyg /usr/local/bin/; rm -rf enable-execute.patch; \
    apt-cyg update -m http://ftp.jaist.ac.jp/pub/cygwin
    
  • 기본 패키지 설치
    $ apt-cyg install openssh lftp python autoconf bison libtool gcc gcc-core gdb make \
    git libgdbm libgdbm-devel zlib zlib-devel openssl-devel curl rebase libncurses-devel \
    ncurses ncursesw sqlite3 libsqlite3-devel openssl openssl-devel bzip2 libbz2-devel \
    gdbm cygwin coreutils gnupg vim ctags readline wget
    




다른 사용자 계정으로 명령을 실행할 수 있는 방법이 다양하게 있는데, 그 중 가장 많이 사용되는 방법을 나열하면 아래와 같다.
$ su - 아이디 -c "명령어1; 명령어2; 명령어3"
$ sudo -u 아이디 "명령어"
$ ssh 아이디@호스트 "명령어"

위와 같은 방법으로 하면 간단하게 실행할 수 있는데, 환경변수가 제대로 먹지 않아서 실행이 안되는 경우가 있다. su, ssh 의 경우, 환경변수를 .bashrc 에 넣어두면 안되고, .profile 이나 .bash_profile 넣어야 된다.

sudo 의 경우는 환경변수 보다는 보안적인 이유로 특정 디렉토리에 있는 파일만 실행되도록 설정되어 있다. /etc/sudoers 파일을 열어서 아래와 같은 부분을 찾아서, 자신이 실행하고자 하는 파일이 존재하는 디렉토리를 포함시켜주면 된다.

Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"



'ETC > IT' 카테고리의 다른 글

more(less) ANSI Color 제대로 보여주기  (0) 2012.02.17
Cygwin 설치 및 환경구성  (0) 2012.01.08
IE9 에서 Flash 배경이 까맣게 나오는 현상 해결하기  (0) 2011.11.02
.tmux.conf  (0) 2011.11.01
USB 스틱으로 Debian 설치하기  (0) 2011.10.12

IE9에서 Flash 의 배경이 까맣게 나오는 경우가 있다. Flash의 버그라고 생각했었는데, 다른 브라우저(크롬 ,파이어폭스) 등에서는 정상적으로 나온다. 한참을 고민하고 검색을 해봐도 방법을 못찾았는데, 사무실 직원이 해결해주었다. ^^ 방법은 아래 화면처럼 인터넷 옵션고급탭을 누르고, GPU 렌더링 대신 소프트웨어 렌더링 사용 에 체크를 하고 적용하면 잘 되는 것을 확인할 수 있다. IE9에서 새로 생긴 옵션인데, 이 것이 지원이 안되는 하드웨어를 가지고 있다면, 반드시 체크하여 사용해야 하나보다.

'ETC > IT' 카테고리의 다른 글

Cygwin 설치 및 환경구성  (0) 2012.01.08
다른 계정으로 명령 실행하기  (0) 2011.12.22
.tmux.conf  (0) 2011.11.01
USB 스틱으로 Debian 설치하기  (0) 2011.10.12
FreeBSD 8.2 설치후 작업  (0) 2011.07.09
Install Tmux
# apt-get install tmux
Configure Tmux
set-option -g prefix C-a
bind-key C-a last-window
unbind % # Remove default binding since we're replacing
bind | split-window -h
bind - split-window -v
# Set status bar
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green]#H'
# Highlight active window
set-window-option -g window-status-current-bg red
set -g status-right '#[fg=yellow]#(uptime | cut -d "," -f 2-)'
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
# Automatically set window title
setw -g automatic-rename

+ Recent posts