Cygwin Installation Notes

1. Get Cygwin and apt-cyg
http://www.cygwin.com/
Required packages for apt-cyg

wget
bzip2
tar
git-svn

Recommended extra packages

inetutils (telnet,ftp client)
util-linux (for script command)
openssh (for ssh server)
tftp (tftp client)
tcp-wrappers (for xinetd)
xinetd (for ftp,telnet,tftp server)
luit (for character encoding)
git
expect
vim

Install apt-cyg. If the command below fails just save http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
and place it under /usr/bin and make it executable.

svn –force export http://apt-cyg.googlecode.com/svn/trunk/ /bin/
chmod +x /bin/apt-cyg

2. Configuration for Japanese Windows.
vi .inputrc

set kanji- sjis
set convert-meta off
set meta- on
set output-meta on

3. Configure Windows environment variables to use cygwin commands in Windows Powershell.
Right-click Computer, properties, Advanced system setting, environment variable
edit PATH and append the below. With Powershell, you don’t have to worry about character encodings.
;C:\cygwin\bin

4. Tuning to my preference.

vi /etc/bash.bashrc
PS1='[\u@\h \W]\$ '
alias explorer=/cygdrive/c/Windows/explorer.exe
cd

To clear banner on ssh, ftp, telnet login, do…
echo '' > /etc/motd
echo '' > /etc/defaults/etc/motd

To make blue coloured text visible on black background, do…
echo 'Blue=127,127,255' >> ~/.minttyrc
echo 'BoldBlue=191,191,255' >> ~/.minttyrc

Cygwin vim does not set vimrc by default, so place vimrc under home directory and edit to your liking.
e.g.
cp /usr/share/vim/vim74/vimrc_example.vim ~/.vimrc
colorscheme=desert

To install ssh on Cygwin, do below.
ssh-host-config
cygrunsrv.exe -S sshd

To activate ftp, tftp, telnet server, do below.
xinetd-config
vi /etc/xinetd.d/ftpd
vi /etc/xinetd.d/tfppd
vi /etc/xinetd.d/telnet
disable = no
user = username

Cygwin does not accept from outside by default, so edit below and comment all to accept from all.
vi /etc/hosts.deny
cygrunsrv -S xinetd

5. Whenever you have errors like “child info fork abort”, stop all cygwin related service and start ash.exe under bin directory, annd run /bin/rebaseall -v

6. In order to uninstall cygwin, stop and remove all cygwin services, and open regedit and search for keyword cyg and remove them. There are something like Cygnus Solution ~, and Cygwin totalling to four.

Advertisements
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: