用玩客云做打印服务器,让你在手机上轻松实现无线打印

2022-08-19 13:20:50 41点赞 395收藏 21评论

用玩客云做打印服务器,让你在手机上轻松实现无线打印

大家好,我乌客。前段时间我简单地装修了下家里。开辟了独立的办公区域和拍摄间。

不过在放置打印机的时候,我发现了一个严重的问题。新的布局没有考虑打印机的走线问题。而且我家这款打印机又没有无线打印功能,必须要连接USB线才能打印。这用起来就太麻烦了!

用玩客云做打印服务器,让你在手机上轻松实现无线打印

好歹咱也算是个数码爱好者,真是叔可忍婶都不能忍。于是我就想着做一个打印服务器

其实做一个打印服务器非常简单,用一台X86的主机或者笔记本连接打印机。在局域网里共享一下打印设备就可以了。如果不想浪费主机性能,也可以用虚拟机虚拟一个window系统作打印服务器。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

不过如果用一台电脑只做一个打印服务器的话,无论从功耗还是从花费方面都不划算。毕竟我换一台带无线功能的打印机也花不了多少钱。

相对而言ARM芯片的小主机做打印服务器似乎更合适。比如像玩客云,这货如今在网上四五十块钱就能买到一部。待机功耗也只有几瓦。

我手头正好有两部折腾剩下的,反正也是放着吃灰,顺便拿来做打印服务器发挥预热也挺好。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

折腾到最后的结果也挺让我满意的。用玩客云做出来打印服务器,不仅可以做到全平台兼容,包括:window,Mac,iOS和安卓系统都可以直接启动打印机。

还可以做到在手机上轻松实现无线打印。打印设置也非常方便,使用体验上比很多无线打印机都要好。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

接下来我会一步步教大家用玩客云配置一台打印服务器。安装过程其实一点都不难,我本人也是一个只会复制粘贴命令的Linux小白。所有的教程都来自网络,现学现卖。

Linux下打印服务系统来自最著名的cups,直译过来就是杯子。这个项目原先属于苹果公司,目前应该一个免费的开源项目。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

在这里要温馨提示一下,要使用cups打印服务需要打印机具有linux下的(arm)驱动。一般国内主流的品牌像爱普生、惠普和兄弟的大多数型号都有现成的(arm)驱动包。直接一条命令就可以安装完成。不过个别品牌打印机如果没有提供Linux驱动,那就没有办法用cups服务了。

大家在安装之前最好确认一下你的打印机是否具有Linux下的驱动。

以下是我做的一个思维导图,大致说明了下玩客云安装打印服务安装步骤:

用玩客云做打印服务器,让你在手机上轻松实现无线打印

一、搭建一个armbian系统

首先我们需要给玩客云刷一个armbian linux系统。这里我选择的是恩山论坛上的玩客云Armbian22.08直刷包。

直刷包可以直接刷到主机自带的rom里,不需要额外的外置存储卡

玩客云从原厂系统刷第三方系统是需要拆机用短接触点的方式的方式刷入的。如果你的玩客云已经刷过第三方系统,那么只需要在刷机时按住reset键就可以刷写新的系统。

关于刷机步骤玩客云的老玩家应该非常熟悉了,如果你是第一次接触玩客云。那么可以翻看我之前的玩客云刷机视频。详细过程在就不在这里演示了。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

烧录完毕后记得先点击停止,再关闭软件。

然后我们就可以给玩客云接入网线,再接通电源。接下来的操作都会用远程ssh登陆完成。

首先我们登陆一下路由器的后台,找到玩客云被分配的IP地址。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

接着我们打开Mobaxterm,选择左上方session按钮。然后选择ssh连接的方式。填入玩客云的ip地址,端口号默认保持22 点击ok。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

初始化账号为root 密码是1234

用玩客云做打印服务器,让你在手机上轻松实现无线打印

首次登录后系统会让我们修改登陆密码,这里我们只需自定义一个密码就可以了。

接着系统还会让我们新建一个账户,这里我们就不需要新账户了直接ctrl+c跳过就可以了。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

好这样我们就成功登陆到armbian系统。登陆到armbian系统后,第一步我们要做添加国内的镜像源,方便之后的一系列升级和更新。

先输入编辑源文件命令:

nano /etc/apt/sources.list

然后复制这些源进去

deb https://mirrors.ustc.edu.cn/debian stretch main contrib non-free
#deb-src http://ftp.debian.org/debian/ stretch main contrib non-free

deb https://mirrors.ustc.edu.cn/debian stretch-updates main contrib non-free
#deb-src http://ftp.debian.org/debian/ stretch-updates main contrib non-free

