Как настроить принтер HP LaserJet P1005 на Ubuntu server

Очень приятная штука — сетевой принтер, да такой на который можно печать напрямую с iPhone (вероятно и с iPad). HP LaserJet P1005 — не самый лучший принтер для подключения в unix‘подобным ОС, но установить и открыть доступ по сети к нему удалось. После этого можно будет печатать как с Mac OS, iPhone, так и с w!nd0w$ 8.
Приступим к установке HP LaserJet P1005 на Ubuntu server 12.04 x64.

Сначала смотрим подключённые к северу usb-устройства:
$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Если подключить веб-камеру, то увидим:
$ lsusb
Bus 001 Device 003: ID 0458:704d KYE Systems Corp. (Mouse Systems) Slim 1322AF
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Если подключить принтер HP LaserJet P1005, то увидим:
$ lsusb
Bus 001 Device 004: ID 03f0:3d17 Hewlett-Packard LaserJet P1005
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Ставим сначала:
sudo apt-get install hplip
Хотите продолжить [Д/н]? Д
соглашаемся на установку.

после того как установится, настроим командой:
sudo hp-setup -i

попутно отвечаем на вопросы о типе подключения,модели принтера, какие драйвера использовать, качать ли плагины, подверждаем лицензионное соглашение на плагины, печатать ли тестовую страницу:
HP Linux Imaging and Printing System (ver. 3.12.2)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

(Note: Defaults for each question are maked with a ‘*’. Press to accept the default.)

———————————
| SELECT CONNECTION (I/O) TYPE |
———————————

Num Connection Description
Type
——— ———- ———————————————————-
0* usb Universal Serial Bus (USB)
1 net Network/Ethernet/Wireless (direct connection or JetDirect)
2 par Parallel Port (LPT:)

Enter number 0…2 for connection type (q=quit, enter=usb*) ?

Using connection type: usb

Using device: hp:/usb/HP_LaserJet_P1005?serial=BC1TR7G

Setting up device: hp:/usb/HP_LaserJet_P1005?serial=BC1TR7G

————————
| PLUG-IN INSTALLATION |
————————

HP Linux Imaging and Printing System (ver. 3.12.2)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

(Note: Defaults for each question are maked with a ‘*’. Press to accept the default.)

/
——————————————
| PLUG-IN INSTALLATION FOR HPLIP 3.12.2 |
——————————————

Option Description
———- —————————————————
d Download plug-in from HP (recomended)
p Specify a path to the plug-in (advanced)
q Quit hp-plugin (skip installation)

Enter option (d=download*, p=specify path, q=quit) ?

—————————
| DOWNLOAD CONFIGURATION |
—————————

Checking for network connection…
Downloading configuration file from: http://hplip.sf.net/plugin.conf
Downloading configuration: [\ ] 0%

——————-
| DOWNLOAD PLUGIN |
——————-

Checking for network connection…
Downloading plug-in from: http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-3.12.2-plugin.run
Downloading plug-in: [\ ] 0% Receiving digital keys: /usr/bin/gpg —no-permission-warning —keyserver pgp.mit.edu —recv-keys 0xA59047B9

———————-
| INSTALLING PLUG-IN |
———————-

Verifying archive integrity… All good.
Uncompressing HPLIP 3.12.2 Plugin Self Extracting Archive…………………………………..

HP Linux Imaging and Printing System (ver. 3.12.2)
Plugin Installer ver. 3.0

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Plug-in version: 3.12.2
Installed HPLIP version: 3.12.2
Number of files to install: 36

You must agree to the license terms before installing the plug-in:

LICENSE TERMS FOR HP Linux Imaging and Printing (HPLIP) Driver Plug-in

