]> sourceware.org Git - newlib-cygwin.git/blame - winsup/doc/setup-net.xml
Update URLs for Cygwin packaging information
[newlib-cygwin.git] / winsup / doc / setup-net.xml
CommitLineData
8142972d
WY
1<?xml version="1.0" encoding='UTF-8'?>
2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
4
5<chapter id="setup-net" xmlns:xi="http://www.w3.org/2001/XInclude">
6<title>Setting Up Cygwin</title>
1fd5e000 7
42fb6204
JDF
8<sect1 id="internet-setup">
9<title>Internet Setup</title>
63928f60 10<para>To install the Cygwin net release, go to <ulink
db9a8c99
CV
11url="https://cygwin.com/"/> and run either
12<ulink url="https://cygwin.com/setup-x86.exe">setup-x86.exe</ulink>
4146cc5c 13to install the 32 bit version of Cygwin, or
db9a8c99 14<ulink url="https://cygwin.com/setup-x86_64.exe">setup-x86_64.exe</ulink>
4146cc5c
CV
15to install the 64 bit version of Cygwin. This will download a GUI
16installer which can be run to download a complete cygwin installation
17via the internet. Follow the instructions on each screen to install Cygwin.
18</para>
19
20<para>
21<note>
22For easier reading the installer is called <command>setup.exe</command>
23throughout the following sections. This refers likewise to both
24installer applications,
db9a8c99 25<ulink url="https://cygwin.com/setup-x86.exe">setup-x86.exe</ulink>
4146cc5c 26for 32 bit, as well as
db9a8c99 27<ulink url="https://cygwin.com/setup-x86_64.exe">setup-x86_64.exe</ulink>
4146cc5c
CV
28for 64 bit. Apart from the target architecture they are the same thing.
29</note>
6c7303cd 30</para>
7d37d045
JDF
31
32<para>
33The <command>setup.exe</command> installer is designed to be easy
34for new users to understand while remaining flexible for the
35experienced. The volunteer development team is constantly working
36on <command>setup.exe</command>; before requesting a new feature,
9272d8f9 37check the wishlist in the
3b667316
AD
38<ulink url="https://sourceware.org/git/gitweb.cgi?p=cygwin-setup.git;a=blob_plain;f=README;hb=HEAD">Git <literal>README</literal>
39</ulink>. It may already be present in the Git version!
7d37d045
JDF
40</para>
41
4146cc5c
CV
42<para>
43On Windows Vista and later, <command>setup.exe</command> will check by
44default if it runs with administrative privileges and, if not, will try
45to elevate the process. If you want to avoid this behaviour and install
46under an unprivileged account just for your own usage, run
47<command>setup.exe</command> with the <literal>--no-admin</literal> option.
48</para>
49
7d37d045
JDF
50<para>
51Since the default value for each option is the logical choice for
52most installations, you can get a working minimal Cygwin environment
53installed by simply clicking the <literal>Next</literal> button
54at each page. The only exception to this is choosing a Cygwin mirror,
55which you can choose by experimenting with those listed at
db9a8c99 56<ulink url="https://cygwin.com/mirrors.html"/>. For more details about each of page of the
7d37d045 57<command>setup.exe</command> installation, read on below.
6c7303cd
JDF
58Please note that this guide assumes that you have a basic understanding
59of Unix (or a Unix-like OS). If you are new to Unix, you will also want
c98b30ea 60to make use of <ulink url="http://www.google.com/search?q=new+to+unix">
6c7303cd 61other resources</ulink>.
7d37d045
JDF
62</para>
63
85f1119b 64<sect2 id="setup-download"><title>Download Source</title>
7d37d045
JDF
65<para>
66Cygwin uses packages to manage installing various software. When
67the default <literal>Install from Internet</literal> option is chosen,
68<command>setup.exe</command> creates a local directory to store
69the packages before actually installing the contents.
70<literal>Download from Internet</literal> performs only the first
71part (storing the packages locally), while
72<literal>Install from Local Directory</literal> performs only the
73second (installing the contents of the packages).
74</para>
75<para>
76The <literal>Download from Internet</literal> option is mainly
77for creating a base Cygwin package tree on one computer for
78installation on several machines with
6c7303cd
JDF
79<literal>Install from Local Directory</literal>; copy the
80entire local package tree to another machine with the directory
81tree intact. For example, you might create a <literal>C:\cache\</literal>
82directory and place <command>setup.exe</command> in it. Run
83<command>setup.exe</command> to <literal>Install from Internet</literal>
84or <literal>Download from Internet</literal>, then copy the whole
85<literal>C:\cache\</literal> to each machine and instead choose
e6bda023 86<literal>Install from Local Directory</literal>.
6c7303cd
JDF
87</para>
88<para>
7d37d045 89Though this provides some basic mirroring functionality, if you
f5e097fa 90are managing a large Cygwin installation, to keep up to date we recommend
6c7303cd
JDF
91using a mirroring tool such as <command>wget</command>. A helpful user on
92the Cygwin mailing list created a simple demonstration script to accomplish
7d37d045
JDF
93this; search the list for <command>mkcygwget</command> for ideas.
94</para>
95</sect2>
96
85f1119b 97<sect2 id="setup-dir"><title>Selecting an Install Directory</title>
7d37d045
JDF
98<para>
99The <literal>Root Directory</literal> for Cygwin (default
522fcf16
JDF
100<literal>C:\cygwin</literal>) will become <literal>/</literal>
101within your Cygwin installation. You must have write access to
102the parent directory, and any ACLs on the parent directory will
103determine access to installed files.
7d37d045
JDF
104</para>
105<para>
0fd53506
JDF
106The <literal>Install For</literal> options of <literal>All Users</literal>
107or <literal>Just Me</literal> should always be left on the default
108<literal>All Users</literal>, unless you do not have write access to
109<literal>HKEY_LOCAL_MACHINE</literal> in the registry or the All Users
110Start Menu. This is true even if you are the only user planning to use Cygwin
8fdbcd12 111on the machine. Selecting <literal>Just Me</literal> will cause problems
0fd53506
JDF
112for programs such as <command>crond</command> and <command>sshd</command>.
113If you do not have the necessary permissions, but still want to use these
114programs, consult the Cygwin mailing list archives about others' experiences.
115
7d37d045
JDF
116</para>
117</sect2>
118
85f1119b 119<sect2 id="setup-localdir"><title>Local Package Directory</title>
7d37d045
JDF
120<para>
121The <literal>Local Package Directory</literal> is the cache where
122<command>setup.exe</command> stores the packages before they are
489d990b 123installed. The cache must not be the same folder as the Cygwin
7d37d045
JDF
124root. Within the cache, a separate directory is created for each
125Cygwin mirror, which allows <command>setup.exe</command> to use
126multiple mirrors and custom packages. After installing Cygwin,
127the cache is no longer necessary, but you may want to retain the
128packages as backups, for installing Cygwin to another system,
129or in case you need to reinstall a package.
130</para>
aff8b4f9 131</sect2>
7d37d045 132
85f1119b 133<sect2 id="setup-connection"><title>Connection Method</title>
7d37d045 134<para>
489d990b
JDF
135The <literal>Direct Connection</literal> method of downloading will
136directly download the packages, while the IE5 method will leverage your
137IE5 cache for performance. If your organisation uses a proxy server or
138auto-configuration scripts, the IE5 method also uses these settings.
139If you have a proxy server, you can manually type it into
7d37d045
JDF
140the <literal>Use Proxy</literal> section. Unfortunately,
141<command>setup.exe</command> does not currently support password
142authorization for proxy servers.
143</para>
144</sect2>
145
85f1119b 146<sect2 id="setup-mirror"><title>Choosing Mirrors</title>
7d37d045
JDF
147<para>
148Since there is no way of knowing from where you will be downloading
149Cygwin, you need to choose at least one mirror site. Cygwin mirrors
db9a8c99
CV
150are geographically distributed around the world; check the list at
151<ulink url="https://cygwin.com/mirrors.html"/>
7d37d045
JDF
152to find one near you. You can select multiple mirrors by holding down
153<literal>CTRL</literal> and clicking on each one. If you have the URL of
154an unlisted mirror (for example, if your organization has an internal Cygwin
155mirror) you can add it.
156</para>
157</sect2>
158
85f1119b 159<sect2 id="setup-packages"><title>Choosing Packages</title>
7d37d045
JDF
160<para>
161For each selected mirror site, <command>setup.exe</command> downloads a
489d990b 162small text file called <literal>setup.bz2</literal> that contains a list
7d37d045 163of packages available from that site along with some basic information about
489d990b 164each package which <command>setup.exe</command> parses and uses to create the
db9a8c99
CV
165chooser window. For details about the format of this file, see the
166<ulink url="https://sourceware.org/cygwin-apps/setup.html">setup.exe homepage</ulink>.
7d37d045
JDF
167</para>
168<para>
169The chooser is the most complex part of <command>setup.exe</command>.
489d990b
JDF
170Packages are grouped into categories, and one package may belong to multiple
171categories (assigned by the volunteer package maintainer). Each package
35d81b4c 172can be found under any of those categories in the hierarchical chooser view.
f5e097fa 173By default, <command>setup.exe</command>
7d37d045 174will install only the packages in the <literal>Base</literal> category
489d990b 175and their dependencies, resulting in a minimal Cygwin installation.
7d37d045
JDF
176However, this will not include many commonly used tools such as
177<command>gcc</command> (which you will find in the <literal>Devel</literal>
ac51da48
JDF
178category). Since <command>setup.exe</command> automatically selects
179dependencies, be careful not to unselect any required packages. In
180particular, everything in the <literal>Base</literal> category is
181required.
7d37d045
JDF
182</para>
183<para>
184You can change <command>setup.exe</command>'s view style, which is helpful
185if you know the name of a package you want to install but not which
186category it is in.
187Click on the <literal>View</literal> button and it will rotate between
188<literal>Category</literal> (the default), <literal>Full</literal> (all
aab56a41
AK
189packages), and <literal>Pending</literal> (only packages to be
190installed, removed or upgraded).
7d37d045
JDF
191If you are familiar with Unix, you will probably want to at least glance
192through the <literal>Full</literal> listing for your favorite tools.
193</para>
194<para>
195Once you have an existing Cygwin installation, the <command>setup.exe</command>
196chooser is also used to manage your Cygwin installation.
197Information on installed packages is kept in the
198<literal>/etc/setup/</literal> directory of your Cygwin installation; if
f5e097fa
CV
199<command>setup.exe</command> cannot find this directory it will act as if
200you have no Cygwin installation. If <command>setup.exe</command>
7d37d045
JDF
201finds a newer version of an installed package available, it will automatically
202mark it to be upgraded.
203To <literal>Uninstall</literal>, <literal>Reinstall</literal>, or get the
204<literal>Source</literal> for an existing package, click on
205<literal>Keep</literal> to toggle it.
206Also, to avoid the need to reboot after upgrading, make sure
207to close all Cygwin windows and stop all Cygwin processes before
208<command>setup.exe</command> begins to install the upgraded package.
209</para>
210<para>
aab56a41 211To avoid unintentionally upgrading, use the <literal>Pending</literal>
8930e4d2
CF
212view to see which packages have been marked for upgrading. If you
213don't want to upgrade a package, click on the new version number to
42f8872e
AK
214toggle it until it says <literal>Keep</literal>. All packages can be
215set to stay at the installed version by pressing the <literal>Keep</literal>
216button in the top right part of the chooser window.
217</para>
218<para>
219A previous version of each package is usually available, in case downgrading
220is required to avoid a serious bug in the current version of the package.
221Packages also occasionally have testing (or "experimental") versions available.
222Previous and experimental versions can be chosen by clicking on the package's
223<literal>New</literal> column until the required version appears.
224</para>
225<para>
226All available experimental packages can be selected by pressing the
227<literal>Exp</literal> in the top right part of the chooser window.
228Be warned, however, that the next time you run <command>setup.exe</command>
229it will try to replace all old or experimental versions with the current
230version, unless told otherwise.
7d37d045
JDF
231</para>
232</sect2>
233
85f1119b 234<sect2 id="setup-progress"><title>Download and Installation Progress</title>
7d37d045
JDF
235<para>
236First, <command>setup.exe</command> will download all selected packages
237to the local directory chosen earlier. Before installing,
238<command>setup.exe</command> performs a checksum on each package. If the
239local directory is a slow medium (such as a network drive) this can take
240a long time. During the download and installation, <command>setup.exe</command>
f5e097fa 241shows progress bars for the current task and total remaining disk space.
7d37d045
JDF
242</para>
243</sect2>
244
a7ea1550 245<sect2 id="setup-icons"><title>Shortcuts</title>
7d37d045 246<para>
a7ea1550
CF
247You may choose to install "Cygwin Terminal" shortcuts on the Desktop
248and/or Start Menu. These shortcuts run <command>mintty</command>,
249which will start your default shell as specified
250in <filename>/etc/passwd</filename>.
7d37d045
JDF
251</para>
252</sect2>
253
85f1119b 254<sect2 id="setup-postinstall"><title>Post-Install Scripts</title>
7d37d045
JDF
255<para>
256Last of all, <command>setup.exe</command> will run any post-install
17b85c59 257scripts to finish correctly setting up installed packages.
489d990b
JDF
258When the last post-install script is completed, <command>setup.exe</command>
259will display a box announcing the completion. A few packages, such as
7d37d045 260the OpenSSH server, require some manual site-specific configuration.
489d990b 261Relevant documentation can be found in the <literal>/usr/doc/Cygwin/</literal>
99d86313 262or <literal>/usr/share/doc/Cygwin/</literal> directory.
7d37d045
JDF
263</para>
264</sect2>
85f1119b 265<sect2 id="setup-troubleshooting"><title>Troubleshooting</title>
12d53ce6
JDF
266<para>
267Unfortunately, the complex setup process means that odd problems can
268occur. If you're having trouble downloading packages, it may be network
269congestion, so try a different mirror and/or a different protocol (i.e.,
270HTTP instead of FTP). If you notice something is not working after
271running setup, you can check the <command>setup.exe</command> log file
272at <literal>/var/log/setup.log.full</literal>. Make a backup of this
273file before running <command>setup.exe</command> again, and follow the
db9a8c99 274steps for <ulink url="https://cygwin.com/problems.html">Reporting
12d53ce6
JDF
275Problems with Cygwin</ulink>.
276</para>
277</sect2>
7d37d045 278
1fd5e000
CF
279</sect1>
280
8142972d
WY
281<xi:include href="setup-env.xml"/>
282<xi:include href="setup-maxmem.xml"/>
283<xi:include href="setup-locale.xml"/>
284<xi:include href="setup-files.xml"/>
1fd5e000 285</chapter>
This page took 0.294634 seconds and 5 git commands to generate.