Windows下安裝Cygwin及包管理器apt-cyg(轉)


本文為轉載文章:
 http://www.2cto.com/os/201212/176551.html

Cygwin可以在Windows下使用unix環境Bash和各種功能強大的工具,對於Linux管理員來說不想使用Linux桌面是必備的工具。
Cygwin下也有類似Linux下包管理工具apt-cyg,可以方便的通過網絡安裝各種軟件。
1. 下載安裝:http://cygwin.com/setup.exe
2.選擇安裝源及軟件,如需安裝apt-cyg需安裝以下軟件包:
 
wget
tar
gawk
bzip2
 
3.Cygwin安裝完成后打開Cygwin Terminal安裝apt-cyg包管理器:
 
wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg -P /bin
chmod.exe +x /bin/apt-cyg
 
apt-cyg安裝源為ftp://mirror.mcs.anl.gov,設置為網易鏡像源。
 

apt-cyg update --mirror http://mirrors.163.com/cygwin/

 
使用apt-cyg安裝軟件:
 
apt-cyg update
#更新源
apt-cyg install ping -u
#使用參數u不必每次都更新源
Working directory is /setup
Mirror is http://mirrors.163.com/cygwin/
 
Installing ping
Found package ping
--2012-12-05 09:59:20--  http://mirrors.163.com/cygwin//release/ping/ping-1.0-1.tar.bz2
正在解析主機 mirrors.163.com (mirrors.163.com)... 123.58.173.89, 123.58.173.106
正在連接 mirrors.163.com (mirrors.163.com)|123.58.173.89|:80... 已連接。
已發出 HTTP 請求,正在等待回應... 200 OK
長度:8352 (8.2K) [application/octet-stream]
正在保存至: “ping-1.0-1.tar.bz2”
 
100%[==============================================>] 8,352       --.-K/s 用時 0.1s
 
2012-12-05 09:59:21 (64.1 KB/s) - 已保存 “ping-1.0-1.tar.bz2” [8352/8352])
 
Unpacking...
Package ping requires the following packages, installing:
cygwin
Package cygwin is already installed, skipping
Package ping installed
 
Cygwin安裝procps,包含uptime/free/top等常用工具:
 
bin/prockill.exe
bin/procps.exe
sbin/sysctl.exe
usr/bin/free.exe
usr/bin/pgrep.exe
usr/bin/pkill.exe
usr/bin/pmap.exe
usr/bin/pwdx.exe
usr/bin/skill.exe
usr/bin/slabtop.exe
usr/bin/snice.exe
usr/bin/tload.exe
usr/bin/top.exe
usr/bin/uptime.exe
usr/bin/vmstat.exe
usr/bin/w.exe
usr/bin/watch.exe
 
DOS命令輸出編碼為GBK,Cygwin下默認為UTF-8,兼顧顯示亂碼的問題設置Cygwin編碼為GBK:
 
export LANG="zh_CN.GBK"
 
其它設置:
 
alias ls="ls --color=auto"
export PS1="\[\e]0;\w\a\]\[\e[32m\]\u@\h:\[\e[33m\]\w\[\e[0m\]\$ "


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM