Saturday, October 01, 2005

Installing Cygwin, even with Cygwin.com down

Interesting thing about the Cygwin UNIX shell for Windows - with the Cygwin.com site down at the time of this writing, due to a server disk crash, one can't easily do the Web install of the program, because it wants to look on Cygwin.com for its "mirrors.lst", even though it downloads all the program and package files from mirrors on other sites.

My simple solution: edit my \WINNT\system32\drivers\etc\HOSTS file with two new lines, pointing to my local network webserver:
192.168.0.11 sources.redhat.com
192.168.0.11 cygwin.com #(the updated installer complained that it wanted cygwin.com)
...so, any requests for the above two sites are automatically redirected to my local webserver. I found that the mirrors.lst file resides in /cygwin/, so I got an old copy off of the Internet Archive (although I probably could have used the Google cache), placed it in my webserver's site directory, and went to it.

Then I discovered that my copy of the cygwin setup program was not up-to-date. So I used Google's cache to grab a recent copy of the installation program. Google search term/keyword (just remove the quotes): "cache:www.cygwin.com", visit site, hit download link - it's only about 298KB, so it was cached. So, once I did that, I was able to successfully download and install the packages from one of the mirrors.

I had the idea already, but finding this post helped me get the necessary URLs without having to poke around much.