]>
Commit | Line | Data |
---|---|---|
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 |
11 | url="https://cygwin.com/"/> and run either |
12 | <ulink url="https://cygwin.com/setup-x86.exe">setup-x86.exe</ulink> | |
4146cc5c | 13 | to 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 |
15 | to install the 64 bit version of Cygwin. This will download a GUI |
16 | installer which can be run to download a complete cygwin installation | |
17 | via the internet. Follow the instructions on each screen to install Cygwin. | |
18 | </para> | |
19 | ||
20 | <para> | |
21 | <note> | |
22 | For easier reading the installer is called <command>setup.exe</command> | |
23 | throughout the following sections. This refers likewise to both | |
24 | installer applications, | |
db9a8c99 | 25 | <ulink url="https://cygwin.com/setup-x86.exe">setup-x86.exe</ulink> |
4146cc5c | 26 | for 32 bit, as well as |
db9a8c99 | 27 | <ulink url="https://cygwin.com/setup-x86_64.exe">setup-x86_64.exe</ulink> |
4146cc5c CV |
28 | for 64 bit. Apart from the target architecture they are the same thing. |
29 | </note> | |
6c7303cd | 30 | </para> |
7d37d045 JDF |
31 | |
32 | <para> | |
33 | The <command>setup.exe</command> installer is designed to be easy | |
34 | for new users to understand while remaining flexible for the | |
35 | experienced. The volunteer development team is constantly working | |
36 | on <command>setup.exe</command>; before requesting a new feature, | |
9272d8f9 | 37 | check 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> |
43 | On Windows Vista and later, <command>setup.exe</command> will check by | |
44 | default if it runs with administrative privileges and, if not, will try | |
45 | to elevate the process. If you want to avoid this behaviour and install | |
46 | under 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> |
51 | Since the default value for each option is the logical choice for | |
52 | most installations, you can get a working minimal Cygwin environment | |
53 | installed by simply clicking the <literal>Next</literal> button | |
54 | at each page. The only exception to this is choosing a Cygwin mirror, | |
55 | which 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 |
58 | Please note that this guide assumes that you have a basic understanding |
59 | of Unix (or a Unix-like OS). If you are new to Unix, you will also want | |
c98b30ea | 60 | to make use of <ulink url="http://www.google.com/search?q=new+to+unix"> |
6c7303cd | 61 | other resources</ulink>. |
7d37d045 JDF |
62 | </para> |
63 | ||
85f1119b | 64 | <sect2 id="setup-download"><title>Download Source</title> |
7d37d045 JDF |
65 | <para> |
66 | Cygwin uses packages to manage installing various software. When | |
67 | the default <literal>Install from Internet</literal> option is chosen, | |
68 | <command>setup.exe</command> creates a local directory to store | |
69 | the packages before actually installing the contents. | |
70 | <literal>Download from Internet</literal> performs only the first | |
71 | part (storing the packages locally), while | |
72 | <literal>Install from Local Directory</literal> performs only the | |
73 | second (installing the contents of the packages). | |
74 | </para> | |
75 | <para> | |
76 | The <literal>Download from Internet</literal> option is mainly | |
77 | for creating a base Cygwin package tree on one computer for | |
78 | installation on several machines with | |
6c7303cd JDF |
79 | <literal>Install from Local Directory</literal>; copy the |
80 | entire local package tree to another machine with the directory | |
81 | tree intact. For example, you might create a <literal>C:\cache\</literal> | |
82 | directory and place <command>setup.exe</command> in it. Run | |
83 | <command>setup.exe</command> to <literal>Install from Internet</literal> | |
84 | or <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 | 89 | Though this provides some basic mirroring functionality, if you |
f5e097fa | 90 | are managing a large Cygwin installation, to keep up to date we recommend |
6c7303cd JDF |
91 | using a mirroring tool such as <command>wget</command>. A helpful user on |
92 | the Cygwin mailing list created a simple demonstration script to accomplish | |
7d37d045 JDF |
93 | this; 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> |
99 | The <literal>Root Directory</literal> for Cygwin (default | |
522fcf16 JDF |
100 | <literal>C:\cygwin</literal>) will become <literal>/</literal> |
101 | within your Cygwin installation. You must have write access to | |
102 | the parent directory, and any ACLs on the parent directory will | |
103 | determine access to installed files. | |
7d37d045 JDF |
104 | </para> |
105 | <para> | |
0fd53506 JDF |
106 | The <literal>Install For</literal> options of <literal>All Users</literal> |
107 | or <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 | |
110 | Start Menu. This is true even if you are the only user planning to use Cygwin | |
8fdbcd12 | 111 | on the machine. Selecting <literal>Just Me</literal> will cause problems |
0fd53506 JDF |
112 | for programs such as <command>crond</command> and <command>sshd</command>. |
113 | If you do not have the necessary permissions, but still want to use these | |
114 | programs, 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> |
121 | The <literal>Local Package Directory</literal> is the cache where | |
122 | <command>setup.exe</command> stores the packages before they are | |
489d990b | 123 | installed. The cache must not be the same folder as the Cygwin |
7d37d045 JDF |
124 | root. Within the cache, a separate directory is created for each |
125 | Cygwin mirror, which allows <command>setup.exe</command> to use | |
126 | multiple mirrors and custom packages. After installing Cygwin, | |
127 | the cache is no longer necessary, but you may want to retain the | |
128 | packages as backups, for installing Cygwin to another system, | |
129 | or 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 |
135 | The <literal>Direct Connection</literal> method of downloading will |
136 | directly download the packages, while the IE5 method will leverage your | |
137 | IE5 cache for performance. If your organisation uses a proxy server or | |
138 | auto-configuration scripts, the IE5 method also uses these settings. | |
139 | If you have a proxy server, you can manually type it into | |
7d37d045 JDF |
140 | the <literal>Use Proxy</literal> section. Unfortunately, |
141 | <command>setup.exe</command> does not currently support password | |
142 | authorization for proxy servers. | |
143 | </para> | |
144 | </sect2> | |
145 | ||
85f1119b | 146 | <sect2 id="setup-mirror"><title>Choosing Mirrors</title> |
7d37d045 JDF |
147 | <para> |
148 | Since there is no way of knowing from where you will be downloading | |
149 | Cygwin, you need to choose at least one mirror site. Cygwin mirrors | |
db9a8c99 CV |
150 | are geographically distributed around the world; check the list at |
151 | <ulink url="https://cygwin.com/mirrors.html"/> | |
7d37d045 JDF |
152 | to 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 | |
154 | an unlisted mirror (for example, if your organization has an internal Cygwin | |
155 | mirror) you can add it. | |
156 | </para> | |
157 | </sect2> | |
158 | ||
85f1119b | 159 | <sect2 id="setup-packages"><title>Choosing Packages</title> |
7d37d045 JDF |
160 | <para> |
161 | For each selected mirror site, <command>setup.exe</command> downloads a | |
489d990b | 162 | small text file called <literal>setup.bz2</literal> that contains a list |
7d37d045 | 163 | of packages available from that site along with some basic information about |
489d990b | 164 | each package which <command>setup.exe</command> parses and uses to create the |
db9a8c99 CV |
165 | chooser 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> | |
169 | The chooser is the most complex part of <command>setup.exe</command>. | |
489d990b JDF |
170 | Packages are grouped into categories, and one package may belong to multiple |
171 | categories (assigned by the volunteer package maintainer). Each package | |
35d81b4c | 172 | can be found under any of those categories in the hierarchical chooser view. |
f5e097fa | 173 | By default, <command>setup.exe</command> |
7d37d045 | 174 | will install only the packages in the <literal>Base</literal> category |
489d990b | 175 | and their dependencies, resulting in a minimal Cygwin installation. |
7d37d045 JDF |
176 | However, 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 |
178 | category). Since <command>setup.exe</command> automatically selects |
179 | dependencies, be careful not to unselect any required packages. In | |
180 | particular, everything in the <literal>Base</literal> category is | |
181 | required. | |
7d37d045 JDF |
182 | </para> |
183 | <para> | |
184 | You can change <command>setup.exe</command>'s view style, which is helpful | |
185 | if you know the name of a package you want to install but not which | |
186 | category it is in. | |
187 | Click on the <literal>View</literal> button and it will rotate between | |
188 | <literal>Category</literal> (the default), <literal>Full</literal> (all | |
aab56a41 AK |
189 | packages), and <literal>Pending</literal> (only packages to be |
190 | installed, removed or upgraded). | |
7d37d045 JDF |
191 | If you are familiar with Unix, you will probably want to at least glance |
192 | through the <literal>Full</literal> listing for your favorite tools. | |
193 | </para> | |
194 | <para> | |
195 | Once you have an existing Cygwin installation, the <command>setup.exe</command> | |
196 | chooser is also used to manage your Cygwin installation. | |
197 | Information 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 |
200 | you have no Cygwin installation. If <command>setup.exe</command> | |
7d37d045 JDF |
201 | finds a newer version of an installed package available, it will automatically |
202 | mark it to be upgraded. | |
203 | To <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. | |
206 | Also, to avoid the need to reboot after upgrading, make sure | |
207 | to 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 | 211 | To avoid unintentionally upgrading, use the <literal>Pending</literal> |
8930e4d2 CF |
212 | view to see which packages have been marked for upgrading. If you |
213 | don't want to upgrade a package, click on the new version number to | |
42f8872e AK |
214 | toggle it until it says <literal>Keep</literal>. All packages can be |
215 | set to stay at the installed version by pressing the <literal>Keep</literal> | |
216 | button in the top right part of the chooser window. | |
217 | </para> | |
218 | <para> | |
219 | A previous version of each package is usually available, in case downgrading | |
220 | is required to avoid a serious bug in the current version of the package. | |
221 | Packages also occasionally have testing (or "experimental") versions available. | |
222 | Previous 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> | |
226 | All available experimental packages can be selected by pressing the | |
227 | <literal>Exp</literal> in the top right part of the chooser window. | |
228 | Be warned, however, that the next time you run <command>setup.exe</command> | |
229 | it will try to replace all old or experimental versions with the current | |
230 | version, 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> |
236 | First, <command>setup.exe</command> will download all selected packages | |
237 | to the local directory chosen earlier. Before installing, | |
238 | <command>setup.exe</command> performs a checksum on each package. If the | |
239 | local directory is a slow medium (such as a network drive) this can take | |
240 | a long time. During the download and installation, <command>setup.exe</command> | |
f5e097fa | 241 | shows 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 |
247 | You may choose to install "Cygwin Terminal" shortcuts on the Desktop |
248 | and/or Start Menu. These shortcuts run <command>mintty</command>, | |
249 | which will start your default shell as specified | |
250 | in <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> |
256 | Last of all, <command>setup.exe</command> will run any post-install | |
17b85c59 | 257 | scripts to finish correctly setting up installed packages. |
489d990b JDF |
258 | When the last post-install script is completed, <command>setup.exe</command> |
259 | will display a box announcing the completion. A few packages, such as | |
7d37d045 | 260 | the OpenSSH server, require some manual site-specific configuration. |
489d990b | 261 | Relevant documentation can be found in the <literal>/usr/doc/Cygwin/</literal> |
99d86313 | 262 | or <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> |
267 | Unfortunately, the complex setup process means that odd problems can | |
268 | occur. If you're having trouble downloading packages, it may be network | |
269 | congestion, so try a different mirror and/or a different protocol (i.e., | |
270 | HTTP instead of FTP). If you notice something is not working after | |
271 | running setup, you can check the <command>setup.exe</command> log file | |
272 | at <literal>/var/log/setup.log.full</literal>. Make a backup of this | |
273 | file before running <command>setup.exe</command> again, and follow the | |
db9a8c99 | 274 | steps for <ulink url="https://cygwin.com/problems.html">Reporting |
12d53ce6 JDF |
275 | Problems 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> |