首页 > 其他分享 >armbian安装CUPS打印机软件及使用,保姆级教程!

armbian安装CUPS打印机软件及使用,保姆级教程!

时间:2023-12-15 22:26:02浏览次数:47  
标签:... 打印机 AuthType Require deny armbian allow CUPS Order

首先你得有一个安装好armbian的盒子,比如Q21,玩客云等!

安装CUPS跟着我的步骤操作,保证能用!

1.更新Ubuntu

apt-get update (获得软件更新列表)

pt-get upgrade(安装需要更新的软件)

或者apt-get update && apt-get upgrade

(一次不成功可以多试几次,建议update、upgrade分开执行,要不每次都要更新软件列表)

2.设置时区

date -R(查看时区、时间)

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime(设置中国时区)

date -R(再次查看时区、时间)

上面这两步最好操作一下,以防不能正常安装!

 

3.安装CUPS

 

sudo apt-get install cups(不是root账户需要用sudo,如果是root账户可以直接apt-get install cups)

 

中间如果出现询问,选择y就可以

 

4.设置CUPS的conf文件

这个有2种方法,我就教最简单的

(1)打开/etc/cups/cupsd.conf文件(用MobaXterm可以直接打开conf文件并编辑)

 

 

 看到这段天文数字不要慌,把下面的内容全部覆盖上去就可以了!

 

#
# Configuration file for the CUPS scheduler. See "man cupsd.conf" for a
# complete description of this file.
#

# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn
PageLogFormat

# Specifies the maximum size of the log files before they are rotated. The value "0" disables log rotation.
MaxLogSize 0

# Default error policy for printers
ErrorPolicy retry-job

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

# Show shared printers on the local network.
Browsing On
BrowseLocalProtocols dnssd

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Web interface setting...
WebInterface Yes

# Timeout after cupsd exits if idle (applied only if cupsd runs on-demand - with -l)
IdleExitTimeout 60

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

# Set the default printer/job policies...
<Policy default>
# Job/subscription privacy...
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default

# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
Order deny,allow
</Limit>

<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>

<Limit CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>

# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>

# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>

# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>

<Limit All>
Order deny,allow
</Limit>
</Policy>

# Set the authenticated printer/job policies...
<Policy authenticated>
# Job/subscription privacy...
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default

# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
AuthType Default
Order deny,allow
</Limit>

<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>

# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>

# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>

# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>

<Limit All>
Order deny,allow
</Limit>
</Policy>

# Set the kerberized printer/job policies...
<Policy kerberos>
# Job/subscription privacy...
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default

# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
AuthType Negotiate
Order deny,allow
</Limit>

<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Negotiate
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>

# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>

# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>

# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Negotiate
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>

<Limit All>
Order deny,allow
</Limit>
</Policy>

 就复制上面的覆盖就可以!

 

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

6,重启服务   systemctl cups restart

输入命令service cups restart

这两个命令都可以。

三、汉化CUPS(此步为可选,不汉化也可以正常使用)

1.将文件夹doc-root及文件夹下文件,复制到玩客云的/usr/share/cups文件夹下。

2.将文件夹templates及文件夹下文件,复制到/usr/share/cups文件夹下。

3.在/etc/cups/cupsd.conf文件中添加以下内容

https://wwtf.lanzoul.com/i71ma197k5tc

 

https://wwtf.lanzoul.com/i4ild197k5ud

 

DefaultLanguage zh_CN(有人设置了之后还是没有汉化,很可能是因为刚才两个文件夹存在设置问题)

 

(用txt修改doc-root、templates两个文件夹中的文件还可以添加个性化信息,或者更改浏览器标签页显示的cups版本,有兴趣的可以自行研究)

设置打印机

 

 补充一下,打印机要连接armbian设备,点添加打印机或者查找打印机,

 

 

 

 添加完成后,菜单栏打印机就可以看见添加的打印机了

 最后添加打印机到电脑

 

 

 

 

 网址就是菜单栏打印机页面上面的网址,然后就点下一步安装了,没有驱动的自己给打印机装个驱动!

 

这就是最后添加成功的打印机了!

 

 

 

 

 

 

标签:...,打印机,AuthType,Require,deny,armbian,allow,CUPS,Order
From: https://www.cnblogs.com/imagecc/p/17904264.html