deb https://mirrors.ustc.edu.cn/debian stretch-backports main contrib non-free
#deb-src http://ftp.debian.org/debian/ stretch-backports main contrib non-free

deb https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free
#deb-src https://www.debian.org/security/ stretch/updates main contrib non-free

#163镜像站

deb http://mirrors.163.com/debian/ buster main non-free contrib
deb http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ buster/updates main non-free contrib

deb-src http://mirrors.163.com/debian/ buster main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.163.com/debian-security/ buster/updates main non-free contrib
#华为云镜像站

deb https://mirrors.huaweicloud.com/debian/ buster main contrib non-free
deb https://mirrors.huaweicloud.com/debian/ buster-updates main contrib non-free
deb https://mirrors.huaweicloud.com/debian/ buster-backports main contrib non-free
deb https://mirrors.huaweicloud.com/debian-security/ buster/updates main contrib non-free

deb-src https://mirrors.huaweicloud.com/debian/ buster main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ buster-updates main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ buster-backports main contrib non-free
#腾讯云镜像站

deb http://mirrors.cloud.tencent.com/debian/ buster main non-free contrib
deb http://mirrors.cloud.tencent.com/debian-security buster/updates main
deb http://mirrors.cloud.tencent.com/debian/ buster-updates main non-free contrib
deb http://mirrors.cloud.tencent.com/debian/ buster-backports main non-free contrib

deb-src http://mirrors.cloud.tencent.com/debian-security buster/updates main
deb-src http://mirrors.cloud.tencent.com/debian/ buster main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian/ buster-backports main non-free contrib
#中科大镜像站

deb https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free

deb-src https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
#阿里云镜像站

deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb http://mirrors.aliyun.com/debian-security buster/updates main
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib

deb-src http://mirrors.aliyun.com/debian-security buster/updates main
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
#清华大学镜像站

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ buster/updates main contrib non-free

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ buster/updates main contrib non-free
#兰州大学镜像站

deb http://mirror.lzu.edu.cn/debian stable main contrib non-free
deb http://mirror.lzu.edu.cn/debian stable-updates main contrib non-free
deb http://mirror.lzu.edu.cn/debian/ buster-backports main contrib non-free
deb http://mirror.lzu.edu.cn/debian-security/ buster/updates main contrib non-free

deb-src http://mirror.lzu.edu.cn/debian stable main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian stable-updates main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian/ buster-backports main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian-security/ buster/updates main contrib non-free
#上海交大镜像站

deb https://mirror.sjtu.edu.cn/debian/ buster main contrib non-free
deb https://mirror.sjtu.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirror.sjtu.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirror.sjtu.edu.cn/debian-security/ buster/updates main contrib non-free

deb-src https://mirror.sjtu.edu.cn/debian/ buster-updates main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian/ buster-backports main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian/ buster main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian-security/ buster/updates main contrib non-free

CTRL+O 回车保存,CTRL+X 回到界面。

编辑好了镜像源以后,我们先分别输入以下两个命令更新armbian系统,粘贴命令后回车运行即可。

sudo apt update
sudo apt upgrade

接下来两条命令是安装一个armbian-config 的半图形化界面。它可以方便我们做一些选项的设置。

apt install ntp
apt install armbian-config

接着输入

armbian-config

打开图形控制台

在这个界面里我们要做两件事情。

更换时区:personal>timezone 选择亚洲,中国的时区。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

修改ip获取方式改为static防止ip地址改变对ssh造成影响。(network->ip->static),这样可以把ip地址固定下来。否则打印服务器地址每次重启都会变化的话,下面的客户端都需要重新设置IP。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

最后选择exit 退出图形化界面。

二、安装cups服务

好了准备工作做完,我们输入命令安装cups打印服务。输入:

apt-get install cups

安装完毕后,还需要修改一些cups的参数。输入以下命令进入cups的参数配置:

nano /etc/cups/cupsd.conf

修改“localhost”改成“0.0.0.0”,Browsing off改成Browsing on,并在三个地方分别添加Allow all,具体如下

Listen 0.0.0.0:631

Listen /var/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

# 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

ctrl+X退出,Y保存,回车返回命令行。

然后运行命令 重启一下cups的服务。

service cups restart

稍等两分钟以后,我们可以试着在网页里用玩客云ip地址+631的端口号登陆cups的服务页面。

我们看到已经成功登陆进去了。说明打印服务器已经搭建好了。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

接下来我们先退出web页面,在ssh中添加一下打印机驱动。这里需要打印机有支持的linux驱动。我找到了爱普生、惠普和兄弟驱动包。直接一条命令安装就可以了。

爱普生:

apt install printer-driver-gutenprint

