不過,用標準方法安裝的 Cygwin,terminal 是架構在 DOS 視窗之上,非常不好用。我推薦大家使用 rxvt。首先,你必須重跑 setup.exe 來安裝 Shells 底下 rxvt 這個 package,然後自己建立如下的捷徑:
C:\Cygwin\bin\rxvt.exe -sr -sl 1000 -e /bin/bash --login -irxvt 的參數就不仔細介紹了,請大家自己 man man 看。
靠軟體謀生真不易... 勤作筆記,幫助記憶...
C:\Cygwin\bin\rxvt.exe -sr -sl 1000 -e /bin/bash --login -irxvt 的參數就不仔細介紹了,請大家自己 man man 看。
W: GPG error: http://download.tuxfamily.org p701 Release: 由於沒有公鑰,下列簽名無法進行驗證: NO_PUBKEY 2042B4BAF2BCFBF8
W: 用『apt-get -f install』指令或許能修正這些問題。
無法啟動服務,可能因為服務已停用,或它沒有相關的啟用裝置。解決方法是:
/usr/bin/nfs-server-config執行時會出現以下畫面,請回答 yes:
This script sets up a default configuration for running an NFS server under
Cygwin. As part of this setup, the script will do the following:
1) Create a user account to run the services under. [OPTIONAL]
2) Install portmap, mountd, and nfsd as Windows services.
3) Create a sample exports file.
4) Create a sample uid/gid mapping file.
After installing, please read the nfs-server README for Cygwin:
/usr/share/doc/Cygwin/nfs-server-2.3-*.README
This document contains notes on installation and documents known problems
and workarounds with the NFS server; ex:
- ISSUE : Recommend using ntsec
- ISSUE : Daemons are single-threaded
- ISSUE : Daemons require 'impersonate logged on user' right.
- ISSUE : Daemons cannot re-export mapped network drives
- ISSUE : Daemons expect 'nobody' or 'Guest' as anonymous user
- ISSUE : Portmap service fails to start
- ISSUE : Cannot export Windows directories not under Cygwin root
- ISSUE : Considerations when mapping UIDs/GIDs
Do you want to continue? (yes/no)
接下來的畫面是詢問你要不要使用 separate user account 來執行 NFS Server,在 XP 上一定要回答 yes。接下來會問你帳號名稱和密碼。這個帳號是在 XP 上的帳號,用來執行 service 的,帳號密碼都要對才可以 (請仔細輸入帳號,不然有許多設定需要修改,相當麻煩):Checking for other Unix environments on this system ...
Good! There doesn't seem to be any other Unix environments installed.
You can choose to install the services so that they run under the local system
account, or under a separate user account. Which option you should choose
depends on which version of Windows you are running:
Windows 2000 : You may run nfsd under either a local system account or
a separate user account. You _probably_ want to run under
the local system account.
Windows XP : You _must_ run nfsd under a separate user account.
If you choose to run nfsd under a separate user account, you will be prompted
for a user name and password. If the user name you supply does not exist,
it will be created.
Do you want to run nfsd under a separate user account? (yes/no)
設定/home/share/home/share 開放給所有人讀取;/cygdrive/d/work (即 D:\work,在 Cygwin,要用 /cygdrive/c 來代表 C:,餘此類推) 只給來自 192.168.6.14 的 client 讀寫。
/cygdrive/d/work 192.168.6.14(rw)
A language is said to support a style of programming if it provides facilities that make it convenient (reasonably easy, safe, and efficient) to use that style. A language does not support a technique if it takes exceptional effort or skill to write such programs; it merely enables the technique to be used.在接下來的 programming styles 介紹當中,我們可以更了解這兩個概念的不同之處。
Decide which procedures you want;也就是說,先想好一件工作需要由哪些 procedures 完成;再用最好的演算法完成這些 procedures。Fortran 算是 support 這種程式設計方式的始祖,C 也 support 這種設計方法。
use the best algorithms you can find.
Decide which modules you want;也就是說,以資料為中心,將相關的資料和 procedures 結合成各自獨立的 module。Module 和 module 之間,資料是隱藏起來的,所以此種法則也叫做 data-hiding principle。Modula-2 直接 support 這種程式設計方式,但 C 只能算是 enable 這種方法。
partition the program so that data is hidden within modules.
Decide which types you want;也就是說,先想好有哪些資料型態要操作,然後為每一個資料型態設計完整的操作程序。
provide a full set of operations for each type.
Decide which classes you want;也就是說,先想好有哪些類別要操作,然後為每一個類別設計完整的操作程序;類別和類別之間的共通特性要以繼承的方式來處理。
provide a full set of operations for each class;
make commonality explicit by using inheritance.
Decide which algorithms you want;這一部份,我還要多多努力學習才行。
parameterize them so that they work for
a variety of suitable types and data structures.