linux配置网络打印机_第1页
linux配置网络打印机_第2页
linux配置网络打印机_第3页
linux配置网络打印机_第4页
linux配置网络打印机_第5页
已阅读5页,还剩9页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、前段时间办公室申请换打印机的时候,很想换一台支持网络打印的,网上查了查感觉HP2015DN还不错,属于价格适中量又足的那种。不过一般采购的事情是自己做不了主 的,最终送来的是HP2015D USB接口的连线都得再掏钱买,这 HP也够黑的。仅仅差 了一个N,结果网络打印的功能就泡汤了。不过还好,HP2015D起码是台PDL打印机,可以在Linux上用p910nd这个软件包来实 现网络打印机功能(以前用的那种烂 GDI打印机,只能在 Windows下用),其性能是 Win dows下的打印共享所不能比的。具体做法如下:1、 找一台从其他部门退役下来申请报废的破PC装个Linux,设置好IP地址确认

2、能被 其他计算机访问到,把打印机的 USB连接线接到这台计算机上2、安装P910nd软件包:a)、在这里下载 p910nd : b) 、解压缩并进入源代码目录:tar jxvf p910nd-0.92.tar.bz2;cd p910nd-0.92c)、编译安装:make最终产生的目标文件是/usr/sbin/p910ndd)、确认usb设备已经创建(一般在Linux系统安装时就创建好了):1s -l /dev/usb| grep IpO,应该会返回一行信息如:crw-rw- 1 root lp 180, 0 12-26 13:22 IpOe) 、如果没有返回信息,则创建之:mknod /dev

3、/usb/lp0 c 180 0f)、启动服务进程:/usr/sbi n/p910 nd -f /dev/usb/lp0 0g) 、把上述命令写入/etc/rc.local,每次开机时自动运行3、 在其他需要使用打印机的计算机上用以下方法安装打印机,以Win dows XP为例:a)、在添加打印机向导中选择连接到此计算机的本地打印机”,确认不要选自动检测并安装即插即用打印机b) 、选择 创建新端口 ”端口类型选 Standard TCP/IP Port ”c)、打印机名或IP地址填上述Linux主机的IP地址d) 、选自定义”,点设置”按钮,确认协议”为Raw 端口号”为9100e) 、安装打

4、印驱动程序,厂商选HF”,打印机选 HPLaserJet P2015 Series PCL 6”f)、确认将新添加的打印机设置为默认打印机虽然是台破PC但单纯用做打印服务器也实在是太浪费资源了,再配置一下samba把剩余的磁盘空间用做部门内的共享服务器,报废的计算机又可以继续发挥余热啦。设备:水星 MW4530R 8无线路由器,惠普 HP MFP M1005打印一体机。固件:OpenWrt Barrier Breaker 14.07 r44382 by Haxc;惠普 HPMFPM1005打印一体机打印机固件采用hplj固件/hplj/。F面是安装设

5、置教程:*part I路由器端安装设置*1、路由器端安装打印机服务器通过putty软件SSH登陆到路由器安装,如果你安装了上述的openwrt固件,可略过此步骤,里面已经集成了。opkg updateopkg in stall kmod-usb-pri nter usbutils p910 ndluci-app-p910 nd2.安装打印机固件HP的低端打印机自身不带打印固件,每次连接pc时固件会从pc加载到打印机中。博主的 HP MFP M100蹴属于这种。通过 putty软件SSH 登陆cd /usr/lib/wget http:/oleg.wl500g.i nfo/hplj/sihp10

6、05.dl-每次打印机上电要自动加载这个驱动固件:打开编辑器:vi /etc/hotplug.d/usb/20-pri nter输入:#!/bi n/sh # cha nge this to the locati on where you put the .dl file:FIRMWARE=/usr/lib/sihp1005.dlDEVICE=/dev/usb/lpOLOGFILE=/var/log/pri nterif "$PRODUCT" = "3f0/3b17/100" -a "$ACTION" = "add"

7、; -a"$DEVTY PE" = "usb_i nterface" ; the necho "$(date): STARTING" > $LOGFILEfor i in $(seq 30); doecho "$(date): Attempt number $i on $DEVICE" >>$LOGFILEif -c $DEVICE ; thenecho "$(date): Device $DEVICEfound." >> $LOGFILE if -z "