惠普:

sudo apt-get install hplip

或者

apt install hplip

兄弟

apt-get install printer-driver-brlaser

安装好打印机驱动后我们可以在web页面里添加打印机。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

三、添加网络打印机

打印机添加完毕我们就可以用

http://192.168.50.106:631(服务器IP+端口号)/printers/EPSON_L360_Series(打印机共享名称

来在windows里添加网络打印机。添加之前最好预先安装好打印机驱动。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

其实只要再添加一条命令就可以让局域网里的其他设备自动发现打印机。我们再回到ssh命令行去运行一下。

apt install avahi-daemon

有的机器安装这一个插件就可以了。不过我的机器需要安装完整的三个插件才可以。

运行:

apt -y install avahi-daemon avahi-discover libnss-mdns

最后设置下开机默认启动

systemctl enable cups
systemctl enable avahi-daemon

运行完毕之后,再回到添加打印机的选项就可以直接发现网络打印机了。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

同样在安卓和iOS手机上也可以直接添加这个网络打印机,用来打印文稿和图片都非常方便。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

其实玩客云只是打印服务器的备选设备之一。理论上只要是可以安装linux系统的设备都可以用作打印服务器。

比如N1盒子,香橙派,淘汰的电视盒子或者树莓派。按照本教程的思路都能改造称打印服务器。而且像N1盒子和香橙派之类支持无线网络的设备,安装好服务后就能变成无线打印服务器。使用起来会比玩客云更方便一些。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

事实上我最后就选用了支持无线网络的香橙派作为打印服务器。因为它支持无线网络的同时体积也更加小巧。相对而言玩客云的优势是存货量更多,而且价格也更便宜一些。

用玩客云做打印服务器,让你在手机上轻松实现无线打印

好了以上就是本期的内容了。都看到这里了,麻烦小伙伴们帮我点个赞吧。谢谢大家了,我是乌客。我们下期见。

作者声明本文无利益相关,欢迎值友理性交流,和谐讨论~

展开 收起

WPS 金山软件 WPS 超级会员 3年卡

WPS 金山软件 WPS 超级会员 3年卡

264.1元起

WPS 金山软件 超级会员15个月卡+哔哩哔哩大会员年卡

WPS 金山软件 超级会员15个月卡+哔哩哔哩大会员年卡

暂无报价

ihuman 洪恩 识字子集拼音思维ABC会员永久包3-6岁儿童早教启蒙礼物玩具 识字会员终身包

ihuman 洪恩 识字子集拼音思维ABC会员永久包3-6岁儿童早教启蒙礼物玩具 识字会员终身包

268元起

Microsoft 微软 OFFICE 365 家庭版 会员

Microsoft 微软 OFFICE 365 家庭版 会员

105元起

Microsoft 微软 Office 365 个人版

Microsoft 微软 Office 365 个人版

177元起

Microsoft 微软 365家庭版一年

Microsoft 微软 365家庭版一年

235元起

统信 UOS桌面操作系统V20/适用于国产型号/官方正版授权/国产专用

统信 UOS桌面操作系统V20/适用于国产型号/官方正版授权/国产专用

598元起

WPS 金山软件 超级会员2年卡 赠AI会员

WPS 金山软件 超级会员2年卡 赠AI会员

187.15元起

Microsoft 微软 OFFICE 365 个人版 办公软件

Microsoft 微软 OFFICE 365 个人版 办公软件

199元起

WPS 金山软件 会员季卡

WPS 金山软件 会员季卡

37.05元起

WPS超级会员Pro套餐4年卡1488天官方正版pdf转word排版

WPS超级会员Pro套餐4年卡1488天官方正版pdf转word排版

暂无报价

WPS 金山软件 超级会员年卡+芒果TV年卡

WPS 金山软件 超级会员年卡+芒果TV年卡

158元起

365office365OfficePLUS Microsoft365 12 -

365office365OfficePLUS Microsoft365 12 -

235元起

WPS 金山软件 AI会员1年 金山办公软件官方正版

WPS 金山软件 AI会员1年 金山办公软件官方正版

188元起

WPS 金山软件 超级会员季卡

WPS 金山软件 超级会员季卡

33.05元起

国行版 Switch体感游戏套装 《健身环大冒险》

国行版 Switch体感游戏套装 《健身环大冒险》

379元起
21评论

  • 精彩
  • 最新
提示信息

取消
确认
评论举报

相关好价推荐
查看更多好价

相关文章推荐

更多精彩文章
更多精彩文章
天猫超级红包
距结束::
每天领现金,最高24888元
红包按钮
最新文章 热门文章
395
扫一下,分享更方便,购买更轻松