打印机服务器搭建 -cups

系统:ubuntu 14.04

http://foo2zjs.rkkda.com/INSTALL

  1. 安装cups   sudo apt-get install cups
  2. 安装完成后,把打印机的数据线与服务器进行连接,并打开打印机的电源。然后在firefox浏览器中输入:

            localhost:631

  3. 在cups管理界面中的“Administration”下的“Printers”下点击“Add Printer”,按提示操作即完成配置。

      完成配置后,要打印一份测试页,确保配置是正确的,再进行下一步,打印的测试页

  4. .在cups服务器中,进入/etc/cups 目录下,可以看到如图4所示的cupsd.confcupsd.conf.default两个文件cupsd.conf和cupsd.conf.default的内容其实是一样的,我把cupsd.conf.default文件理解为cupsd.conf文件的备份。
  5. 在上述代码中:

    a.把"Listen localhost:631"前加"#"注释掉。然后在下面另起一行,写上:Listen 0.0.0.0:631

      意思为:请在631端口监听所有的主机连接。

    b.把"Browsing off"前加"#"注释掉。然后在下面另起一行,写上:Browsing on

      意思为:打开局域网共享。

    c.在"BrowseOrder allow,deny"中另起一行,写上:allow 172.16.54.*(这里写上你共享任务的网段)

      意思为:设定共享任务的网段

  6. 在上述代码中:

    a.在"<Location /> Order allow,deny"后,另起一行,写上:allow 172.16.54.*

      意思为:设定只有IP为 172.16.54.* 的客户机才能访问此服务器 

     

    b.在"<Location /admin> Order allow,deny"后,另起一行,写上:allow 172.16.54.88

      意思为:设定只有IP为 172.16.54.88 的客户机才能访问此服务器的管理界面

  7. 在"<Limit Create-Job Print-Job Print-URI Validate-Job> Order allow,deny"后,另起一行,

    写上:allow 172.16.54.*

    意思为:设定IP为 172.16.54.* 的客户机只能进行 Create-Job Print-Job Print-URI Validate-Job的任务。

  8. 使用以下命令重启cups服务

                    sudo restart cups

posted @ 2016-06-26 12:44  小卒子0624  阅读(4623)  评论(0编辑  收藏  举报