美文网首页
ubuntu下打印服务器的安装配置与使用教程

ubuntu下打印服务器的安装配置与使用教程

作者: 听风过隙 | 来源:发表于2017-10-29 01:18 被阅读419次

    为了假装学习,在某宝上剁了一台HP打印机,用了一阵子后发现个,每次打印都要开台式机(USB打印机连在台式机上),很麻烦,如果能把打印机连在NAS服务器上,就好多了。事不宜迟,马上开搞,以下是搞机的记录:

    准备

    • 一台nas服务器
    • 一台hp打印机

    在nas上安装打印机驱动

    ubuntu上打印机的驱动安装,与具体的型号和品牌有关,hp的是通过hplip工具来实现。具体安装很简单,一路确认就可以。不确定的简单搜索就可以了,以下是参考:

    hplip地址: https://developers.hp.com/hp-linux-imaging-and-printing/gethplip

    安装详细过程: http://blog.csdn.net/ws_20100/article/details/49120509

    安装好后本地打印一张纸试试,看看是否正常。

    配置打印服务器

    ubnntu下的打印服务器可以通过cups来实现。
    具体的安装和配置:

    1. 安装cups
    sudo apt-get install cups cups-client
    
    1. 备份cups配置文件
    sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.bak
    
    1. 用以下内容代替/etc/cups/cupsd.conf:
    # /etc/cups/cupsd.conf
    # Simple CUPS configuration file for a print server
    # which serves printers within a private local area network.
    # - There is no need for additional security within the print server, ie only authorises people can access the machine.
    
    # This setup also allows access to the CUPS "Administrative tasks" system
    # via your web browser to http://localhost:631
    # File based on Ubuntu 5.10 (Breezy Badger) (Linux version 2.6.12-10-386)
    # Server Directives are explained in http://localhost:631/sam.html
    
    # 25/04/2006
    # DavidTangye@netscape.net
    
    ConfigFilePerm 0600
    LogLevel info
    Printcap /var/run/cups/printcap
    RunAsUser Yes
    Port 631
    Include cupsd-browsing.conf
    BrowseAddress @LOCAL
    BrowseAddress 10.0.0.0/8
    BrowseAddress 172.16.0.0/12
    BrowseAddress 192.168.0.0/16
    
    <Location />
    AuthType None
    Order Deny,Allow
    Deny From All
    Allow From @LOCAL
    Allow From 10.0.0.0/8
    Allow From 172.16.0.0/12
    Allow From 192.168.0.0/16
    </Location>
    
    <Location /jobs>
    AuthType None
    Order Deny,Allow
    Deny From All
    Allow From @LOCAL
    Allow From 10.0.0.0/8
    Allow From 172.16.0.0/12
    Allow From 192.168.0.0/16
    </Location>
    
    <Location /printers>
    AuthType None
    Order Deny,Allow
    Deny From All
    Allow From @LOCAL
    Allow From 10.0.0.0/8
    Allow From 172.16.0.0/12
    Allow From 192.168.0.0/16
    </Location>
    
    <Location /admin>
    AuthType None
    Order Deny,Allow
    Deny From All
    Allow From @LOCAL
    Allow From 10.0.0.0/8
    Allow From 172.16.0.0/12
    Allow From 192.168.0.0/16
    </Location>
    
    1. 重启cups
    sudo service cups restart
    

    参考资料:
    如何在Ubuntu上使用网络打印-ubuntu-wiki
    CUPS-wiki (简体中文)
    如何在Ubuntu服务器上设置Web配置的打印服务器使用SWAT,CUPS和SAMBA

    配置windows客户端

    http://localhost:631/admin页面中找到Server Settings,选择"Share printers connected to this system"及其子项"Allow printing from the Internet",点击"Change Setting"按钮保存设置。
    进入http://localhost:631/printers/页面点击自己打印机的名字,复制跳转到的页面的URL,即打印机的地址。然后,就可以在Windows上添加使用Ubuntu共享的打印机了。
    (来自 http://www.qingpingshan.com/pc/fwq/324056.html

    配置教程
    win7
    win10
    mac

    相关文章

      网友评论

          本文标题:ubuntu下打印服务器的安装配置与使用教程

          本文链接:https://www.haomeiwen.com/subject/oopepxtx.html