hadoop-0.21.0 在Windows环境下的部署(1)Cygwin 安装
Cygwin 安裝:
1:下載
http://cygwin.com/setup.exe
http://www.cygwin.com/setup.exe
2:運行
我們看到有三種安裝模式:
?
?Install from Internet,這種模式直接從Internet安裝,適合網速較快的情況;
?Download Without Installing,這種模式只從網上下載Cygwin的組件包,但不安裝;
?Install from Local Directory,這種模式與上面第二種模式對應,當你的Cygwin組件包已經下載到本地,則可以使用此模式從本地安裝Cygwin。
?? 這里需要說明一下的是,第一次全部安裝選擇第一種模式,但是后續我們開發過程中發現一些組件包沒有安裝的話,可以再次運行安裝程序,
?? 選擇第二種模式,也就是單獨下載組件包而不安裝,這樣可以分次下載需要的組件包。等全部組件包下載完畢后,在運行第三種模式從本地安裝組件包。
?? 需要特別注意的是,下載和安裝的時候一定要記住使用的鏡像站點,因為軟件把組件包按照不同的鏡像放置在不同的目錄,如果幾次下載的鏡像不一樣,那從本地安裝的時候,是只能找到最新的一次的鏡像下載的組件包的,這里需要注意。
?
安裝過程中記得選擇所需的包,這里需要的是,請參考下面的圖示:
Net Category下的:openssh,openssl
BaseCategory下的:sed (若需要Eclipse,必須sed,,默認選擇好的)
Devel Category下的:subversion(建議安裝)
?
安裝完成。
cygcheck -c cygwin :查看cygwin當前的版本
cygcheck -c :檢查所有安裝軟件的版本號
uname -a 可以查看cygwin的版本和內核版本
lenovo@lenovo-PC ~ $ uname -a CYGWIN_NT-6.1 lenovo-PC 1.7.20(0.266/5/3) 2013-06-07 11:11 i686 Cygwin如果要查看某一個軟件安裝的版本,直接用cygcheck -c + 軟件名稱,如cygcheck -c gzip
cat? /proc/version也可以獲取需要的信息,上面兩點有點類似Linux
lenovo@lenovo-PC ~ $ cat /proc/version CYGWIN_NT-6.1 version 1.7.20(0.266/5/3) (corinna@calimero.vinschen.de) (gcc version 4.5.3 20110428 (Fedora Cygwin 4.5.3-4) (GCC) ) 2013-06-07 11:11
?
3:配置SSH
安裝完成后,開始配置SSH
1.打開CygWin輸入SSH-HOST-CONFIG
2.系統提示:should privilege? separation be used ? 回答:no
3.系統提示:(say "no" if it is already installed as a service?回答:yes
4.系統提示:Enter the value of CYGWIN for the daemon:[] 回答:ntsec tty
5.系統提示:Do you want to use a different name ? 回答:no
6.好像還要輸入密碼
配置完成后,在系統服務中啟動失敗。
修改登錄用戶:
發生系統錯誤 1069。
由于登錄失敗而無法啟動服務。
yes
yes
yes
ntsec tty
yes
cygwin
cygwin
yes
輸入密碼 再次輸入密碼 好像一定要創建個cygwin用戶才配置成功。 這個是win 7 系統中 ------------------------------------------------------------ 在winxp下面不一樣,不用輸入密碼: Administrator@PC2012071012ysn ~ $ ssh-host-config*** Query: Overwrite existing /etc/ssh_config file? (yes/no) yes *** Info: Creating default /etc/ssh_config file *** Query: Overwrite existing /etc/sshd_config file? (yes/no) yes *** Info: Creating default /etc/sshd_config file *** Info: Privilege separation is set to yes by default since OpenSSH 3.3. *** Info: However, this requires a non-privileged account called 'sshd'. *** Info: For more info on privilege separation read /usr/share/doc/openssh/README.privsep. *** Query: Should privilege separation be used? (yes/no) yes *** Info: Note that creating a new user requires that the current account have *** Info: Administrator privileges. Should this script attempt to create a *** Query: new local account 'sshd'? (yes/no) yes *** Info: Updating /etc/sshd_config file*** Query: Do you want to install sshd as a service? *** Query: (Say "no" if it is already installed as a service) (yes/no) yes *** Query: Enter the value of CYGWIN for the daemon: [] ntsec tty*** Info: The sshd service has been installed under the LocalSystem *** Info: account (also known as SYSTEM). To start the service now, call *** Info: `net start sshd' or `cygrunsrv -S sshd'. Otherwise, it *** Info: will start automatically after the next reboot.*** Info: Host configuration finished. Have fun! ------------------------------------------------------------ 4.回到CygWin環境:執行如下命令:
1.ssh-keygen然后一直回車
2.cd ~/.ssh
3.cp id_rsa.pub authorized_keys
4.exit 退出cygwin,若不退出,可能出錯 5運行 ssh localhost? 若有提示,則回車。
6執行 ps? 若看到 有/usr/bin/ssh 進程,說明成功 參考: http://blog.csdn.net/ruby97/article/details/7423088 http://blog.csdn.net/zhuying_linux/article/details/7860712
總結
以上是生活随笔為你收集整理的hadoop-0.21.0 在Windows环境下的部署(1)Cygwin 安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: org.apache.hadoop.ut
- 下一篇: hadoop-0.21.0 在Windo