2013-05-02 07:30:25 +08:00
|
|
|
<?xml version="1.0" encoding='UTF-8'?>
|
|
|
|
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
|
|
|
|
|
|
|
<chapter id="setup-net" xmlns:xi="http://www.w3.org/2001/XInclude">
|
|
|
|
<title>Setting Up Cygwin</title>
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2004-01-16 14:31:49 +08:00
|
|
|
<sect1 id="internet-setup">
|
|
|
|
<title>Internet Setup</title>
|
2001-12-04 12:20:31 +08:00
|
|
|
<para>To install the Cygwin net release, go to <ulink
|
2022-01-11 02:22:17 +08:00
|
|
|
url="https://cygwin.com/"/> and run
|
2015-02-03 21:48:43 +08:00
|
|
|
<ulink url="https://cygwin.com/setup-x86_64.exe">setup-x86_64.exe</ulink>
|
2013-11-11 20:48:31 +08:00
|
|
|
to install the 64 bit version of Cygwin. This will download a GUI
|
|
|
|
installer which can be run to download a complete cygwin installation
|
|
|
|
via the internet. Follow the instructions on each screen to install Cygwin.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2022-01-11 02:22:17 +08:00
|
|
|
The <command>setup</command> installer is designed to be easy
|
2003-03-23 04:03:41 +08:00
|
|
|
for new users to understand while remaining flexible for the
|
|
|
|
experienced. The volunteer development team is constantly working
|
2022-01-11 02:22:17 +08:00
|
|
|
on <command>setup</command>; before requesting a new feature,
|
2015-03-10 21:19:42 +08:00
|
|
|
check the wishlist in the
|
2016-05-24 18:09:10 +08:00
|
|
|
<ulink url="https://sourceware.org/git/gitweb.cgi?p=cygwin-setup.git;a=blob_plain;f=README;hb=HEAD">Git <literal>README</literal>
|
|
|
|
</ulink>. It may already be present in the Git version!
|
2003-03-23 04:03:41 +08:00
|
|
|
</para>
|
|
|
|
|
2013-11-11 20:48:31 +08:00
|
|
|
<para>
|
2022-01-11 02:22:17 +08:00
|
|
|
On Windows Vista and later, <command>setup</command> will check by
|
2013-11-11 20:48:31 +08:00
|
|
|
default if it runs with administrative privileges and, if not, will try
|
|
|
|
to elevate the process. If you want to avoid this behaviour and install
|
|
|
|
under an unprivileged account just for your own usage, run
|
2022-01-11 02:22:17 +08:00
|
|
|
<command>setup</command> with the <literal>--no-admin</literal> option.
|
2013-11-11 20:48:31 +08:00
|
|
|
</para>
|
|
|
|
|
2003-03-23 04:03:41 +08:00
|
|
|
<para>
|
|
|
|
Since the default value for each option is the logical choice for
|
|
|
|
most installations, you can get a working minimal Cygwin environment
|
|
|
|
installed by simply clicking the <literal>Next</literal> button
|
|
|
|
at each page. The only exception to this is choosing a Cygwin mirror,
|
|
|
|
which you can choose by experimenting with those listed at
|
2015-02-03 21:48:43 +08:00
|
|
|
<ulink url="https://cygwin.com/mirrors.html"/>. For more details about each of page of the
|
2022-01-11 02:22:17 +08:00
|
|
|
<command>setup</command> installation, read on below.
|
2003-03-27 12:56:52 +08:00
|
|
|
Please note that this guide assumes that you have a basic understanding
|
|
|
|
of Unix (or a Unix-like OS). If you are new to Unix, you will also want
|
2004-12-25 05:58:38 +08:00
|
|
|
to make use of <ulink url="http://www.google.com/search?q=new+to+unix">
|
2003-03-27 12:56:52 +08:00
|
|
|
other resources</ulink>.
|
2003-03-23 04:03:41 +08:00
|
|
|
</para>
|
|
|
|
|
2008-07-17 19:49:45 +08:00
|
|
|
<sect2 id="setup-download"><title>Download Source</title>
|
2003-03-23 04:03:41 +08:00
|
|
|
<para>
|
|
|
|
Cygwin uses packages to manage installing various software. When
|
|
|
|
the default <literal>Install from Internet</literal> option is chosen,
|
2022-01-11 02:22:17 +08:00
|
|
|
<command>setup</command> creates a local directory to store
|
2003-03-23 04:03:41 +08:00
|
|
|
the packages before actually installing the contents.
|
|
|
|
<literal>Download from Internet</literal> performs only the first
|
|
|
|
part (storing the packages locally), while
|
|
|
|
<literal>Install from Local Directory</literal> performs only the
|
|
|
|
second (installing the contents of the packages).
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The <literal>Download from Internet</literal> option is mainly
|
|
|
|
for creating a base Cygwin package tree on one computer for
|
|
|
|
installation on several machines with
|
2003-03-27 12:56:52 +08:00
|
|
|
<literal>Install from Local Directory</literal>; copy the
|
|
|
|
entire local package tree to another machine with the directory
|
|
|
|
tree intact. For example, you might create a <literal>C:\cache\</literal>
|
2022-01-11 02:22:17 +08:00
|
|
|
directory and place <command>setup</command> in it. Run
|
|
|
|
<command>setup</command> to <literal>Install from Internet</literal>
|
2003-03-27 12:56:52 +08:00
|
|
|
or <literal>Download from Internet</literal>, then copy the whole
|
|
|
|
<literal>C:\cache\</literal> to each machine and instead choose
|
2010-01-17 02:06:27 +08:00
|
|
|
<literal>Install from Local Directory</literal>.
|
2003-03-27 12:56:52 +08:00
|
|
|
</para>
|
|
|
|
<para>
|
2003-03-23 04:03:41 +08:00
|
|
|
Though this provides some basic mirroring functionality, if you
|
2009-04-03 19:51:31 +08:00
|
|
|
are managing a large Cygwin installation, to keep up to date we recommend
|
2003-03-27 12:56:52 +08:00
|
|
|
using a mirroring tool such as <command>wget</command>. A helpful user on
|
|
|
|
the Cygwin mailing list created a simple demonstration script to accomplish
|
2003-03-23 04:03:41 +08:00
|
|
|
this; search the list for <command>mkcygwget</command> for ideas.
|
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2008-07-17 19:49:45 +08:00
|
|
|
<sect2 id="setup-dir"><title>Selecting an Install Directory</title>
|
2003-03-23 04:03:41 +08:00
|
|
|
<para>
|
|
|
|
The <literal>Root Directory</literal> for Cygwin (default
|
2003-03-23 05:16:25 +08:00
|
|
|
<literal>C:\cygwin</literal>) will become <literal>/</literal>
|
|
|
|
within your Cygwin installation. You must have write access to
|
|
|
|
the parent directory, and any ACLs on the parent directory will
|
|
|
|
determine access to installed files.
|
2003-03-23 04:03:41 +08:00
|
|
|
</para>
|
|
|
|
<para>
|
2003-03-24 03:35:52 +08:00
|
|
|
The <literal>Install For</literal> options of <literal>All Users</literal>
|
|
|
|
or <literal>Just Me</literal> should always be left on the default
|
|
|
|
<literal>All Users</literal>, unless you do not have write access to
|
|
|
|
<literal>HKEY_LOCAL_MACHINE</literal> in the registry or the All Users
|
|
|
|
Start Menu. This is true even if you are the only user planning to use Cygwin
|
2003-03-24 03:43:33 +08:00
|
|
|
on the machine. Selecting <literal>Just Me</literal> will cause problems
|
2003-03-24 03:35:52 +08:00
|
|
|
for programs such as <command>crond</command> and <command>sshd</command>.
|
|
|
|
If you do not have the necessary permissions, but still want to use these
|
|
|
|
programs, consult the Cygwin mailing list archives about others' experiences.
|
|
|
|
|
2003-03-23 04:03:41 +08:00
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2008-07-17 19:49:45 +08:00
|
|
|
<sect2 id="setup-localdir"><title>Local Package Directory</title>
|
2003-03-23 04:03:41 +08:00
|
|
|
<para>
|
|
|
|
The <literal>Local Package Directory</literal> is the cache where
|
2022-01-11 02:22:17 +08:00
|
|
|
<command>setup</command> stores the packages before they are
|
2003-03-24 00:23:52 +08:00
|
|
|
installed. The cache must not be the same folder as the Cygwin
|
2003-03-23 04:03:41 +08:00
|
|
|
root. Within the cache, a separate directory is created for each
|
2022-01-11 02:22:17 +08:00
|
|
|
Cygwin mirror, which allows <command>setup</command> to use
|
2003-03-23 04:03:41 +08:00
|
|
|
multiple mirrors and custom packages. After installing Cygwin,
|
|
|
|
the cache is no longer necessary, but you may want to retain the
|
|
|
|
packages as backups, for installing Cygwin to another system,
|
|
|
|
or in case you need to reinstall a package.
|
|
|
|
</para>
|
2004-01-24 16:09:45 +08:00
|
|
|
</sect2>
|
2003-03-23 04:03:41 +08:00
|
|
|
|
2008-07-17 19:49:45 +08:00
|
|
|
<sect2 id="setup-connection"><title>Connection Method</title>
|
2003-03-23 04:03:41 +08:00
|
|
|
<para>
|
2017-06-20 00:18:36 +08:00
|
|
|
The <literal>Direct Connection</literal> method of downloading will
|
|
|
|
directly connect. If your system is configured to use a proxy server or
|
|
|
|
auto-configuration scripts, the <literal>Use System Proxy Settings</literal>
|
|
|
|
method uses those settings. Alternatively, you can manually enter proxy
|
|
|
|
settings into the <literal>Use HTTP/FTP Proxy</literal> section.
|
2003-03-23 04:03:41 +08:00
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2008-07-17 19:49:45 +08:00
|
|
|
<sect2 id="setup-mirror"><title>Choosing Mirrors</title>
|
2003-03-23 04:03:41 +08:00
|
|
|
<para>
|
|
|
|
Since there is no way of knowing from where you will be downloading
|
|
|
|
Cygwin, you need to choose at least one mirror site. Cygwin mirrors
|
2015-02-03 21:48:43 +08:00
|
|
|
are geographically distributed around the world; check the list at
|
|
|
|
<ulink url="https://cygwin.com/mirrors.html"/>
|
2003-03-23 04:03:41 +08:00
|
|
|
to find one near you. You can select multiple mirrors by holding down
|
|
|
|
<literal>CTRL</literal> and clicking on each one. If you have the URL of
|
|
|
|
an unlisted mirror (for example, if your organization has an internal Cygwin
|
|
|
|
mirror) you can add it.
|
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2008-07-17 19:49:45 +08:00
|
|
|
<sect2 id="setup-packages"><title>Choosing Packages</title>
|
2003-03-23 04:03:41 +08:00
|
|
|
<para>
|
2022-01-11 02:22:17 +08:00
|
|
|
For each selected mirror site, <command>setup</command> downloads a
|
2003-03-24 00:23:52 +08:00
|
|
|
small text file called <literal>setup.bz2</literal> that contains a list
|
2003-03-23 04:03:41 +08:00
|
|
|
of packages available from that site along with some basic information about
|
2022-01-11 02:22:17 +08:00
|
|
|
each package which <command>setup</command> parses and uses to create the
|
2015-02-03 21:48:43 +08:00
|
|
|
chooser window. For details about the format of this file, see the
|
2022-01-11 02:22:17 +08:00
|
|
|
<ulink url="https://sourceware.org/cygwin-apps/setup.html">setup homepage</ulink>.
|
2003-03-23 04:03:41 +08:00
|
|
|
</para>
|
|
|
|
<para>
|
2022-01-11 02:22:17 +08:00
|
|
|
The chooser is the most complex part of <command>setup</command>.
|
2003-03-24 00:23:52 +08:00
|
|
|
Packages are grouped into categories, and one package may belong to multiple
|
|
|
|
categories (assigned by the volunteer package maintainer). Each package
|
2012-02-05 04:19:48 +08:00
|
|
|
can be found under any of those categories in the hierarchical chooser view.
|
2022-01-11 02:22:17 +08:00
|
|
|
By default, <command>setup</command>
|
2003-03-23 04:03:41 +08:00
|
|
|
will install only the packages in the <literal>Base</literal> category
|
2003-03-24 00:23:52 +08:00
|
|
|
and their dependencies, resulting in a minimal Cygwin installation.
|
2003-03-23 04:03:41 +08:00
|
|
|
However, this will not include many commonly used tools such as
|
|
|
|
<command>gcc</command> (which you will find in the <literal>Devel</literal>
|
2022-01-11 02:22:17 +08:00
|
|
|
category). Since <command>setup</command> automatically selects
|
2004-01-11 16:32:09 +08:00
|
|
|
dependencies, be careful not to unselect any required packages. In
|
|
|
|
particular, everything in the <literal>Base</literal> category is
|
|
|
|
required.
|
2003-03-23 04:03:41 +08:00
|
|
|
</para>
|
|
|
|
<para>
|
2022-01-11 02:22:17 +08:00
|
|
|
You can change <command>setup</command>'s view style, which is helpful
|
2003-03-23 04:03:41 +08:00
|
|
|
if you know the name of a package you want to install but not which
|
|
|
|
category it is in.
|
|
|
|
Click on the <literal>View</literal> button and it will rotate between
|
|
|
|
<literal>Category</literal> (the default), <literal>Full</literal> (all
|
2010-07-27 06:56:24 +08:00
|
|
|
packages), and <literal>Pending</literal> (only packages to be
|
|
|
|
installed, removed or upgraded).
|
2003-03-23 04:03:41 +08:00
|
|
|
If you are familiar with Unix, you will probably want to at least glance
|
|
|
|
through the <literal>Full</literal> listing for your favorite tools.
|
|
|
|
</para>
|
|
|
|
<para>
|
2022-01-11 02:22:17 +08:00
|
|
|
Once you have an existing Cygwin installation, the <command>setup</command>
|
2003-03-23 04:03:41 +08:00
|
|
|
chooser is also used to manage your Cygwin installation.
|
|
|
|
Information on installed packages is kept in the
|
|
|
|
<literal>/etc/setup/</literal> directory of your Cygwin installation; if
|
2022-01-11 02:22:17 +08:00
|
|
|
<command>setup</command> cannot find this directory it will act as if
|
|
|
|
you have no Cygwin installation. If <command>setup</command>
|
2003-03-23 04:03:41 +08:00
|
|
|
finds a newer version of an installed package available, it will automatically
|
|
|
|
mark it to be upgraded.
|
|
|
|
To <literal>Uninstall</literal>, <literal>Reinstall</literal>, or get the
|
|
|
|
<literal>Source</literal> for an existing package, click on
|
|
|
|
<literal>Keep</literal> to toggle it.
|
|
|
|
Also, to avoid the need to reboot after upgrading, make sure
|
|
|
|
to close all Cygwin windows and stop all Cygwin processes before
|
2022-01-11 02:22:17 +08:00
|
|
|
<command>setup</command> begins to install the upgraded package.
|
2003-03-23 04:03:41 +08:00
|
|
|
</para>
|
|
|
|
<para>
|
2010-07-27 06:56:24 +08:00
|
|
|
To avoid unintentionally upgrading, use the <literal>Pending</literal>
|
2010-06-27 00:08:46 +08:00
|
|
|
view to see which packages have been marked for upgrading. If you
|
|
|
|
don't want to upgrade a package, click on the new version number to
|
2011-07-21 03:31:05 +08:00
|
|
|
toggle it until it says <literal>Keep</literal>. All packages can be
|
|
|
|
set to stay at the installed version by pressing the <literal>Keep</literal>
|
|
|
|
button in the top right part of the chooser window.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
A previous version of each package is usually available, in case downgrading
|
|
|
|
is required to avoid a serious bug in the current version of the package.
|
|
|
|
Packages also occasionally have testing (or "experimental") versions available.
|
|
|
|
Previous and experimental versions can be chosen by clicking on the package's
|
|
|
|
<literal>New</literal> column until the required version appears.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
All available experimental packages can be selected by pressing the
|
|
|
|
<literal>Exp</literal> in the top right part of the chooser window.
|
2022-01-11 02:22:17 +08:00
|
|
|
Be warned, however, that the next time you run <command>setup</command>
|
2011-07-21 03:31:05 +08:00
|
|
|
it will try to replace all old or experimental versions with the current
|
|
|
|
version, unless told otherwise.
|
2003-03-23 04:03:41 +08:00
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2008-07-17 19:49:45 +08:00
|
|
|
<sect2 id="setup-progress"><title>Download and Installation Progress</title>
|
2003-03-23 04:03:41 +08:00
|
|
|
<para>
|
2022-01-11 02:22:17 +08:00
|
|
|
First, <command>setup</command> will download all selected packages
|
2003-03-23 04:03:41 +08:00
|
|
|
to the local directory chosen earlier. Before installing,
|
2022-01-11 02:22:17 +08:00
|
|
|
<command>setup</command> performs a checksum on each package. If the
|
2003-03-23 04:03:41 +08:00
|
|
|
local directory is a slow medium (such as a network drive) this can take
|
2022-01-11 02:22:17 +08:00
|
|
|
a long time. During the download and installation, <command>setup</command>
|
2009-04-03 19:51:31 +08:00
|
|
|
shows progress bars for the current task and total remaining disk space.
|
2003-03-23 04:03:41 +08:00
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2011-12-13 11:54:59 +08:00
|
|
|
<sect2 id="setup-icons"><title>Shortcuts</title>
|
2003-03-23 04:03:41 +08:00
|
|
|
<para>
|
2011-12-13 11:54:59 +08:00
|
|
|
You may choose to install "Cygwin Terminal" shortcuts on the Desktop
|
|
|
|
and/or Start Menu. These shortcuts run <command>mintty</command>,
|
|
|
|
which will start your default shell as specified
|
|
|
|
in <filename>/etc/passwd</filename>.
|
2003-03-23 04:03:41 +08:00
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2008-07-17 19:49:45 +08:00
|
|
|
<sect2 id="setup-postinstall"><title>Post-Install Scripts</title>
|
2003-03-23 04:03:41 +08:00
|
|
|
<para>
|
2022-01-11 02:22:17 +08:00
|
|
|
Last of all, <command>setup</command> will run any post-install
|
2017-04-11 02:32:47 +08:00
|
|
|
scripts to finish correctly setting up installed packages.
|
2022-01-11 02:22:17 +08:00
|
|
|
When the last post-install script is completed, <command>setup</command>
|
2003-03-24 00:23:52 +08:00
|
|
|
will display a box announcing the completion. A few packages, such as
|
2003-03-23 04:03:41 +08:00
|
|
|
the OpenSSH server, require some manual site-specific configuration.
|
2003-03-24 00:23:52 +08:00
|
|
|
Relevant documentation can be found in the <literal>/usr/doc/Cygwin/</literal>
|
2004-07-16 22:17:15 +08:00
|
|
|
or <literal>/usr/share/doc/Cygwin/</literal> directory.
|
2003-03-23 04:03:41 +08:00
|
|
|
</para>
|
|
|
|
</sect2>
|
2008-07-17 19:49:45 +08:00
|
|
|
<sect2 id="setup-troubleshooting"><title>Troubleshooting</title>
|
2005-07-11 03:39:31 +08:00
|
|
|
<para>
|
|
|
|
Unfortunately, the complex setup process means that odd problems can
|
|
|
|
occur. If you're having trouble downloading packages, it may be network
|
|
|
|
congestion, so try a different mirror and/or a different protocol (i.e.,
|
|
|
|
HTTP instead of FTP). If you notice something is not working after
|
2022-01-11 02:22:17 +08:00
|
|
|
running setup, you can check the <command>setup</command> log file
|
2005-07-11 03:39:31 +08:00
|
|
|
at <literal>/var/log/setup.log.full</literal>. Make a backup of this
|
2022-01-11 02:22:17 +08:00
|
|
|
file before running <command>setup</command> again, and follow the
|
2015-02-03 21:48:43 +08:00
|
|
|
steps for <ulink url="https://cygwin.com/problems.html">Reporting
|
2005-07-11 03:39:31 +08:00
|
|
|
Problems with Cygwin</ulink>.
|
|
|
|
</para>
|
|
|
|
</sect2>
|
2003-03-23 04:03:41 +08:00
|
|
|
|
2000-02-18 03:38:33 +08:00
|
|
|
</sect1>
|
|
|
|
|
2013-05-02 07:30:25 +08:00
|
|
|
<xi:include href="setup-env.xml"/>
|
|
|
|
<xi:include href="setup-maxmem.xml"/>
|
|
|
|
<xi:include href="setup-locale.xml"/>
|
|
|
|
<xi:include href="setup-files.xml"/>
|
2000-02-18 03:38:33 +08:00
|
|
|
</chapter>
|