2000-02-17 20:38:33 +01:00
|
|
|
@chapter Installation Instructions
|
|
|
|
@section Contents
|
|
|
|
|
2002-03-03 11:57:57 +01:00
|
|
|
There is only one recommended way to install Cygwin, which is to use the GUI
|
2004-03-17 18:39:44 +01:00
|
|
|
installer ``Cygwin Setup''. It is flexible and easy to use.
|
|
|
|
You can pick and choose the packages you wish to install, and update
|
|
|
|
them individually. Full source code is available for all packages and
|
|
|
|
tools. More information on using Cygwin Setup may be found at
|
|
|
|
@file{http://cygwin.com/cygwin-ug-net/setup-net.html}.
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2004-03-17 18:39:44 +01:00
|
|
|
If you do it any other way, you're on your own! That said, keep in mind
|
2000-08-25 15:15:10 +02:00
|
|
|
that the GUI installer is a "work in progress", so there might be a few
|
|
|
|
difficulties, especially if you are behind a firewall or have other
|
|
|
|
specific requirements. If something doesn't work right for you, and
|
2004-03-17 18:39:44 +01:00
|
|
|
it's not covered here or in the latest development snapshot at
|
|
|
|
@file{http://cygwin.com/setup-snapshots/}, then by all means report it to the
|
2000-08-25 15:15:10 +02:00
|
|
|
mailing list.
|
2000-06-02 19:17:53 +02:00
|
|
|
|
2004-03-17 18:39:44 +01:00
|
|
|
For a searchable list of packages that can be installed with Cygwin,
|
|
|
|
see @file{http://cygwin.com/packages/}.
|
|
|
|
|
2002-03-03 11:57:57 +01:00
|
|
|
@section Installation using ``Cygwin Setup''
|
2000-06-02 19:17:53 +02:00
|
|
|
|
2003-02-21 21:37:47 +01:00
|
|
|
The Cygwin Setup program is the @emph{only} recommended way to install
|
2004-03-17 18:39:44 +01:00
|
|
|
Cygwin.
|
2000-06-02 19:17:53 +02:00
|
|
|
|
2000-08-25 15:15:10 +02:00
|
|
|
@subsection Why not install in C:\?
|
2000-06-02 19:17:53 +02:00
|
|
|
|
2002-03-03 11:57:57 +01:00
|
|
|
The Cygwin Setup program will prompt you for a "root" directory.
|
2000-09-14 13:21:04 +02:00
|
|
|
The default is @samp{C:\cygwin}, but you can change it. You are urged not to
|
2004-03-17 18:39:44 +01:00
|
|
|
choose something like @samp{C:\} (the root directory on the system drive) for
|
2000-08-25 15:15:10 +02:00
|
|
|
your Cygwin root. If you do, then critical Cygwin system directories
|
2004-03-17 18:39:44 +01:00
|
|
|
like @samp{etc}, @samp{lib} and @samp{bin} could easily be corrupted by
|
|
|
|
other (non-Cygwin) applications or packages that use @samp{\etc},
|
|
|
|
@samp{\lib} or @samp{\bin}. Perhaps there is no conflict now, but who
|
|
|
|
knows what you might install in the future? It's also just good common
|
|
|
|
sense to segregate your Cygwin "filesystems" from the rest of your
|
|
|
|
Windows system disk.
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2002-03-03 11:57:57 +01:00
|
|
|
(In the past, there had been genuine bugs that would cause problems
|
2004-03-17 18:39:44 +01:00
|
|
|
for people who installed in @samp{C:\}, but we believe those are gone
|
|
|
|
now.)
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2004-03-17 18:39:44 +01:00
|
|
|
@subsection Can I use Cygwin Setup to get old versions of packages (like gcc-2.95)?
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2004-03-17 18:39:44 +01:00
|
|
|
Cygwin Setup can be used to install any packages that are on a
|
|
|
|
Cygwin mirror, which usually includes one version previous to the
|
|
|
|
current one. The complete list may be searched at
|
|
|
|
@file{http://cygwin.com/packages/}. There is no complete archive of
|
|
|
|
older packages. If you have a problem with the current version of
|
|
|
|
a Cygwin package, please report it to the mailing list using the
|
|
|
|
guidelines at @file{http://cygwin.com/problems.html}.
|
2002-03-03 11:57:57 +01:00
|
|
|
|
2004-03-17 18:39:44 +01:00
|
|
|
That said, if you really need an older package, you may be able to find
|
|
|
|
an outdated or archival mirror by searching the web for an old package
|
|
|
|
version (for example, @samp{gcc2-2.95.3-10-src.tar.bz2}), but keep in
|
|
|
|
mind that this older version will not be supported by the mailing list
|
|
|
|
and that installing the older version will not help improve Cygwin.
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2002-03-03 11:57:57 +01:00
|
|
|
@subsection Is Cygwin Setup, or one of the packages, infected with a virus?
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2001-09-21 22:40:50 +02:00
|
|
|
Unlikely. Unless you can confirm it, please don't report it to the
|
|
|
|
mailing list. Anti-virus products have been known to detect false
|
|
|
|
positives when extracting compressed tar archives. If this causes
|
|
|
|
problems for you, consider disabling your anti-virus software when
|
|
|
|
running @code{setup}. Read the next entry for a fairly safe way to do
|
|
|
|
this.
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2002-03-03 11:57:57 +01:00
|
|
|
@subsection My computer hangs when I run Cygwin Setup!
|
2001-09-21 22:40:50 +02:00
|
|
|
|
2002-03-03 11:57:57 +01:00
|
|
|
Both Network Associates (formerly McAfee) and Norton anti-virus
|
|
|
|
products have been reported to "hang" when extracting Cygwin tar
|
|
|
|
archives. If this happens to you, consider disabling your anti-virus
|
|
|
|
software when running Cygwin Setup. The following procedure should be
|
|
|
|
a fairly safe way to do that:
|
2001-09-21 22:40:50 +02:00
|
|
|
|
|
|
|
@enumerate
|
|
|
|
@item Download @code{setup.exe} and scan it explicitly.
|
|
|
|
|
|
|
|
@item Turn off the anti-virus software.
|
|
|
|
|
|
|
|
@item Run setup to download and extract all the tar files.
|
|
|
|
|
2002-01-24 00:53:39 +01:00
|
|
|
@item Re-activate your anti-virus software and scan everything
|
2002-07-27 00:29:38 +02:00
|
|
|
in C:\cygwin (or wherever you chose to install), or your entire hard
|
|
|
|
disk if you are paranoid.
|
2001-09-21 22:40:50 +02:00
|
|
|
|
2001-09-21 22:42:47 +02:00
|
|
|
@end enumerate
|
2001-09-21 22:40:50 +02:00
|
|
|
|
2002-03-03 11:57:57 +01:00
|
|
|
This should be safe, but only if Cygwin Setup is not substituted by
|
2002-07-27 00:29:38 +02:00
|
|
|
something malicious, and no mirror has been compromised.
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2004-09-30 07:03:52 +02:00
|
|
|
@subsection What packages should I download? Where are 'make', 'gcc', 'vi', etc?
|
2002-03-03 11:57:57 +01:00
|
|
|
When using Cygwin Setup for the first time, the default is to install
|
|
|
|
a minimal subset of packages. If you want anything beyond that, you
|
|
|
|
will have to select it explicitly. See
|
|
|
|
@file{http://cygwin.com/packages/} for a searchable list of available
|
|
|
|
packages.
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2002-01-24 01:30:25 +01:00
|
|
|
If you want to build programs, of course you'll need @samp{gcc},
|
|
|
|
@samp{binutils}, @samp{make} and probably other packages from the
|
2004-09-30 07:03:52 +02:00
|
|
|
``Devel'' category. Text editors can be found under ``Editors''.
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2002-01-24 01:30:25 +01:00
|
|
|
@subsection How do I just get everything?
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2003-04-10 22:09:35 +02:00
|
|
|
Long ago, the default was to install everything, much to the
|
|
|
|
irritation of most users. Now the default is to install only a basic
|
2002-07-27 01:11:22 +02:00
|
|
|
core of packages. Cygwin Setup is designed to make it easy to browse
|
|
|
|
categories and select what you want to install or omit from those
|
|
|
|
categories. It's also easy to install everything:
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2002-01-24 01:30:25 +01:00
|
|
|
@enumerate
|
|
|
|
|
2002-07-27 01:11:22 +02:00
|
|
|
@item At the ``Select Packages'' screen, in ``Categories'' view, at the line
|
|
|
|
marked ``All'', click on the word ``default'' so that it changes to
|
|
|
|
``install''. (Be patient, there is some computing to do at this step.
|
2003-04-10 22:09:35 +02:00
|
|
|
It may take a second or two to register the change.) This tells Setup
|
2002-07-27 01:11:22 +02:00
|
|
|
to install @emph{everything}, not just what it thinks you should have
|
|
|
|
by default.
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2002-07-27 01:11:22 +02:00
|
|
|
@item Now click on the ``View'' button (twice) until you get the
|
|
|
|
``Partial'' view. This shows exactly which packages are about to be
|
|
|
|
downloaded and installed.
|
2002-01-24 01:30:25 +01:00
|
|
|
|
|
|
|
@end enumerate
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2002-07-27 01:11:22 +02:00
|
|
|
This procedure only works for packages that are currently available.
|
|
|
|
There is no way to tell Cygwin Setup to install all packages by
|
|
|
|
default from now on. As new packages become available that would not
|
|
|
|
be installed by default, you have to repeat the above procedure to get
|
|
|
|
them.
|
2000-08-25 15:15:10 +02:00
|
|
|
|
2002-07-27 01:11:22 +02:00
|
|
|
In general, a better method (in my opinion), is to:
|
|
|
|
|
|
|
|
@enumerate
|
|
|
|
|
|
|
|
@item First download & install all packages that would normally be
|
|
|
|
installed by default. This includes fundamental packages and any
|
|
|
|
updates to what you have already installed. Then...
|
|
|
|
|
|
|
|
@item Run Cygwin Setup again, and apply the above technique to get all
|
|
|
|
new packages that would not be installed by default. You can check
|
|
|
|
the list in the Partial View before proceeding, in case there's
|
2002-07-27 01:31:28 +02:00
|
|
|
something you really @emph{don't} want.
|
2002-07-27 01:11:22 +02:00
|
|
|
|
2003-04-10 22:09:35 +02:00
|
|
|
@item In the latest version of Cygwin Setup, if you click the ``View''
|
|
|
|
button (twice) more, it shows packages not currently installed. You
|
|
|
|
ought to check whether you @emph{really} want to install everything!
|
|
|
|
|
2002-07-27 01:11:22 +02:00
|
|
|
@end enumerate
|
2002-01-24 01:34:35 +01:00
|
|
|
|
2001-09-22 21:47:17 +02:00
|
|
|
@subsection How much disk space does Cygwin require?
|
|
|
|
|
2002-07-27 00:29:38 +02:00
|
|
|
That depends, obviously, on what you've chosen to download and
|
2003-02-21 21:37:47 +01:00
|
|
|
install. A full installation today is probably larger than 800MB
|
|
|
|
installed, not including the package archives themselves nor the source
|
|
|
|
code.
|
2001-09-22 21:47:17 +02:00
|
|
|
|
2003-02-21 21:37:47 +01:00
|
|
|
After installation, the package archives remain in your ``Local
|
|
|
|
Package Directory'', by default the location of @code{setup.exe}. You
|
|
|
|
may conserve disk space by deleting the subdirectories there. These
|
2004-06-14 04:42:05 +02:00
|
|
|
directories will have very weird looking names, being encoded with
|
2003-02-21 21:37:47 +01:00
|
|
|
their URLs.
|
2001-09-22 21:47:17 +02:00
|
|
|
|
2000-08-25 15:15:10 +02:00
|
|
|
@subsection What if setup fails?
|
|
|
|
|
2002-03-03 11:57:57 +01:00
|
|
|
First, make sure that you are using the latest version of Cygwin
|
2003-02-21 21:37:47 +01:00
|
|
|
Setup. The latest version is always available from the 'Install
|
2002-03-03 11:57:57 +01:00
|
|
|
Cygwin now' link on the Cygwin Home Page at @file{http://cygwin.com/}.
|
2000-10-24 17:20:18 +02:00
|
|
|
|
2004-06-14 04:42:05 +02:00
|
|
|
If you are downloading from the Internet, setup will fail if it cannot
|
2000-08-25 15:15:10 +02:00
|
|
|
download the list of mirrors at
|
2000-11-20 15:37:37 +01:00
|
|
|
@file{http://cygwin.com/mirrors.html}. It could be that
|
2000-08-25 15:15:10 +02:00
|
|
|
the network is too busy. Similarly for an ftp download site that isn't
|
|
|
|
working. Try another mirror, or try again later.
|
|
|
|
|
|
|
|
If setup refuses to download a package that you know needs to be
|
|
|
|
upgraded, try deleting that package's entry from /etc/setup. If you are
|
|
|
|
reacting quickly to an announcement on the mailing list, it could be
|
|
|
|
that the mirror you are using doesn't have the latest copy yet. Try
|
|
|
|
another mirror, or try again tomorrow.
|
|
|
|
|
2000-10-24 17:20:18 +02:00
|
|
|
If setup has otherwise behaved strangely, check the files
|
2002-07-27 01:39:21 +02:00
|
|
|
@samp{setup.log} and @samp{setup.log.full} in @code{/var/log}
|
|
|
|
(@code{C:\cygwin\var\log} by default). It may provide some clues as
|
|
|
|
to what went wrong and why.
|
2000-10-24 17:20:18 +02:00
|
|
|
|
|
|
|
If you're still baffled, search the Cygwin mailing list for clues.
|
|
|
|
Others may have the same problem, and a solution may be posted there.
|
|
|
|
If that search proves fruitless, send a query to the Cygwin mailing
|
|
|
|
list. You must provide complete details in your query: version of
|
|
|
|
setup, options you selected, contents of setup.log and setup.log.full,
|
|
|
|
what happened that wasn't supposed to happen, etc.
|
|
|
|
|
2000-09-14 13:38:15 +02:00
|
|
|
@subsection My Windows logon name has a space in it, will this cause problems?
|
|
|
|
|
|
|
|
Most definitely yes! UNIX shells (and thus Cygwin) use the space
|
|
|
|
character as a word delimiter. Under certain circumstances, it is
|
|
|
|
possible to get around this with various shell quoting mechanisms, but
|
|
|
|
you are much better off if you can avoid the problem entirely.
|
|
|
|
|
2004-12-03 06:30:52 +01:00
|
|
|
On Windows NT/2000/XP you have two choices:
|
|
|
|
@enumerate
|
|
|
|
|
|
|
|
@item You can rename the user in the Windows User Manager GUI and then
|
|
|
|
run mkpasswd.
|
|
|
|
|
|
|
|
@item You can simply edit the /etc/passwd file and change the Cygwin user name
|
|
|
|
(first field). It's also a good idea to avoid spaces in the home directory.
|
|
|
|
|
|
|
|
@end enumerate
|
|
|
|
|
|
|
|
On Windows 95/98/ME you can create a new user and run mkpasswd,
|
|
|
|
or you can delete the offending entry from /etc/passwd.
|
|
|
|
Cygwin will then use the name in the default entry with uid 500.
|
|
|
|
|
|
|
|
@subsection My @samp{HOME} environment variable is not what I want.
|
|
|
|
|
|
|
|
When starting Cygwin from Windows, @samp{HOME} is determined as follows
|
|
|
|
in order of decreasing priority:
|
|
|
|
|
|
|
|
@enumerate
|
|
|
|
|
|
|
|
@item @samp{HOME} from the Windows environment, translated to POSIX form.
|
|
|
|
|
|
|
|
@item The entry in /etc/passwd
|
|
|
|
|
|
|
|
@item @samp{HOMEDRIVE} and @samp{HOMEPATH} from the Windows environment
|
|
|
|
|
|
|
|
@item /
|
|
|
|
|
|
|
|
@end enumerate
|
|
|
|
|
|
|
|
When using Cygwin from the network (telnet, ssh,...), @samp{HOME} is set
|
|
|
|
from /etc/passwd.
|
|
|
|
|
|
|
|
If your @samp{HOME} is set to a value such as /cygdrive/c, it is likely
|
|
|
|
that it was set in Windows. Start a DOS Command Window and type
|
|
|
|
"set HOME" to verify if this is the case.
|
|
|
|
|
|
|
|
Access to shared drives is often restricted when starting from the network,
|
|
|
|
thus Domain users may wish to have a different @samp{HOME} in the
|
|
|
|
Windows environment (on shared drive) than in /etc/passwd (on local drive).
|
|
|
|
Note that ssh only considers /etc/passwd, disregarding @samp{HOME}.
|
2000-09-14 13:38:15 +02:00
|
|
|
|
2001-09-21 22:40:50 +02:00
|
|
|
@subsection How do I uninstall individual packages?
|
|
|
|
|
2002-03-03 11:57:57 +01:00
|
|
|
Run Cygwin Setup as you would to install packages. In the list of
|
2002-01-24 01:30:25 +01:00
|
|
|
packages to install, browse the relevant category or click on the
|
|
|
|
``View'' button to get a full listing. Click on the cycle glyph until
|
|
|
|
the action reads ``Uninstall''. Proceed by clicking ``Next''.
|
2001-09-21 22:40:50 +02:00
|
|
|
|
|
|
|
@subsection How do I uninstall @strong{all} of Cygwin?
|
2000-08-25 18:35:16 +02:00
|
|
|
|
|
|
|
Setup has no automatic uninstall facility. Just delete everything
|
|
|
|
manually:
|
|
|
|
|
|
|
|
@itemize @bullet
|
|
|
|
@item Cygwin shortcuts on the Desktop and Start Menu
|
|
|
|
|
2002-03-03 12:44:46 +01:00
|
|
|
@item The registry tree @samp{Software\Cygnus Solutions} under
|
2000-08-25 18:35:16 +02:00
|
|
|
@code{HKEY_LOCAL_MACHINE} and/or @code{HKEY_CURRENT_USER}.
|
|
|
|
|
|
|
|
@item Anything under the Cygwin root folder, @samp{C:\cygwin} by
|
|
|
|
default.
|
|
|
|
|
|
|
|
@item Anything created by setup in its temporary working directory.
|
|
|
|
|
|
|
|
@end itemize
|
|
|
|
|
|
|
|
It's up to you to deal with other changes you made to your system, such
|
|
|
|
as installing the inetd service, altering system paths, etc. Setup
|
|
|
|
would not have done any of these things for you.
|
2000-12-13 17:44:43 +01:00
|
|
|
|
2002-07-27 00:49:34 +02:00
|
|
|
@subsection How do I install snapshots?
|
2000-12-13 17:44:43 +01:00
|
|
|
|
2002-07-27 00:49:34 +02:00
|
|
|
First, are you sure you want to do this? Snapshots are risky. They
|
|
|
|
have not been tested. Use them @strong{only} if there is a feature or
|
|
|
|
bugfix that you need to try, and you are willing to deal with any
|
|
|
|
problems.
|
2001-07-05 01:21:49 +02:00
|
|
|
|
2002-07-27 00:49:34 +02:00
|
|
|
Before installing a snapshot, you must first Close @strong{all} Cygwin
|
|
|
|
applications, including shells and services (e.g. inetd, sshd), before
|
|
|
|
updating @code{cygwin1.dll}. You may have to restart Windows to clear
|
|
|
|
the DLL from memory.
|
|
|
|
|
|
|
|
You cannot use Setup to install a snapshot.
|
|
|
|
|
|
|
|
You should generally install the full
|
|
|
|
@code{cygwin-inst-YYYYMMDD.tar.bz2} update, rather than just the DLL,
|
|
|
|
otherwise some components may be out of sync. Cygwin tar won't be
|
2001-07-05 01:21:49 +02:00
|
|
|
able to update @code{/usr/bin/cygwin1.dll}, but it should succeed with
|
2002-07-27 00:49:34 +02:00
|
|
|
everything else.
|
2001-07-05 01:21:49 +02:00
|
|
|
|
|
|
|
@enumerate
|
2000-12-13 17:44:43 +01:00
|
|
|
|
2001-07-05 01:21:49 +02:00
|
|
|
@item Download the snapshot, and run:
|
|
|
|
@example
|
|
|
|
cd /
|
2001-07-06 01:58:34 +02:00
|
|
|
tar jxvf /posix/path/to/cygwin-inst-YYYYMMDD.tar.bz2 --exclude=usr/bin/cygwin1.dll
|
2001-07-05 01:21:49 +02:00
|
|
|
cd /tmp
|
|
|
|
tar jxvf /posix/path/to/cygwin-inst-YYYYMMDD.tar.bz2 usr/bin/cygwin1.dll
|
|
|
|
@end example
|
|
|
|
|
2002-07-27 01:43:15 +02:00
|
|
|
@item After closing all Cygwin apps (see above), use Explorer or the
|
2001-07-05 01:21:49 +02:00
|
|
|
Windows command shell to move @code{C:\cygwin\tmp\usr\bin\cygwin1.dll}
|
|
|
|
to @code{C:\cygwin\bin\cygwin1.dll}.
|
|
|
|
|
|
|
|
@end enumerate
|
2000-12-13 17:44:43 +01:00
|
|
|
|
2003-04-10 22:09:35 +02:00
|
|
|
@subsection Can Cygwin Setup maintain a ``mirror''?
|
|
|
|
|
|
|
|
NO. Cygwin Setup cannot do this for you. Use a tool designed for
|
|
|
|
this purpose. See @file{http://rsync.samba.org/},
|
|
|
|
@file{http://wget.sunsite.dk/} for utilities that can do this for you.
|
2004-03-17 18:39:44 +01:00
|
|
|
For more information on setting up a custom Cygwin package server, see
|
|
|
|
the Cygwin Setup homepage at
|
|
|
|
@file{http://sources.redhat.com/cygwin-apps/setup.html}.
|