依照內定值, AnswerBook2 文件伺服器的執行一如包括在 SUNWab2u 套裝軟體中,插入 httpd 伺服器上的NSAPI。因為 AnswerBook2 伺服器符合標準的全球資訊網協定,所以您可以選擇作為CGI(共用通徑介面)處理一般在一些已經於您系統上的其它全球資訊網伺服器上執行文件伺服器(例如,Netscape 伺服器或 Sun Web 伺服器)。
如果您從內定 AnswerBook2 全球資訊網伺服器做變更,請注意,下列的功能將無法運作:
/usr/lib/ab2/bin/ab2admin -o start
/usr/lib/ab2/bin/ab2admin -o stop
/etc/init.d/ab2mgr start
/etc/init.d/ab2mgr stop
從管理 GUI 鍵入 restart 以重新啟動
因為特定詳細資訊視全球資訊網伺服器而有所不同,所以此程序描述您需要遵循的一般步驟使用以 CGI 為基礎的全球資訊網伺服器,而非內定(NSAPI 插入)伺服器。特定範例包括於 Sun Web 伺服器 與 Netscape 伺服器之下。
如果 AnswerBook2 伺服器正在執行,請將其關閉。
使用下列指令之一:
# /usr/lib/ab2/bin/ab2admin -o stop #/etc/init.d/ab2mgr stop |
編輯您全球資訊網伺服器的配置檔案並使圖像可供使用。
您的全球資訊網伺服器文件應解釋特定的詳細資訊,例如要到何處尋找配置檔案。登錄/icons/ 應指到 /usr/lib/ab2/data/docs/icons/。
如果 /icons/已被使用,請於 /usr/lib/ab2/data/docs/icons/ 中連結所有檔案至現存的 /icons/ 目錄。
連結 AnswerBook2 輔助說明文件至目前的文件根目錄。
到您的全球資訊網伺服器的文件根目錄並建立軟式連結至/usr/lib/ab2/data/docs/。
使 AnswerBook2 cgi-bin 檔案可使用於您的伺服器。
到您的全球資訊網伺服器的 cgi-bin 目錄並建立軟式連結至下列:
/usr/lib/ab2/bin/cgi/admin /usr/lib/ab2/bin/cgi/nph-dweb /usr/lib/ab2/bin/cgi/gettransbitmap /usr/lib/ab2/bin/cgi/getepsf /usr/lib/ab2/bin/cgi/getframe /usr/lib/ab2/bin/cgi/ab2srwrap |
編輯您的全球資訊網伺服器的配置檔案與對應 /ab2/ 以呼叫 AnswerBook2 cgi。
您的全球資訊網伺服器文件應解釋特定詳細資訊,例如到何處尋找配置檔案。您需要變更/ab2/ 的登錄至 /usr/lib/ab2/bin/cgi/nph-dweb/ab2/。
編輯 AnswerBook2 管理配置檔案。
您需要編輯 /usr/lib/ab2/bin/cgi/nph-dweb 檔案並變更 伺服器類型、錯誤登錄 與 存取登錄 的登錄。
依照內定值, Sun Web Server 配置檔案是 /etc/http/httpd.conf 且檔案是在/var/http/demo/ 中。如果您沒有安裝 於內定位置 (/usr/),所有以 /usr/lib/ab2/ 開始的路徑應為您安裝檔案的路徑(例如,/usr2/lib/ab2/)。
編輯 /etc/http/httpd.conf 檔案並將下行放在檔案的 伺服器 區段中:
map/icons /usr/lib/ab2/data/docs/icons |
當您作出此變更時,使用以下指令重新啟動 SWS 伺服器:
# /etc/init.d/httpd start |
如果要驗證您的變更,請在您的全球資訊網瀏覽器中輸入以下的 URL 查看輔助說明圖像:
http://localhost:port/icons/ab2_help.gif |
port 是您的文件伺服器在其上執行的通訊埠編號,且其內定值為 8888。
到 /var/http/demo/public/ 目錄,並放在以下軟式連結中:
# ln -s/usr/lib/ab2/data/docs/Help Help |
如果要驗證您的變更,在您的全球資訊網瀏覽器中輸入以下 URL 看輔助說明圖像:
http://localhost:port/Help/C/Help/books/Help/figures/ab2_help.gif |
port 是您的文件伺服器在其上執行的通訊埠編號,且內定值為 8888。
到 /var/http/demo/cgi-bin/ 目錄並建立下列軟式連結:
# ln -s /usr/lib/ab2/bin/cgi/admin # ln -s /usr/lib/ab2/bin/cgi/nph-dweb # ln -s /usr/lib/ab2/bin/cgi/gettransbitmap # ln -s /usr/lib/ab2/bin/cgi/getepsf # ln -s /usr/lib/ab2/bin/cgi/getframe # ln -s /usr/lib/ab2/bin/cgi/ab2srwrap |
如果要驗證您的變更,請在您的全球資訊網瀏覽器中輸入以下的 URL 查看 AnswerBook2 程式庫頁:
http://localhost:port/cgi-bin/nph-dweb/ab2 |
port是您的文件伺服器在其上執行的通訊埠編號,且內定值為 8888。
編輯 /etc/http/httpd.conf 檔案,並將以下登錄增加到檔案的主機區段中:
map /ab2 /var/http/demo/cgi-bin/nph-dweb/ab2 cgi |
使用以下指令重新啟動 SWS 伺服器:
# /etc/init.d/httpd start |
如果要驗證您的變更,請在您的全球資訊網瀏覽器中輸入以下的 URL 查看 AnswerBook2 程式庫頁:
http://localhost:port/ab2 |
port 是您的文件伺服器在其上執行的通訊埠編號,且內定值為 8888。
編輯 /usr/lib/ab2/bin/cgi/nph-dweb 檔案並變更下列登錄:
setenv servertype sws setenv errorlog setenv accesslog /var/http/logs/http.elf.1 |
有關此範例,Netscape 伺服器配置檔案是 /ul/netscape/suitespot/httpd- threads1/config/obj.conf 且檔案在 /ul/netscape/suitespot/docs/ 中。如果您沒有安裝 於內定位置 (/usr/),所有以 /usr/lib/ab2/ 開始的路徑應為您安裝檔案的路徑(例如,/usr2/lib/ab2/)。
編輯 /ul/netscape/suitespot/httpd-threads1/config/obj.conf 檔案並增加下行:
NameTrans fn="pfx2dir" from="/icons" dir="/usr/lib/ab2/data/docs/icons" |
如果要驗證您的變更,重新啟動 Netscape 伺服器。然後,在您的全球資訊網瀏覽器中輸入以下的 URL 來看輔助說明圖像:
http://localhost:port/icons/ab2_help.gif |
到 /ul/netscape/suitespot/docs/ 目錄並放在以下軟式連結中:
# ln -s /usr/lib/ab2/data/docs/Help Help |
如果要驗證您的變更,在您的全球資訊網瀏覽器中輸入以下的 URL 來看輔助說明圖像:
http://localhost:port/Help/C/Help/books/Help/figures/ab2_help.gif |
port 是您的文件伺服器在其上執行的通訊埠編號,且其內定值為 8888。
到 /ul/netscape/suitespot/cgi-bin/ 目錄並建立下列的軟式連結:
# ln -s /usr/lib/ab2/bin/cgi/admin # ln -s /usr/lib/ab2/bin/cgi/nph-dweb # ln -s /usr/lib/ab2/bin/cgi/gettransbitmap # ln -s /usr/lib/ab2/bin/cgi/getepsf # ln -s /usr/lib/ab2/bin/cgi/getframe # ln -s /usr/lib/ab2/bin/cgi/ab2srwrap |
如果要驗證您的變更,在您的全球資訊網瀏覽器中輸入以下的 URL 來看 AnswerBook2 程式庫頁:
http://localhost:port/cgi-bin/nph-dweb/ab2 |
port 是您的文件伺服器在其上執行的通訊埠編號,且其內定值為 8888。
編輯 /ul/netscape/suitespot/httpd-threads1/config/obj.conf 檔案並增加以下的登錄:
NameTrans fn="pfx2dir" from="/ab2" dir="/ul/netscape/suitespot/cgi-bin/nph-dweb/ab2" name="cgi" |
如果要驗證您的變更,請重新啟動 Netscape 伺服器並在您的全球資訊網瀏覽器中輸入以下的URL 來看 AnswerBook2 程式庫頁:
http://localhost:port/ab2 |
port 是您的文件伺服器在其上執行的通訊埠編號,且其內定值為 8888。
編輯 /usr/lib/ab2/bin/cgi/nph-dweb 檔案並變更下列的登錄:
setenv servertype netscape setenv errorlog /ul/netscape/suitespot/httpd-threads1/logs/errors setenv accesslog /ul/netscape/suitespot/httpd-threads1/logs/access |