HOWTO install Cygwin

Cygwin is a Unix-like environment for windows.
It can be obtained from: www.cygwin.com

Below are notes on how to install and setup cygwin for access to group computers.


Installation Notes:

  1. Download setup.exe   from www.cygwin.com.

  2. Run application from your local harddrive.

  3. Chose next on first screen.

  4. Select "Install from Internet" and click next.



  5. Enter preferred installation (Root) directory and click next.



  6. Enter a temporary installation directory and click next.



  7. Select "Direct Connection" and click next.



  8. Select a download site and click next. 
    (Any site that you can connect to is fine. Some sites are more stable and/or faster than others. Try to pick one that works for you.)



  9. Select the packages you want to install and click next.
    Packages you may want to install include:
    • opennssh
    • keychain (for ssh key pairs)
    • gv
    • ghostscript
    • emacs
    • vi
    • grace
    • tcsh
    • gnu compilers
    • tetex
    • aspell
    • gnuplot
    • rsync



    Please note sometimes you may get a download incomplete and the setup application will return to step 8. Simply select another server and continue the installation process. 

  10. Once the installation is complete, click Finish and continue with the Setup section. 
    DO NOT RESTART AT THIS TIME!


Setup Notes:



  1. Setup Windows Environment Variables:
  • Open your System Control Panel:Select [start]->Control Panel->System



  • Select "Environmental Variables" under the "Advanced" tab of the "System Properties" Control Panel.



  • In the Environmental variables window select new under "Variables for User" window.



    Edit "User Variable" as follows:
    Variable name: HOME
    Variable value: Path to where you want your home directory
    e.g. C:\Documents and Settings\User\My Documents\username

  • In the Environmental variables window select Path under "System Variables" window.



    Edit "System variable" as follows:
    Append "; C:\cygwin\bin" to Variable value: (semicolon is very important)



  • Select "Ok" to close both "Environmental Variables" and "System Properties" windows.

Setup and configuring cygwin files.
  1. Edit the passwd file.
    On your harddisk navigate to the passwd file.
  • For a standard install this should be under C:\cygwin\etc\
  • Right click on the passwd file, select open and then choose notebad to edit the file.

  • Edit the last line of the file as following:
    username:unused_by_nt/2000/xp:1004:513:U-DEBBIE\User,S-1-5-21-1177238915-1935655697-854245398-1004:/cygdrive/c/Documents and Settings/User/My Documents/username:/usr/bin/tcsh
  • Save the file once you've completed the edit.

Edit the startxwin.bat file.
Next on your harddisk navigate to the startxwin.bat (you may just see starxwin if you don't allow windows to show file extensions) file.
  • For a standard install this should be under C:\cygwin\usr\X11R6\bin
  • If you want to change your default shell to tcsh instead of bash right click on the starxwin.bat file and select edit to edit this file.

  • Use your favourite windows text editor for this purpose (e.g. notepad)

  • Edit the line:
    run xterm /bin/bash
    to read:
    run xterm -geometry 100x32 -sb -rightbar -e /usr/bin/tcsh -l

  • save the file, restart windows and then start X-windows by double clicking on the startxwin.bat file(you may want to make a shortcut to this file for future use).

  • "ssh -X" can be used to log into mail.sas and then "ssh -X" to our group machines and this will allow you to tunnel X-windows through ssh.

你可能感兴趣的:(运维,操作系统,shell)