📄 install.texinfo
字号:
@chapter Installation Instructions@section ContentsUnlike previous net releases such as B20.1 and earlier, there is nomonolithic "full" or "usertools" installation. Rather, you can pick andchoose the packages you wish to install, and update them individually.For a searchable list of packages that can be installed with Cygwin,see @file{http://cygwin.com/packages/}.Full source code is available for all packages and tools.There is only one recommended way to install Cygwin, which is to use the GUIinstaller ``Cygwin Setup''. It is flexible and easy to use.Do it any other way, and you're on your own! That said, keep in mindthat the GUI installer is a "work in progress", so there might be a fewdifficulties, especially if you are behind a firewall or have otherspecific requirements. If something doesn't work right for you, andit's not covered here or elsewhere, then by all means report it to themailing list.@section Installation using ``Cygwin Setup''The Cygwin Setup program is the only recommended way to install Cygwin,but it is still a work in progress. Expect features and functionalityto change. For this reason, it is a good idea to note the version andbuild time reported by Cygwin Setup when you run it. This will helpdiagnose problems, should you have any. Check the cygwin mailing listfor the latest news about Cygwin Setup.@subsection Why not install in C:\?The Cygwin Setup program will prompt you for a "root" directory.The default is @samp{C:\cygwin}, but you can change it. You are urged not tochoose something like 'C:\' (the root directory on the system drive) foryour Cygwin root. If you do, then critical Cygwin system directorieslike 'etc', 'lib' and 'bin' could easily be corrupted by other (non-Cygwin)applications or packages that use \etc, \lib or \bin. Perhaps there isno 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.(In the past, there had been genuine bugs that would cause problemsfor people who installed in C:\, but we believe those are gone now.)@subsection Can I use Cygwin Setup to update a B18, B19, B20, B20.1 or CD-ROM (1.0) installation of Cygwin?No, you must start from scratch with the new Cygwin Setup. Theoverall structure has changed so much that it would be pointless totry to accomodate old installations of Cygwin. You will probably bemuch better off with a whole new installation anyway. You may backupor rename your old installation first, or just install the new onesomewhere else. Be sure to make note of your current mount table,because this will be overwritten during the new setup. Make sure youdon't end up with two different versions of @samp{cygwin1.dll} on yoursystem.Once you've installed the latest net release, Cygwin Setup will updatejust the individual packages that need it.@subsection Is Cygwin Setup, or one of the packages, infected with a virus?Unlikely. Unless you can confirm it, please don't report it to themailing list. Anti-virus products have been known to detect falsepositives when extracting compressed tar archives. If this causesproblems for you, consider disabling your anti-virus software whenrunning @code{setup}. Read the next entry for a fairly safe way to dothis.@subsection My computer hangs when I run Cygwin Setup!Both Network Associates (formerly McAfee) and Norton anti-virusproducts have been reported to "hang" when extracting Cygwin tararchives. If this happens to you, consider disabling your anti-virussoftware when running Cygwin Setup. The following procedure should bea fairly safe way to do that:@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.@item Re-activate your anti-virus software and scan everythingin C:\cygwin (or wherever you chose to install), or your entire harddisk if you are paranoid.@end enumerateThis should be safe, but only if Cygwin Setup is not substituted bysomething malicious, and no mirror has been compromised.@subsection What packages should I download?When using Cygwin Setup for the first time, the default is to installa minimal subset of packages. If you want anything beyond that, youwill have to select it explicitly. See@file{http://cygwin.com/packages/} for a searchable list of availablepackages.If you want to build programs, of course you'll need @samp{gcc},@samp{binutils}, @samp{make} and probably other packages from the``Devel'' category.@subsection How do I just get everything?In the past, the default was to install everything, much to theirritation of many users. Now the default is to install only a basiccore of packages. Cygwin Setup is designed to make it easy to browsecategories and select what you want to install or omit from thosecategories. It's also easy to install everything:@enumerate@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.It may take a few seconds to register the change.) This tells Setupto install @emph{everything}, not just what it thinks you should haveby default.@item Now click on the ``View'' button (twice) until you get the``Partial'' view. This shows exactly which packages are about to bedownloaded and installed.@end enumerateThis procedure only works for packages that are currently available.There is no way to tell Cygwin Setup to install all packages bydefault from now on. As new packages become available that would notbe installed by default, you have to repeat the above procedure to getthem.In general, a better method (in my opinion), is to:@enumerate@item First download & install all packages that would normally beinstalled by default. This includes fundamental packages and anyupdates to what you have already installed. Then...@item Run Cygwin Setup again, and apply the above technique to get allnew packages that would not be installed by default. You can checkthe list in the Partial View before proceeding, in case there'ssomething you really @emph{don't} want.@end enumerate@subsection How much disk space does Cygwin require?That depends, obviously, on what you've chosen to download andinstall. A full installation is probably close to 500MB installed,not including the package archives themselves or the source code.After installation, the package archives remain in your ``Local PackageDirectory'', by default the location of @code{setup.exe}. You mayconserve disk space by deleting the @code{contrib} and @code{latest}subdirectories there.@subsection What if setup fails?First, make sure that you are using the latest version of CygwinSetup. It is a work in progress, with improvements and bugfixes beingmade often. The latest version is always available from the 'InstallCygwin now' link on the Cygwin Home Page at @file{http://cygwin.com/}.If you are downloading from the internet, setup will fail if it cannotdownload the list of mirrors at@file{http://cygwin.com/mirrors.html}. It could be thatthe network is too busy. Similarly for an ftp download site that isn'tworking. Try another mirror, or try again later.If setup refuses to download a package that you know needs to beupgraded, try deleting that package's entry from /etc/setup. If you arereacting quickly to an announcement on the mailing list, it could bethat the mirror you are using doesn't have the latest copy yet. Tryanother mirror, or try again tomorrow.If setup has otherwise behaved strangely, check the files@samp{setup.log} and @samp{setup.log.full} in @code{/var/log}(@code{C:\cygwin\var\log} by default). It may provide some clues asto what went wrong and why.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 mailinglist. You must provide complete details in your query: version ofsetup, options you selected, contents of setup.log and setup.log.full,what happened that wasn't supposed to happen, etc.@subsection My Windows logon name has a space in it, will this cause problems?Most definitely yes! UNIX shells (and thus Cygwin) use the spacecharacter as a word delimiter. Under certain circumstances, it ispossible to get around this with various shell quoting mechanisms, butyou are much better off if you can avoid the problem entirely.In particular, the environment variables @samp{USER} and @samp{HOME} areset for you in /etc/profile. By default these derive from your Windowslogon name. You may edit this file and set them explicitly to somethingwithout spaces.(If you use the @samp{login} package or anything else that reads/etc/passwd, you may need to make corresponding changes there. See theREADME file for that package.)@subsection How do I uninstall individual packages?Run Cygwin Setup as you would to install packages. In the list ofpackages to install, browse the relevant category or click on the``View'' button to get a full listing. Click on the cycle glyph untilthe action reads ``Uninstall''. Proceed by clicking ``Next''.@subsection How do I uninstall @strong{all} of Cygwin?Setup has no automatic uninstall facility. Just delete everythingmanually:@itemize @bullet@item Cygwin shortcuts on the Desktop and Start Menu@item The registry tree @samp{Software\Cygnus Solutions} under@code{HKEY_LOCAL_MACHINE} and/or @code{HKEY_CURRENT_USER}.@item Anything under the Cygwin root folder, @samp{C:\cygwin} bydefault.@item Anything created by setup in its temporary working directory.@end itemizeIt's up to you to deal with other changes you made to your system, suchas installing the inetd service, altering system paths, etc. Setupwould not have done any of these things for you.@subsection How do I install snapshots?First, are you sure you want to do this? Snapshots are risky. Theyhave not been tested. Use them @strong{only} if there is a feature orbugfix that you need to try, and you are willing to deal with anyproblems.Before installing a snapshot, you must first Close @strong{all} Cygwinapplications, including shells and services (e.g. inetd, sshd), beforeupdating @code{cygwin1.dll}. You may have to restart Windows to clearthe 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 beable to update @code{/usr/bin/cygwin1.dll}, but it should succeed witheverything else.@enumerate@item Download the snapshot, and run:@example cd / tar jxvf /posix/path/to/cygwin-inst-YYYYMMDD.tar.bz2 --exclude=usr/bin/cygwin1.dll cd /tmp tar jxvf /posix/path/to/cygwin-inst-YYYYMMDD.tar.bz2 usr/bin/cygwin1.dll@end example@item After closing all Cygwin apps (see above), use Explorer or theWindows command shell to move @code{C:\cygwin\tmp\usr\bin\cygwin1.dll}to @code{C:\cygwin\bin\cygwin1.dll}.@end enumerate
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -