一、共享打印機的設置
1.在http://www.openprinting.org/printer/HP/HP-LaserJet_1010檢查打印機的支持情況,兩個企鵝以上表示Mostly,支持大部分功能
2.根據其提供的鏈接安裝打印機驅動
3.開始配置CUPS->Common Unix Printing System
yum install cups cups-libs vim /etc/cups/cupsd.conf
默認這個web配置只對localhost開放,需要編輯配置文件來打開
#Only listen for connections from the local machine. Listen localhost:631 Listen IP:631 Listen /var/run/cups/cups.sock #也可以直接改為Port 631監聽所有端口 # Show shared printers on the local network. Browsing On BrowseOrder deny,allow ............ BrowseAllow @LOCAL #Show printers shared by other systems BrowseAddress @LOCAL #Share printers connected to this system #Allow @LOCAL表示允許本地子網 # Default authentication type, when authentication is required... DefaultAuthType Basic DefaultEncryption IfRequested #上面加密還可以改成Never.因為不知道什么原因使用https://ip:631總是打不開 # Restrict access to the server... <Location /> Order deny,allow Deny From All Allow From 127.0.0.1 Allow From 192.168.1.* Allow @LOCAL .......... </Location> # Restrict access to the admin pages... <Location /admin> #Encryption Required Encryption Never Order deny,allow Deny From All Allow From 127.0.0.1 Allow From 192.168.1 Allow @LOCAL </Location> # Restrict access to configuration files... <Location /admin/conf> Encryption Never AuthType Default Require user @SYSTEM #Order allow,deny Order deny,allow Deny From All Allow From 127.0.0.1 Allow From 192.168.1 Allow @LOCAL </Location> # Set the default printer/job policies... .......................
重啟服務
service cups restart