云网牛站
所在位置:首页 > Linux教程 > 在Fedora 28系统中配置打印机的步骤

在Fedora 28系统中配置打印机的步骤

2018-09-12 11:49:23作者:xuyaowen稿源:CNblogs.com/xuyaowen

本文在 Fedora 28 操作系统中进行打印机的配置,HP pro 1136M,基于 Windows 打印服务器使用 smb 协议。在 Fedora 28 系统下本身是没有打印服务的。

 

需要安装下列软件:

System-Config-Printer

Common Unix Printing System - CUPS

hplip.x86_64: HP Linux Imaging and Printing Project

hplip-3.18.6-plugin.run  (其他版本,安装的plugin 版本要和hplip 对应)

在Fedora 28系统中配置打印机的步骤

samba

注:安装好后,启动cups 系统、samba 系统、配置好防火墙,然后打开 system-config-printer 软件就能进行添加打印机了。

 

安装系统配置GUI:

~ sudo yum install system-config-printer.x86_64

~ sudo yum install cups (本身 fedora 已经安装了 cups 打印系统)

 

安装 hplip 相关:

~ sudo yum install hplip hplip-gui

之后使用 hp-plugin 命令使用绝对路径安装: hplip-3.18.6-plugin.run (注意:不安装插件会导致插件安装失败,此插件如果在线下载不成功)

也可以下载 hplip-xx.run,hplip-xx-plugin.run 来进行安装,推荐使用 curl -O 命令下载,并使用 chmod +x 添加执行权限。 

chmod +x ./hplip-3.16.11.run

sudo ./hplip-3.16.11.run

 

安装samba:

~ sudo yum install samba

并进行修改配置如下(例子,可以单独修改):

# See smb.conf.example for a more detailed config file or

# read the smb.conf manpage.

# Run 'testparm' to verify the config is correct after

# you modified it.

[global]

workgroup = WORKGROUP  # 重点,windows 打印服务器一般默认用户组是 workgroup

security = user

passdb backend = tdbsam

printing = cups

printcap name = cups

load printers = yes

cups options = raw

[homes]

comment = Home Directories

valid users = %S, %D%w%S

browseable = No

read only = No

inherit acls = Yes

[printers]

comment = All Printers

path = /var/tmp

printable = Yes

create mask = 0600

browseable = yes

[print$]

comment = Printer Drivers

path = /var/lib/samba/drivers

write list = @printadmin root

force group = @printadmin

create mask = 0664

directory mask = 0775

 

添加防火墙规则:

sudo firewall-cmd --add-service samba

sudo firewall-cmd --permanent --add-service samba

~ sudo firewall-cmd --reload

 

重新启动 samba 服务:

~ sudo systemctl enable {s,n}mb.service

~ sudo systemctl start {s,n}mb

 

重新启动 cups 服务:

~ sudo systemctl start cups

可以使用 systemctl status  cups 命令来进行查看服务状态。

man cups :

NAME

 cups - a standards-based, open source printing system

DESCRIPTION

 CUPS  is  the  software  you use to print from applications like word processors, email readers, photo editors, and web browsers. It converts the page descriptions produced by your application (put a para\u2010 graph here, draw a line there, and so forth) into something your printer can understand and then sends the information to the printer for printing.

 Now, since every printer manufacturer does things differently, printing can be very complicated.  CUPS does  its  best to hide this from you and your application so that you can concentrate on printing and less on how to print. Generally, the only time you need to know anything about your printer is when you use it for the first time, and even then CUPS can often figure things out on its own.

 

添加打印机:

安装 cups 后,可以使用 cups web 服务( http://localhost:631/jobs/ )来添加打印机。但是我们已经安装了 system-config-printer,我们可以使用此 gui 界面来添加打印机。因为我们使用打印的服务器是 windows 打印服务器,所以我们需要使用 smb 协议来进行访问网络打印机,输入凭据,选择驱动。如果要更详细的配置可以参考图示教程(在Ubuntu系统中使用局域网内Windows共享打印机的方法)。最后添加打印机成功后,可以打印测试页来进行验证。如果没有成功,请参照系统报错,进行修改配置。最后祝你在Fedora 28系统中使用打印机服务愉快。

 

相关主题

deepin下virtualbox虚拟windows 7系统安装物理打印机的方法

精选文章
热门文章