CUPS 打印服务器部署


# 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

删除大于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发送到终端