盒子网_电视盒子网_盒子刷机网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 3632|回复: 1

玩客云刷Armbian安装CUPS打印机服务器,为打印机插上共享翅膀

[复制链接]

1

主题

5

回帖

121

积分

注册会员

Rank: 2

积分
121
发表于 2022-10-6 12:00:37 | 显示全部楼层 |阅读模式
本帖最后由 zhhhhhh 于 2022-10-6 12:00 编辑

玩客云怎么刷Armbian不再赘述,网上教程一搜一大把,今天主要说说刷好Armbian后的设置
用ssh工具(随意)进入系统,默认:用户名root,密码1234。

查看系统时间
  1. date  #如不准确需修改系统时间
复制代码

设置时区
  1. timedatectl set-timezone Asia/Shanghai  #时区为亚洲/上海
复制代码

网络校时
#先安装ntpdate
  1. apt-get install ntpdate
复制代码

ntpdate更新网络时间
  1. ntpdate asia.pool.ntp.org
复制代码
此时一般问题已解决

换软件源
  1. # 备份原文件
  2. cp /etc/apt/sources.list.d/armbian.list /etc/apt/sources.list.d/armbian.list.bak

  3. # 清华源(以下是一条命令复制完整)
  4. sudo tee /etc/apt/sources.list.d/armbian.list <<-'EOF'
  5. deb https://mirrors.tuna.tsinghua.edu.cn/armbian/ stretch main stretch-utils stretch-desktop
  6. EOF

  7. # 备份原文件
  8. cp /etc/apt/sources.list /etc/apt/sources.list.bak

  9. # 中科大源(以下是一条命令复制完整)
  10. sudo tee /etc/apt/sources.list <<-'EOF'
  11. deb http://mirrors.ustc.edu.cn/debian stretch main contrib non-free
  12. deb http://mirrors.ustc.edu.cn/debian stretch-updates main contrib non-free
  13. deb http://mirrors.ustc.edu.cn/debian stretch-backports main contrib non-free
  14. deb http://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free
  15. EOF
复制代码

更新apt-get
  1. apt-get update && apt-get upgrade
复制代码

安装cups服务
  1. apt-get install cups
复制代码

配置cups服务
  1. nano /etc/cups/cupsd.conf
复制代码

可以用上面的命令,为方便操作可以用winscp打开的 /etc/cups/cupsd.conf
将 ”Listen localhost:631“ 修改为 ”Listen 0.0.0.0:631“
将以下四段增加 Allow all
  1. # Restrict access to the server...
  2. <Location />
  3.   Order allow,deny
  4.   Allow all
  5. </Location>

  6. # Restrict access to the admin pages...
  7. <Location /admin>
  8.   Order allow,deny
  9.   Allow all
  10. </Location>

  11. # Restrict access to configuration files...
  12. <Location /admin/conf>
  13.   AuthType Default
  14.   Require user @SYSTEM
  15.   Order allow,deny
  16.   Allow all
  17. </Location>

  18. # Restrict access to log files...
  19. <Location /admin/log>
  20.   AuthType Default
  21.   Require user @SYSTEM
  22.   Order allow,deny
  23.   Allow all
  24. </Location>
复制代码

保存,重启CUPS
  1. service cups restart
复制代码

安装打印机
我的打印机是惠普M1136,安装惠普驱动
  1. apt-get install hplip
复制代码

重启cups
  1. service cups restart
复制代码

打印机连接在玩客云的USB口,打开打印机电源,浏览器输入:http://玩客云的IP地址:631/,进入cups的管理页面

配置打印机(包括一些坑位)

苹果iOS隔空投送设置
正常情况下,到这一步就已经能在手机中搜到打印机了,但是armbian是轻量级的系统,阉割了不少组件,所以这里还需要加一步,安装avahi-daemon组件
  1. apt install avahi-daemon
  2. apt install daemon
  3. sudo systemctl start avahi-daemon
复制代码

重启cups
  1. service cups restart
复制代码

如果有不懂的可以群里咨询@小蝴蝶和小阿飞





回复

使用道具 举报

0

主题

9

回帖

52

积分

注册会员

Rank: 2

积分
52
发表于 2022-10-7 21:01:51 来自手机 | 显示全部楼层
大佬66666。我想说干得漂亮
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|盒子网 ( 粤ICP备2022074510号-1 ) 粤公网安备44190002006514号 .

GMT+8, 2024-5-19 00:29 , Processed in 0.055236 second(s), 22 queries .

Powered by Discuz! X3.4