Fedora 28 本身是沒有列印服務的。我們需要安裝下列軟體: System-Config-Printer Common Unix Printing System - CUPS hplip.x86_64 : HP Linux Imaging and Printing Project hplip-3 ...
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 對應)
- 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.View Code
添加印表機:
安裝 cups 後,可以使用 cups web 服務( http://localhost:631/jobs/ )來添加 印表機。但是我們已經安裝了 system-config-printer 我們可以使用此gui 界面來添加印表機。因為我們使用列印的伺服器是windows
列印伺服器,所以我們需要使用 smb 協議來進行訪問網路印表機,輸入憑據,選擇驅動。具體的配置截圖可以參照如下博客。最後添加印表機成功後,可以列印測試頁來進行驗證。如果沒有成功,請參照系統報錯,進行修改配置。最後祝你使用列印服務愉快!
保持更新,轉載請註明出處。如果本文對你有所幫助,請點擊右下角推薦給予支持。
參考鏈接:
https://blog.csdn.net/allan_bst/article/details/72026980
https://blog.csdn.net/gaoprincess/article/details/79591632
https://www.cnblogs.com/sztsian/p/3462170.html
http://www.mintos.org/hardware/hplip-skill.html
http://www.mintos.org/hardware/hplip-cupsext.html