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