Original URL: http://zengrong.net/post/1792.htm
Cygwin's package management tool Setup.exe is really hard to use to make people egg broken. So there is a apt-cyg that can provide an experience similar to Apt-get.
Apt-cyg is written using bash, so even compilation is saved.
Installing APT-CYG
wget http://apt-cyg.googlecode.com/svn/trunk/apt-cygchmod +x APT-CYGMV apt-cyg/usr/local/bin/
The GitHub address is HTTPS://GITHUB.COM/WESTFLY/APT-CYG and can be downloaded directly.
(original URL: http://www.cnblogs.com/westfly/p/3515829.html)
Install package
APT-CYG Install BC
Find Packages
Apt-cyg Find PHP
Set up download sites and cache directories
Apt-cyg-c/cygdrive/d/downloads/cygwin-m http://mirrors.163.com/cygwin/find PHP
You can also save the default cache and download site to a file, edit Apt-cyg, find 68 rows:
#mirror =ftp://mirror.mcs.anl.gov/pub/cygwin#cache=/setupmirror=http://mirrors.163.com/cygwincache=/cygdrive/d/ Downloads/cygwin
Of course, PHP does not exist in the official source of Cygwin, and we can use the source provided by Cygwinports:
$ apt-cyg-m ftp://ftp.cygwinports.org/pub/cygwinports Find phpworking directory is/cygdrive/d/downloads/software/ Cygwinmirror is ftp://ftp.cygwinports.org/pub/cygwinports--2013-01-08 12:08:07--ftp://ftp.cygwinports.org/pub/ cygwinports/setup.bz2 = ". Listing" parsing host ftp.cygwinports.org (ftp.cygwinports.org) ... 209.132.180.131 connecting ftp.cygwinports.org (ftp.cygwinports.org) |209.132.180.131|:21 ... is connected. Logging in anonymous ... Login Successful! ==> Syst ... Complete. ==> PWD ... Complete. ==> TYPE I ... Complete. ==> CWD (1)/pub/cygwinports ... Complete. ==> PASV ... Complete. ==> LIST ... Complete. [<=>] 966--.-k/s spents 0.01s2013-01-08 12:08:12 (95. 4 kb/s)-". Listing" saved [966] deleted ". Listing". --2013-01-08 12:08:12--ftp://ftp.cygwinports.org/pub/cygwinports/setup.bz2 = "setup.bz2" ==> does not require CWD. ==> PASV ... Complete. ==> RETR setup.bz2 ... Complete. Length: 580198 (567K) 100%[============================================================>] 580,198 52.2k/s spents 16s2013-01-08 12:08:29 (35.5 kb/s)-"setup.bz2" saved [580198]updated setup.inisearching for Insta lled Packages matching php:phpphp-archive_tarphp-console_getoptphp-pearphp-structures_graph# the following omitted ...
Go to Cygwin Package Manager: Apt-cyg