有些打印机缺少新的系统的驱动,
可以把手头的armbian设备增值成为打印机服务器,
让老的打印机焕发新春。
 

1 安装cups

apt-get install cups

2 修改相关配置文件,启动cups服务

nano /etc/cups/cupsd.conf 

修改“localhost”改成“0.0.0.0”,Browsing off改成Browsing on,并在三个地方分别添加Allow all,具体如下

Listen 0.0.0.0:631

#在下面四个段落中加入 Allow all
# Restrict access to the server... 
<Location />
Order allow,deny 
Allow all 
</Location> 
# Restrict access to the admin pages... 
<Location /admin> 
Order allow,deny
Allow all 
</Location> 
# Restrict access to configuration files...
<Location /admin/conf> 
AuthType Default Require user @SYSTEM
Order allow,deny
 Allow all 
</Location> # Restrict access to log files... 
<Location /admin/log> 
AuthType Default Require user @SYSTEM 
Order allow,deny 
Allow all
</Location> 
# 保存后重新启动cups服务 
service cups restart
 
3. 安装打印机驱动,我的是 IP2800,安装下面的即可
apt install printer-driver-gutenprint
如果是惠普的设备
apt install hpli

4.添加打印机,选择驱动,共享打印机

其实只要再添加一条命令就可以让局域网里的其他设备自动发现打印机。我们再回到ssh命令行去运行一下。

apt install avahi-daemon

有的机器安装这一个插件就可以了。不过我的机器需要安装完整的三个插件才可以。

运行:

apt -y install avahi-daemon avahi-discover libnss-mdns

最后设置下开机默认启动

systemctl enable cupssystemctl enable avahi-daemon

运行完毕之后,再回到添加打印机的选项就可以直接发现网络打印机了。







5.windows添加共享网络打印机