armbian安装cups打印服务器

发布时间 2023-09-14 10:11:29作者: modys

一、安装cups服务
1、apt-get install cups avahi-daemon -y

2、安装驱动
HP驱动:
apt-get install hplip -y
爱普生驱动:
apt-get install printer-driver-gutenprint
兄弟驱动:
apt-get install printer-driver-brlaser

3、systemctl restart cups

二、修改配置文件
1、
找到:Listen localhost:631
改成:Listen 0.0.0.0:631
2、
找到下面的字段:

Show shared printers on the local network.

Browsing On
BrowseLocalProtocols dnssd

改成下面的字段:

Show shared printers on the local network.

Browsing On
allow 192.168.5.*
BrowseAllow all
BrowseAddressLocalProtocols CUPS dnssd
BrowseAddress @LOCAL

3、添加允许IP

Restrict access to the server...


Order allow,deny
Allow 192.168.5.*

4、添加允许IP

Order allow,deny
Allow 192.168.5.*

5、添加允许IP

Order allow,deny
Allow 192.168.5.*

6、添加允许IP

Restrict access to configuration files...


AuthType Default
Require user @SYSTEM
Order allow,deny
Allow 192.168.5.*

7、添加允许IP

Order deny,allow
Allow 192.168.5.*

 

三、重启服务
systemctl cups restart

四、进入后台
http:/192.168.5.250:631
添加打印机输入用户名密码,要输入root用户和密码