日本免费全黄少妇一区二区三区-高清无码一区二区三区四区-欧美中文字幕日韩在线观看-国产福利诱惑在线网站-国产中文字幕一区在线-亚洲欧美精品日韩一区-久久国产精品国产精品国产-国产精久久久久久一区二区三区-欧美亚洲国产精品久久久久

unix大雜燴--基礎(chǔ)型二( 七 )



在 SCO Unix 網(wǎng)絡(luò)中設(shè)置共享打印機(jī)當(dāng)前隨著網(wǎng)絡(luò)的日益普及 , 計(jì)算機(jī)系統(tǒng)通過(guò)網(wǎng)絡(luò)實(shí)現(xiàn)設(shè)備共享和資源共享已十分普遍 。在一個(gè)公共的網(wǎng)絡(luò)環(huán)境中 , 設(shè)置一臺(tái)共享打印機(jī)不僅可以大大提高設(shè)備的利用率和網(wǎng)絡(luò)效率 , 降低最少擁有成本 , 還省去了操作人員長(zhǎng)期習(xí)慣于每打印一份作業(yè)便抱一臺(tái)打印機(jī)連到自己電腦上的麻煩 。DOS 、 Windows 、 NetWare 系統(tǒng)下共享打印機(jī)設(shè)置比較簡(jiǎn)單 , 無(wú)需多言 。SCO Unix 作為金融系統(tǒng)和其他大行業(yè)首選的操作系統(tǒng) , 近年來(lái)組網(wǎng)非常廣泛 , 應(yīng)用也非常普及 , 但設(shè)置共享打印機(jī)比較麻煩 , 這方面的文章也不多見(jiàn) 。筆者經(jīng)過(guò)多次試驗(yàn) , 終獲成功 , 示于大家僅供參考 。
一、工作原理共享打印機(jī)是按一定拓?fù)浣Y(jié)構(gòu)連接到網(wǎng)絡(luò)上的打印機(jī) , 通過(guò)網(wǎng)絡(luò)協(xié)議 (TCP/IP 、 NetBEUI 、 IPX/SPX 等 ) 而被網(wǎng)絡(luò)用戶(hù)所共享 。其連接主要有以下三種方式 :1. 打印機(jī)本身帶網(wǎng)卡 ( 又稱(chēng)網(wǎng)絡(luò)打印機(jī) ), 直接連到網(wǎng)絡(luò)中供用戶(hù)共享 。2. 打印機(jī)連接到專(zhuān)用的打印服務(wù)器上 , 并通過(guò)其網(wǎng)絡(luò)接口連到網(wǎng)絡(luò)中供用戶(hù)共享。3. 使用網(wǎng)絡(luò)上的一臺(tái) PC 或服務(wù)器兼做打印服務(wù)器 , 連上打印機(jī)供用戶(hù)共享。比較而言 , 前兩種方式需購(gòu)置專(zhuān)用設(shè)備 , 同時(shí) Unix 下還需設(shè)置 Bootp 或 Rarp 服務(wù) , 以自動(dòng)提供 IP 地址 。而第三種方式無(wú)需購(gòu)置專(zhuān)用設(shè)備 , 且不影響計(jì)算機(jī)的正常使用 , 經(jīng)濟(jì)實(shí)用 , 簡(jiǎn)單方便 , 大大節(jié)約運(yùn)行成本 , 也是下面所要介紹的 。二、實(shí)現(xiàn)過(guò)程以網(wǎng)絡(luò)中有兩臺(tái)主機(jī) A 、 B 為例, 操作系統(tǒng)為 SCO Openserver 3.0 或 5.0, 打印機(jī)連到兼做打印服務(wù)器的一臺(tái)主機(jī)上 , 供兩臺(tái)主機(jī)所支持的客戶(hù)端共享 。設(shè)主機(jī) A 名為 hosta,IP 地址為 168.1.8.1; 主機(jī) B 名為 hostb,IP 地址為 168.1.8.2;打印機(jī)名為 printer。調(diào)整 Unix 核心系統(tǒng)參數(shù) Nregion: A 機(jī)不低于 800,B 機(jī)不低于 1000, 并連接核心重新引導(dǎo)系統(tǒng) 。1. B 機(jī)端設(shè)置以 root 用戶(hù)進(jìn)行注冊(cè) :(1) 定義主機(jī)名 。修改文件 /etc/hosts 使之包含以下行 :168.1.8.1 hosta168.1.8.2 hostb(2) 定義打印服務(wù)授權(quán) 。修改文件 /etc/hosts.lpd 使之包含以下行 :hosta(3) 建立本地打印機(jī) printer ( 如已存在先刪除 ), 設(shè)為缺省并激活 :#mkder lp選 Configure- Add其中Printer name: printerConnection: DirectDevice name: /dev/lp0#/usr/lib/lpadmin -d printer#enable printer(4) 建立網(wǎng)絡(luò)方式下的本地打印機(jī) , 名稱(chēng)同上為 printer。當(dāng)詢(xún)問(wèn)是本地 (local) 還是遠(yuǎn) 程 (remote) 時(shí) , 選擇本地 。#mkdev rlp 提示如下 :Remote printing configurationDo you want to installor remove remote printing_ (i/r/q)? : iInstalling Remote Line PrintingCreating directories /usr/lpd/remote and /usr/spool_/lpd and file /etc/printcap.Saving lp, cancel and lpstat commands to /usr/lpd_/remoteInstalling remote lp, cancel and lpstat commandsDo you wish to change the printer description file_/etc/printcap? (y/n) yRemote Printing ConfigurationEnter information for remote printers orlocal printers_ acceptingremote printing requestsPlease enter the printer name (q to quit): printerIs printer a remote printer or a local printer (r/l)? lPlease enter the the name of the device for printer_: /dev/lp0Printer printer uses device /dev/lp0Is this correct? (y/n) yRemote Printing ConfigurationEnter information for remote printers or local printers_ acceptingremote printing requestsPlease enter the printer name (q to quit): qDo you want to start remote daemon now? (y/n) y2. A 機(jī)端設(shè)置以 root 用戶(hù)進(jìn)行注冊(cè) :(1) 定義主機(jī)名 。修改文件 /etc/hosts, 使包含以下行 :168.1.8.1 hosta168.1.8.2 hostb(2) 建立網(wǎng)絡(luò)方式下的遠(yuǎn)程打印機(jī) , 遠(yuǎn)程主機(jī)名輸 hostb, 遠(yuǎn)程打印機(jī)名輸 printer, 詢(xún) 問(wèn)本地 (local) 還是遠(yuǎn)程 (remote) 時(shí) , 選擇遠(yuǎn)程 。#mkdev rlpRemote printing configurationDo you want to install or removeremote printing_ (i/r/q)? : iInstalling Remote Line PrintingCreating directories /usr/lpd/remote and /usr/spool_/lpd and file /etc/printcap.S aving lp, cancel and lpstat commands to /usr/lpd_/remoteInstalling remote lp, cancel and lpstat commandsDo you wish to change the printer description file_/etc/printcap? (y/n) yRemote Printing ConfigurationEnter information for remote printersor local printers_ acceptingremote printing requestsPlease enter the printer name (q to quit): printerIs printer a remote printer or a local printer (r/l)? rPlease enter the the name of the remotehost that_ printer is attached to: hostbPrinter printer is connected to host hostbIs this correct? (y/n) yWould you like this to be the systemdefault printer? (y/n) ymake sure your host name appears in hostb"s /etc_/hosts.equivor /etc/hosts.lpd fileMake sure that printer appears in hostb"s /etc_/printcap file (BSD format)Make sure that printer has a spool directory on_ hostbPlease hit to continueRemote Printing ConfigurationEnter information for remote printers orlocal printers_ acceptingremote printing requestsPlease enter the printer name (q to quit): qDo you want to start remote daemon now? (y/n) y(3) 測(cè)試 。在 hosta 或 hostb 上以普通用戶(hù)注冊(cè) , 輸以下命令即可實(shí)現(xiàn)打印共享 。$ lp /etc/default/lpd3. 日常維護(hù)(1) 管理員或普通用戶(hù)通過(guò)使用命令 lpstat 或 rlpstat 查看打印機(jī)狀態(tài) , 并使用命令 lp 進(jìn)行日常打印 。(2) 設(shè)置遠(yuǎn)程打印機(jī)時(shí)將自動(dòng)安裝新的 lpstat 、 cancel 、 lppstat 命令 , 原命令存放在 /usr/lpd/remote 目錄下(3) 每次增加打印機(jī)前 , 最好刪除原有的打印機(jī) 。

推薦閱讀