These License Terms govern your Use of the HPLIP Driver Plug-in Software (the «Software»). USE OF THE SOFTWARE INCLUDING, WITHOUT
LIMITATION, ANY DOCUMENTATION, IS SUBJECT TO THESE LICENSE TERMS AND THE APPLICABLE AS-IS WARRANTY STATEMENT. BY DOWNLOADING AND INSTALLING
THE SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THESE TERMS. IF YOU DO NOT AGREE TO ALL OF THESE TERMS, DO NOT DOWNLOAD AND INSTALL THE
SOFTWARE ON YOUR SYSTEM.

1. License Grant. HP grants you a license to Use one copy of the Software with HP printing products only. «Use» includes using, storing,
loading, installing, executing, and displaying the Software. You may not modify the Software or disable any licensing or control features
of the Software.

2. Ownership. The Software is owned and copyrighted by HP or its third party suppliers. Your license confers no title to, or ownership in,
the Software and is not a sale of any rights in the Software. HP’s third party suppliers may protect their rights in the Software in the
event of any violation of these license terms.

3. Copies and Adaptations. You may only make copies or adaptations of the Software for archival purposes or when copying or adaptation is
an essential step in the authorized Use of the Software. You must reproduce all copyright notices in the original Software on all copies or
adaptations. You may not copy the Software onto any public network.

4. No Disassembly. You may not Disassemble the Software unless HP’s prior written consent is obtained. «Disassemble» includes
disassembling, decompiling, decrypting, and reverse engineering. In some jurisdictions, HP’s consent may not be required for limited
Disassembly. Upon request, you will provide HP with reasonably detailed information regarding any Disassembly.

5. No Transfer. You may not assign, sublicense or otherwise transfer all or any part of these License Terms or the Software.

6. Termination. HP may terminate your license, upon notice, for failure to comply with any of these License Terms. Upon termination, you
must immediately destroy the Software, together with all copies, adaptations and merged portions in any form.

7. Export Requirements. You may not export or re-export the Software or any copy or adaptation in violation of any applicable laws or
regulations.

8. U.S. Government Restricted Rights. The Software has been developed entirely at private expense. It is delivered and licensed, as defined
in any applicable DFARS, FARS, or other equivalent federal agency regulation or contract clause, as either «commercial computer software»
or «restricted computer software», whichever is applicable. You have only those rights provided for such Software by the applicable clause
or regulation or by these License Terms.

9. DISCLAIMER OF WARRANTIES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, HP AND ITS SUPPLIERS PROVIDE THE SOFTWARE «AS IS» AND WITH
ALL FAULTS, AND HEREBY DISCLAIM ALL OTHER WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO,
WARRANTIES OF TITLE AND NON-INFRINGEMENT, ANY IMPLIED WARRANTIES, DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
PURPOSE, AND OF LACK OF VIRUSES ALL WITH REGARD TO THE SOFTWARE. Some states/jurisdictions do not allow exclusion of implied warranties or
limitations on the duration of implied warranties, so the above disclaimer may not apply to you in its entirety.

10. LIMITATION OF LIABILITY. Notwithstanding any damages that you might incur, the entire liability of HP and any of its suppliers under
any provision of this agreement and your exclusive remedy for all of the foregoing shall be limited to the greater of the amount actually
paid by you separately for the Software or U.S. $5.00. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL HP OR ITS
SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS OF PROFITS OR CONFIDENTIAL OR OTHER
INFORMATION, FOR BUSINESS INTERRUPTION, FOR PERSONAL INJURY, FOR LOSS OF PRIVACY ARISING OUT OF OR IN ANY WAY RELATED TO THE USE OF OR
INABILITY TO USE THE SOFTWARE, OR OTHERWISE IN CONNECTION WITH ANY PROVISION OF THIS AGREEMENT, EVEN IF HP OR ANY SUPPLIER HAS BEEN ADVISED
OF THE POSSIBILITY OF SUCH DAMAGES AND EVEN IF THE REMEDY FAILS OF ITS ESSENTIAL PURPOSE. Some states/jurisdictions do not allow the
exclusion or limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to you.

Do you accept the license terms for the plug-in (y=yes*, n=no, q=quit) ?

