2012-01-08

Cygwin 설치 및 환경구성

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 Directory 에 C:\cygwin_pkg 입력
  • Select Your Internet Connection 에서 Direct Connection 선택
  • Choose A Download Site 에서 http://ftp.jaist.ac.jp 선택
  • Select Packages 에서 curl, wget, patch 선택 → 설치완료
  • 환경변수 PATH 에 C:\cygwin;C:\cygwin\bin 추가
  • 환경변수 CYGWIN_HOME 에 C:\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