家里有台老旧的Canon MP258偶尔打印使用,由于不支持无线打印,每次打印都得连接usb比较麻烦,想到可以用Armbian来做打印服务器,这样打印机连接Armbian就可以无线打印了。下面开始步骤:

  • 安装cups

apt-get install cups

  • 修改cups配置

vi /etc/cups/cupsd.conf

// 将localhost改成0.0.0.0
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>

// 保存退出,重启cups
service cups restart

打开 192.168.1.100:631 进入cups管理页(192.168.1.100是n1的ip),能进去就安装好了

安装gutenprint打印机驱动,gutenprint是一个第三方打印机驱动集合收集了众多打印机驱动,支持的打印机可去官网查看http://gimp-print.sourceforge.net/p_Supported_Printers.php

// 安装必要包
apt-get install libcups2-dev libcupsimage2-dev
// 从官网下载最新的安装包,解压之后编译安装
./configure
make
make install

如果提示登录的话,输入root用户密码

打印机打印测试页的话就是成功的,至此pc就可以添加打印机搜索到了。

  • 安装 IOS AirPrint 无线打印支持

apt-get -y install avahi-daemon avahi-discover libnss-mdns
service avahi-daemon restart

未完待更