Done.

Done.

———————
| PRINT QUEUE SETUP |
———————

Please enter a name for this print queue (m=use model name:’HP_LaserJet_P1005’*, q=quit) ?
Using queue name: HP_LaserJet_P1005
Locating PPD file… Please wait.

Found PPD file: drv:///hpcups.drv/hp-laserjet_p1005.ppd
Description:

Note: The model number may vary slightly from the actual model number on the device.

Does this PPD file appear to be the correct one (y=yes*, n=no, q=quit) ?
Enter a location description for this printer (q=quit) ?homesrv
Enter additonal information or notes for this printer (q=quit) ?

Adding print queue to CUPS:
Device URI: hp:/usb/HP_LaserJet_P1005?serial=BC1TR7G
Queue name: HP_LaserJet_P1005
PPD file: drv:///hpcups.drv/hp-laserjet_p1005.ppd
Location: homesrv
Information:

———————
| PRINTER TEST PAGE |
———————

Would you like to print a test page (y=yes*, n=no, q=quit) ?
warning: hp-testpage should not be run as root/superuser.

HP Linux Imaging and Printing System (ver. 3.12.2)
Testpage Print Utility ver. 6.0

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

warning: No display found.
error: hp-testpage -u/—gui requires Qt4 GUI support. Entering interactive mode.
Printing test page to printer HP_LaserJet_P1005…
request id is HP_LaserJet_P1005-1 (1 file(s))
Test page has been sent to printer.

note: If an error occured, or the test page failed to print, refer to the HPLIP website
note: at: http://hplip.sourceforge.net for troubleshooting and support.

Done.

Done.

Сразу оговорюсь, что тестовая страница не вышла из принтера, но это не беда и мы продолжаем дальше.
sudo apt-get install cups делать не пришлось, потому что уже установилась самая новая версия:
sudo apt-get install cups
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Уже установлена самая новая версия cups.

далее
sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf_v00

Сетевые интерфейсы у меня следующие:
$ ifconfig
br0 Link encap:Ethernet HWaddr 00:21:91:0b:74:59
inet addr:10.36.2.7 Bcast:10.36.2.255 Mask:255.255.255.0
inet6 addr: fe80::221:91ff:fe0b:7459/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:807152 errors:0 dropped:0 overruns:0 frame:0
TX packets:312122 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:71504482 (71.5 MB) TX bytes:49247783 (49.2 MB)

eth0 Link encap:Ethernet HWaddr 6c:f0:49:04:b6:60
inet addr:192.168.1.7 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::6ef0:49ff:fe04:b660/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:185553015 errors:0 dropped:0 overruns:0 frame:0
TX packets:132375248 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:184252501017 (184.2 GB) TX bytes:35143058724 (35.1 GB)

eth1 Link encap:Ethernet HWaddr 00:21:91:f4:49:c6
inet addr:10.36.1.7 Bcast:10.36.1.255 Mask:255.255.255.0
inet6 addr: fe80::221:91ff:fef4:49c6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18018041 errors:0 dropped:894 overruns:0 frame:0
TX packets:57457766 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3056273111 (3.0 GB) TX bytes:79090165776 (79.0 GB)

