CUPS 打印服務器部署
------20240206 update
安裝CUPS
apt-get install cups
設備配置文件
vi /etc/cups/cupsd.conf
Listen 0.0.0.0:631
Listen /run/cups/cups.sock
Browsing Yes
BrowseLocalProtocols dnssd
<Location />
Order allow,deny
Allow all
</Location>
<Location /admin>
Order allow,deny
Allow all
</Location>
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
Allow all
</Location>
執行cupsd -t檢查配置文件是否有誤
安裝打印機驅動
apt-get install hplip
添加打印機
訪問https://IP:631 添加打印機,將打印機設置為shared
用戶名 密碼為系統的賬號密碼
安裝惠普打印機驅動 hp-plugin
執行命令hp-plugin
需要保持設備聯網狀態,插件會自動上網下載
安裝打印機發現服務
apt-get -y install avahi-daemon avahi-discover libnss-mdns
systemctl restart avahi-daemon
service cups restart
刪除大于30天的日志
(debian,其它系統為-mtime +3)
service cups stop
find /var/spool/cups/ -mtime 3 -exec rm {} \;
find /var/log/cups/ -mtime 3 -exec rm {} \;
service cups start
添加打印機后選shared 才能被局域網內的設備搜索到,無線環境中需要開啟mdns發送到終端
原記錄
# install
apt-get install cpus aptitude ghostscript hpijs-ppds hp-ppd dash hplip hp-plugin
vi /etc/cups/cupsd.conf
hp-plugin
wget https://developers.hp.com/sites/default/files/hplip-3.21.2-plugin.run
sh hplip-3.21.2-plugin.run
hp-plugin
apt-get install samba
vi /etc/samba/smb.conf
/etc/init.d/samba restart
/etc/init.d/cups restart
enable to start service after system reboot
update-rc.d samba enable
update-rc.d cups enable
update-rc.d nmbd enable
for mDns discovery
apt install avahi-daemon
update-rc.d avahi-daemon enable
service avahi-daemon start
apt install cups-ipp-utils cups-ipptool
service cups restart
apt install samba samba-common-bin
test smb
testparm

浙公網安備 33010602011771號