相关文章

  • MDM介绍:5. 悄悄安装上打印机macOS
    虽然越来越多的人提倡无纸化办公,但难免有材料需要以纸质的形式呈现出来,打印机依旧是日常办公中不可或缺的外围设备,添加打印机也是IT部门要做的一件简单但是不得不做的事情。除此之外还有电脑中打印机的卸载,故障排除等。添加一台打印机(包括安装相应驱动文件)可能需要3-5分钟,你可能觉......
  • Y112S打印机
    Y112S打印机打印机参数分辨率:8点/mm,384点/行有效打印宽度:48mm每列网格数:8个,40mm,每个波形占一半进纸步距(点距):0.125mm网格:5mm*5mm,打印机按照整数个网格打印缓存网格GRIDlength:5mm点数:4025mm/s->0.2s/GRID50mm/s->0.1s/GRID配置1.速率25mm/s50mm/s2.模式......
  • 使用FastReport类库实现zebra斑马打印机的简单操作
    使用FastReport类库实现zebra斑马打印机的简单操作1.首先引入需要的类库  2.需要提前通过fastreport制作一个模板,并制定一些需要替换的变量这个套路的原理就是替换模板中的变量数据,达到输出不同的内容,如果没有替换,变量默认是空白的内容关于模板制作方面后续会在分享 ......
  • GUI-Guider 生成打印机模板并在 ESP32-S3 上面运行
    原文:https://www.jianshu.com/p/51fc4c1d1e66目录目录ESP32-S3移植GUI-Guider的打印机例程前提准备1.GUIGuider生成工程根据屏幕参数新建工程2.移植代码到lvgl例程里将生成的代码作为组件使用与参考链接中的不同调用生成的代码ESP32-S3移植GUI-Guid......
  • 打印机
    打印机的品牌1、惠普、佳能、联想、华为(面试时就说佳能) 打印机的种类喷墨打印机激光打印机 喷墨打印机喷墨打印机的安装1、安装墨盒、彩色墨盒安装在左侧,黑色墨盒安装在右侧2、纸张导片固定纸张3、安装驱动搜索相对应的打印机品牌型号驱动进行安装......
  • 今日故障-打印机不在线
    打印机故障(2)2021-07-0614:22今天在家休息,一个同事着急忙慌的打来电话说:“我的打印机怎么用不了了呢?”,经过简单的询问分析出了几个可能出现的问题。由于业务紧迫,心想最好立即解决,于是前去查看,果然不出所料。这是查看硬件接口的界面,发现有一个异常(图中感叹号) 担......
  • Armbian上共享
    已经实际测试,操作流程正确,能完全共享(实际操作记录)要在Armbian上共享/root/aria2pro/aria2-downloads/目录,您可以使用Samba来设置共享,以便其他设备可以访问该目录。以下是在Armbian上设置Samba共享的步骤:安装Samba服务:在终端中运行以下命令来安装Samba服务:sudoaptupdat......
  • 打印机 zebra 斑马 ZT211CN 测试备忘
    条码打印系统  首页-神奇条码标签打印系统(shenqitiaoma.com) 斑马 ZT211CN  ZT211IndustrialPrinterSupport&Downloads|Zebra产品序号(SN): T2J231600121  ,Zebra 通过sn查询产品型号,找到相关手册和问题排除文档。 设置注意事项:1、设置ip后,重启打印机,在......
  • WSD、USB 和 TCP/IP 端口是连接和使用打印机的三种不同方法
    WSD、USB和TCP/IP端口是连接和使用打印机的三种不同方法,各自的特点如下:WSD(WebServicesonDevices)端口:WSD是一种基于网络的打印服务,允许计算机和打印机在局域网中通过网络发现彼此。它使用的是一种标准的网络协议,支持动态设备发现和配置。通常用于无线和有线的网络打......
  • Linux lp命令(-o选项,-d目标打印机,-p页码范围)
     原文主要介绍lp命令的参数和描述。常见命令包括:lpfilename(打印filename)-d打印机名称(指定打印机)-P1,2-5,6(指定页码范围)-osides=two-sided-long-edge(选项,长边翻转,竖直打印)-onumber-up(指定一页几版)……有趣的打印命令详见下文lp命令原文:通过命令行,manlp得到:NAME......