8、'usb_printerid $DEVICE | grep FWVER"the necho "$(date): No firmware found on$DEVICE" >> $LOGFILEecho "$(date): Sending firmware toprin ter." >> $LOGFILEcat $FIRMWARE > $DEVICEecho "$(date): don e." >> $LOGFILEelseecho "$(date): Firmwar

9、e already there on$DEVICE" >> $LOGFILEfiecho "$(date): EXITING" >> $LOGFILEexitfisleep 1donefi #.其中.PRODUCT" = "3f0/3b17/100"信息要根据打印机不同做相应修改,把打印机用usb连接至路由器后,通过 putty,利用命令:Isusb -v | grep ID.获得类似以下信息:Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root

10、hubBus 001 Device 002: ID 03f0:3b17 Hewlett-Packard LaserJet M1005MFP3、设置p910nd,安装了上述的openwrt固件,可略过此步,否则:vi /etc/co nfig/p910 nd编辑加入一下内容:config p910ndopti on device /dev/usb/lp0opti on port 0opti on bidirecti onal 1opti on en abled 14、设置防火墙vi /etc/co nfig/firewall,在尾部追加一下内容:# Allow prin terconfig ru

11、leopti on src Ianopti on proto tcpoption dest_port 9100option target ACCEPT*最后: /etc/i ni t.d/p910 nd en able* reboot以上就是在openwrt里面的配置,下面是在里面的配置*part I电脑端安装设置以 win7系统为例 *5、 设备和打印机-添加打印机-添加本地打印机-创建新端口(端口类型Standard tcp/ip port ) -IP 地址:路由地址( )(根据 自己路由地址更改),端口名称默认,查询那个钩掉点下一步就可以添加端口了6、安装驱动(以H

12、P为例,最后一步会让选择端口,选列表 那个),计算机安装打印机官方驱动。至此,打印机服务器安装成功,就可以直接打印了。本文由品质电器 生活科技+友情提供赞助Click on the Start butt on and select Devices and Prin ters.Click on "Add a prin ter."In the Add Pri nter dialog select "Add a local prin ter."Select "Create a new port:" and set th

13、e type of port to "Standard TCP/IPPort". The n click Next.In the "Hostname or IP address:" field enter the IP address of your router.The "Port n ame:" field may be set to somethi ng you like.De-select "Query the printer and automatically select the driver to use,&q

14、uot; the n click n ext.The computer will then attempt to detect the TCP/IP port. This will take sometime and will most likely fail. Failing this step is not a problem.On the "Additional port information required" page set the device typeto Custom and click "Sett ings"Verify the P

15、rinter Nameor IP Address. The Protocol should be set to "Raw" and the Raw Settings Port Number should be 9100. Leave LPR Settings and SNMP Status En abled empty or de-selected. The n click OK.Select the correct prin ter driver and click n ext. You mayn eed to in stall drivers if they are n

16、ot already available.Finish the remaining printer installation wizard steps as needed. Theprin ter should now be in stalled and work ing!Click on the Start butt on and select Devices and Prin ters.Click on "Add a prin ter."In the Add Pri nter dialog select "Add a local prin ter."

17、Select "Create a new port:" and set the type of port to "Standard TCP/IP Port". The n click Next.In the "Hostname or IP address:" field enter the IP address of your router.The "Port n ame:" field may be set to somethi ng you like.De-select "Query the prin

18、ter and automatically select the driver to use,"then click n ext.The computer will then attempt to detect the TCP/IP port. This will take sometime and will most likely fail. Failing this step is not a problem.On the "Additional port information required" page set the device typeto Cus

19、tom and click "Sett ings"Verify the Printer Nameor IP Address. The Protocol should be set to "Raw" and the Raw Settings Port Number should be 9100. Leave LPR Settings and SNMP Status En abled empty or de-selected. The n click OK.Select the correct prin ter driver and click n ext.

20、 You mayn eed to in stall drivers if they are not already available.Finish the remaining printer installation wizard steps as needed. Theprin ter should now be in stalled and work ing!Click on the Start butt on and select Devices and Prin ters.Click on "Add a prin ter."In the Add Pri nter

21、dialog select "Add a local prin ter."Select "Create a new port:" and set the type of port to "Standard TCP/IP Port". The n click Next.In the "Hostname or IP address:" field enter the IP address of your router.The "Port name:" field may be set to something you like.De-select "Query the printer and automatically select the driver to use," the n click n ext.Th

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论