debian10 (armbian) 配置CUPS 服务

发布于:2024-05-05 ⋅ 阅读:(28) ⋅ 点赞:(0)
  1. 更新apt
apt-update
  1. 安装相关软件
apt-get install ghostscript
apt-get install dc
apt-get install foomatic-db-engine
apt-get install cups

3.修改配置文件
nano /etc/cups/cupsd.conf
Listen localhost:631改为 Listen 0.0.0.0:631
以下四段配置加入Allow All

# Only listen for connections from the local machine.
Listen 0.0.0.0:631  #原来是localhost:631
Listen /run/cups/cups.sock

# 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>

4.安装打印驱动

#一般打印机
 apt-get Install printer-driver-gutenprint
#惠普打印机 
apt-get install printer-driver-foo2zjs
  1. 局域网共享
apt-get -y install avahi-daemon avahi-discover libnss-mdns

6.开机启动

systemctl enable cups
systemctl enable avahi-daemon
  1. 重启打印服务
#重启cpus服务:
systemctl restart cups 
#或者
service cups restart
#我这里使用这个命令
service cups restart

登录用户名是Linux 用户名和密码
在这里插入图片描述
文章资料来源:https://www.bilibili.com/video/BV1hi42127fe/