Cygwin便携版安装。
1. 说明
是使用脚本安装的,Github项目地址:https://github.com/vegardit/cygwin-portable-installer 。
2. 安装步骤
2.1 新建cygwin-portable
目录作为cygwin的安装目录,复制cygwin-portable-installer.cmd
到cygwin-portable
目录。
2.2 解决错误cygwin-portable-installer.cmd
下载cygwin安装包setup-x86_64.exe
的错误:
curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092013) - 由于吊销服务器已脱机,吊销功能无法检查吊销。
修改cygwin-portable-installer.cmd
中的下载函数:download_with_curl
为:
:: not to check certificate revocation curl %1 -# -o %2 --ssl-no-revoke || goto :fail
2.3 cygwin-portable-installer.cmd
脚本做了下面的事情:
Execute the cygwin-portable-installer.cmd. This will automatically:
- download the 32-bit or 64-bit Cygwin setup.exe depending on your OS
- install Cygwin with the pre-selected set of packages
- install the ConEmu tabbed terminal
- create an init scripts that will keep the installation portable
- install the apt-cyg command-line package manager
- install the bash-funk Bash toolbox with it’s adaptive Bash prompt
- install optional toos:
- Ansible
- AWS CLI
- Node.js
- testssl.sh
2.4 自定义配置,创建cygwin-portable-installer-config.cmd
在cygwin-portable
目录,覆盖默认选项:
set PROXY_HOST=127.0.0.1 set PROXY_PORT=1070 set CYGWIN_MIRROR=https://mirrors.tuna.tsinghua.edu.cn/cygwin/ set CYGWIN_PACKAGES=curl,unzip,wget,zip set INSTALL_APT_CYG=yes set INSTALL_BASH_FUNK=no set INSTALL_NODEJS=no set INSTALL_ANSIBLE=no set INSTALL_AWS_CLI=no set INSTALL_TESTSSL_SH=no
2.5 执行cygwin-portable-installer.cmd,等待安装完成。
2.6 运行脚本cygwin-portable.cmd,启动cygwin。