eth2 Link encap:Ethernet HWaddr 00:21:91:0b:74:59
inet6 addr: fe80::221:91ff:fe0b:7459/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1773193 errors:0 dropped:0 overruns:0 frame:0
TX packets:30276 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:379491648 (379.4 MB) TX bytes:3990033 (3.9 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:740527 errors:0 dropped:0 overruns:0 frame:0
TX packets:740527 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:274644374 (274.6 MB) TX bytes:274644374 (274.6 MB)

ppp0 Link encap:Point-to-Point Protocol
inet addr:ВНЕШНИЙ_АДРЕС P-t-P:78.36.100.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:5555873 errors:0 dropped:0 overruns:0 frame:0
TX packets:4191123 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:6977605213 (6.9 GB) TX bytes:459467358 (459.4 MB)

virbr0 Link encap:Ethernet HWaddr 2a:47:ac:6f:f1:3a
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

vnet0 Link encap:Ethernet HWaddr fe:54:00:a2:bf:54
inet6 addr: fe80::fc54:ff:fea2:bf54/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:40255 errors:0 dropped:0 overruns:0 frame:0
TX packets:805843 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:7165228 (7.1 MB) TX bytes:81395429 (81.3 MB)

Физический интерфейс, смотрящий в сеть — eth1 с IP 10.36.1.7
sudo nano /etc/cups/cupsd.conf
исправил только строки:
# Only listen for connections from the local machine.
Listen 10.36.1.7:631
Listen /var/run/cups/cups.sock

строки:
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd
BrowseAddress @LOCAL

строки:
# Restrict access to the server...

Order deny,allow
deny from all
allow from 10.36.1.*

# Restrict access to the admin pages…

Order deny,allow
deny from all
allow from 10.36.1.*

перезапускаю cups на ubuntu server:
sudo /etc/init.d/cups restart
или так:
sudo service cups restart

заходим на https://10.36.1.7:631

команды, freebsd, настройка, установка, сервер, server, ubuntu, cups, принтер

«Продолжить всё равно»
во вкладке «Принтеры», вижу мой принтер

команды, freebsd, настройка, установка, сервер, server, ubuntu, cups, принтер

Принтер нужно выключить и включить с кнопки, после чего он сначала заморгает зелёным светодиодом, потом красным, покрутит шестерёнками, снова заморгает зелёным и останется статично горящий зелёный светодиод.

В mac подключается принтер быстро и непринуждённо:

команды, freebsd, настройка, установка, сервер, server, ubuntu, cups, принтер

Можно печатать на установленный принтер с mac os x и даже с iphone, используя AirPrint, если конечно развёрнут wi-fi в сети. Как напечатать с iPhone на принтер HP LaserJet P1005 показано на изображениях ниже:

команды, freebsd, настройка, установка, сервер, server, ubuntu, cups, принтер

команды, freebsd, настройка, установка, сервер, server, ubuntu, cups, принтер

команды, freebsd, настройка, установка, сервер, server, ubuntu, cups, принтер

команды, freebsd, настройка, установка, сервер, server, ubuntu, cups, принтер

команды, freebsd, настройка, установка, сервер, server, ubuntu, cups, принтер

Ещё настроим печать на принтер HP LaserJet P1005 из w!nd0w$. Для этого сначала заходим в «Панель управления» и открываем «Устройства и принтеры» :

команды, freebsd, настройка, установка, сервер, server, ubuntu, cups, принтер

Ставим метку «Выбрать общий принтер по имени» и в поле вписываем http://IP_адрес_сервера:631/printers/HP_LaserJet_P1005  , потом жмём «Далее»:

команды, freebsd, настройка, установка, сервер, server, ubuntu, cups, принтер

Выбираем изготовителя принтера «Generic«, а принтер «MS Publisher Imagesetter«, жмём «ОК» :

команды, freebsd, настройка, установка, сервер, server, ubuntu, cups, принтер

 Потом, в основном, нажимаем кнопку «Далее» и «Готово»:

команды, freebsd, настройка, установка, сервер, server, ubuntu, cups, принтер

команды, freebsd, настройка, установка, сервер, server, ubuntu, cups, принтер

Теперь у нас установлен принтер:

команды, freebsd, настройка, установка, сервер, server, ubuntu, cups, принтер

Итого мы имеем CUPS, установленный на Ubuntu Server, подключенный и настроенный принтер HP LaserJet P1005, а так же возможность печатать на него из под целого зоопарка ОС, в частности из под MAC OS, IOS, w!nd0w$.

Как настроить принтер HP LaserJet P1005 на Ubuntu server: Один комментарий

Добавить комментарий