Сервер печати CUPS Сравнение версий

Различия

Здесь показаны различия между двумя версиями данной страницы.

Ссылка на это сравнение

Следующая версия
Предыдущая версия
wiki:руководство_по_ubuntu_server:файловые_сервера:cups [2012/07/31 20:24]
создано
wiki:руководство_по_ubuntu_server:файловые_сервера:cups [2018/07/03 13:55] (текущий)
[Настройка]
Строка 8: Строка 8:
 =====Сервер печати CUPS===== =====Сервер печати CUPS=====
  
-The primary mechanism for Ubuntu ​printing and print services is the Common UNIX Printing System ​(CUPS). ​This printing system is a freely availableportable printing layer which has become the new standard for printing in most Linux distributions.+Первичный (основной) механизм для печати и сервисов печати в Ubuntu ​ - это Общая система печати UNIX (**Common UNIX Printing System** - CUPS). ​Данная система печати - это свободный,​ доступный и переносимый слойкоторый стал новым стандартом печати для большинства дистрибутивов ​Linux.
  
-CUPS manages print jobs and queues and provides network printing using the standard Internet Printing Protocol ​(IPP), while offering support for a very large range of printers, from dot-matrix to laser and many in between. CUPS also supports ​PostScript ​Printer Description ​(PPD) and auto-detection of network printersand features a simple ​web-based configuration and administration tool. +**CUPS** управляет заданиями печати и обеспечивает сетевую печать с использованием стандарта IPP (интернет протокол печати), поддерживая огромный список принтеров от матричных до лазерных и любых других. CUPS также поддерживает ​PostScript ​описание принтеров ​(PPD) и автоопределение сетевых принтерова также простую настройку и администрирование через ​web интерфейс.
- +
-    Installation +
-    Configuration +
-    Web Interface +
-    References+
  
 ====Установка==== ====Установка====
  
-To install ​CUPS on your Ubuntu ​computer, simply use sudo with the apt-get ​command and give the packages to install as the first parameterA complete ​CUPS install has many package dependenciesbut they may all be specified on the same command lineEnter the following at a terminal prompt to install ​CUPS:+Для установки ​CUPS на ваш ​Ubuntu ​компьютер просто используйте ​sudo для выполнения команды ​apt-get, передав ей названия пакетов в качестве параметраПолная установка ​CUPS содержит много зависимостейно они все могут быть определены в одной командеВведите следующее в терминале для установки ​CUPS: 
 +<​code>​sudo apt-get install cups</​code>​ 
 +После аутентификации вас по паролю,​ пакеты должны загрузиться и установиться без ошибок. В заключении установки сервер CUPS будет запущен автоматически.
  
-sudo apt-get install cups +При необходимости решения проблемвы можете получить доступ к ошибкам сервера ​CUPS через файл журнала ​/​var/​log/​cups/​error_log. ​Если журнал ошибок не дает достаточно информации для решения какой-либо проблемыуровень журналирования ​CUPS можно повысить изменением директивы **LogLevel** в файле настроек ​(описывается нижедо **debug** или даже **debug2** со стандартного **info**что будет сохранять в журнал абсолютно всеЕсли вы проведете такое изменениене забудьте вернуть все обратно после решения проблемычтобы избежать излишнего разрастания файла журнала.
- +
-Upon authenticating with your user passwordthe packages should be downloaded and installed without error. Upon the conclusion of installation,​ the CUPS server will be started automatically. +
- +
-For troubleshooting purposes, you can access CUPS server errors via the error log file at: /​var/​log/​cups/​error_log. ​If the error log does not show enough information to troubleshoot any problems you encounterthe verbosity of the CUPS log can be increased by changing the LogLevel ​directive in the configuration file (discussed belowto "debug" or even "debug2"which logs everything, from the default of "​info"​If you make this changeremember to change it back once you've solved your problemto prevent the log file from becoming overly large.+
  
 ====Настройка==== ====Настройка====
  
-The Common UNIX Printing System server'​s behavior is configured through the directives contained in the file /​etc/​cups/​cupsd.conf. ​The CUPS configuration file follows the same syntax as the primary configuration file for the Apache ​HTTP serverso users familiar with editing ​Apache's configuration file should feel at ease when editing the CUPS configuration fileSome examples of settings you may wish to change initially will be presented here.+Поведение сервера CUPS настраивается директивами,​ содержащимися в файле ​/​etc/​cups/​cupsd.conf. ​Файл настроек ​CUPS использует тот же синтаксис,​ что и первичный айл конфигурации ​HTTP сервера Apache, поэтому пользователизнакомые с редактированием файла настроек ​Apache ​смогут легко освоить настройки и файла ​CUPS. Здесь приведены некоторые примеры настроек,​ которые вы можете использовать,​ предварительно изменив.
  
-Prior to editing the configuration fileyou should make a copy of the original file and protect it from writingso you will have the original settings as a referenceand to reuse as necessary. +Прежде чем редактировать файл настроеквам стоит сделать копию оригинального файла и защитить ее от записичтобы у вас были оригинальные настройки в качестве руководствакоторые можно восстановить при необходимости.
- +
-Copy the /​etc/​cups/​cupsd.conf file and protect it from writing with the following commands, issued at a terminal prompt:+
  
 +Скопируйте и защитите от записи файл /​etc/​cups/​cupsd.conf.original с помощью следующих команд в терминале:​
 +<​code>​
 sudo cp /​etc/​cups/​cupsd.conf /​etc/​cups/​cupsd.conf.original sudo cp /​etc/​cups/​cupsd.conf /​etc/​cups/​cupsd.conf.original
 sudo chmod a-w /​etc/​cups/​cupsd.conf.original sudo chmod a-w /​etc/​cups/​cupsd.conf.original
 +</​code>​
  
-    ​ServerAdmin: ​To configure the email address of the designated administrator of the CUPS serversimply edit the /​etc/​cups/​cupsd.conf ​configuration file with your preferred text editorand add or modify the ServerAdmin ​line accordinglyFor exampleif you are the Administrator for the CUPS server, and your e-mail address is '​bjoy@somebigco.com', ​then you would modify the ServerAdmin ​line to appear as such:+ 1. **ServerAdmin**Для настройки ​email адреса назначенного администратора ​CUPS серверапросто откройте на редактирование файл ​/​etc/​cups/​cupsd.conf ​с помощью своего любимого текстового редактораи добавьте или измените строку ​ServerAdmin ​соответствующим образомНапримересли вы администратор ​CUPS сервера и ваш email адрес %%'​bjoy@somebigco.com'​%%вам следует изменить строку ​ServerAdmin ​следующим образом: 
 +<​code>​ServerAdmin bjoy@somebigco.com</​code>​
  
-    ServerAdmin bjoy@somebigco.com+ 2**Listen**: В Ubuntu по умолчанию установленный CUPS сервер слушает только интерфейс обратной петли по адресу 127.0.0.1. Чтобы заставить CUPS сервер прослушивать актуальный IP адрес сетевого адаптера,​ вы должны указать ​ сетевое имя или пару IP адрес/​порт добавочной директивой Listen. Например,​ если ваш сервер находится в локальной сети с IP адресом 192.168.10.250 и вы хотите сделать его доступным для других систем в этой подсети,​ отредактируйте /​etc/​cups/​cupsd.conf,​ добавив директиву Listen, как показано ниже: 
 +<​code>​ 
 +Listen 127.0.0.1:​631 ​          # existing loopback Listen 
 +Listen /​var/​run/​cups/​cups.sock # existing socket Listen 
 +Listen 192.168.10.250:​631 ​     # Listen on the LAN interface, Port 631 (IPP) 
 +</​code>​ 
 +В приведенном примере вы можете закомментировать или удалить ссылки на адрес обратной петли (127.0.0.1),​ если вы не хотите,​ чтобы **cupsd** прослушивал этот интерфейс,​ а только Ethernet интерфейсы локальной сети. Чтобы разрешить прослушивать все сетевые интерфейсы,​ назначенные определенному сетевому имении,​ включая обратную петлю, вы можете создать такую запись Listen для имени (например) socrates: 
 +<​code>​Listen socrates:​631 ​ # Listen on all interfaces for the hostname '​socrates'</​code>​ 
 +или опустить директиву Listen и использовать вместо нее **Port**: 
 +<​code>​Port 631  # Listen on port 631 on all interfaces</​code>​
  
-    Listen: By default on Ubuntu, the CUPS server installation listens only on the loopback interface at IP address 127.0.0.1. In order to instruct the CUPS server to listen on an actual network adapter'​s IP addressyou must specify either a hostname, the IP address, or optionally, an IP address/​port pairing via the addition of a Listen directive. For example, if your CUPS server resides on a local network at the IP address 192.168.10.250 and you'd like to make it accessible to the other systems on this subnetwork, you would edit the /​etc/​cups/​cupsd.conf and add a Listen directiveas such+Для дополнительных примеров по директивам в файле настройки ​CUPS, смотрите ассоциированную страницу системного руководствавведя в терминале следующую команду
- +<​code>​man cupsd.conf</​code>​ 
-    Listen 127.0.0.1:​631 ​          # existing loopback Listen +<​note>​Всякий раз, как вы внесли изменения в файл настроек ​/​etc/​cups/​cupsd.conf, ​вам потребуется перезапустить сервер ​CUPS вводом следующей команды в терминале
-    Listen /​var/​run/​cups/​cups.sock # existing socket Listen +<​code>​sudo /​etc/​init.d/​cups restart</​code></​note>​
-    Listen 192.168.10.250:​631 ​     # Listen on the LAN interface, Port 631 (IPP) +
- +
-    In the example above, you may comment out or remove the reference to the Loopback address (127.0.0.1) if you do not wish cupsd to listen on that interface, but would rather have it only listen on the Ethernet interfaces of the Local Area Network (LAN). To enable listening for all network interfaces for which a certain hostname is bound, including the Loopback, you could create a Listen entry for the hostname socrates as such: +
- +
-    Listen socrates:​631 ​ # Listen on all interfaces for the hostname '​socrates'​ +
- +
-    or by omitting the Listen directive and using Port instead, as in: +
- +
-    Port 631  # Listen on port 631 on all interfaces +
- +
-For more examples of configuration directives in the CUPS server configuration file, view the associated system manual page by entering the following command at a terminal prompt: +
- +
-man cupsd.conf +
- +
-Whenever you make changes to the /​etc/​cups/​cupsd.conf ​configuration fileyou'll need to restart the CUPS server by typing the following command at a terminal prompt+
- +
-sudo /​etc/​init.d/​cups restart+
  
 ====Web интерфейс==== ====Web интерфейс====
 +<note tip>​Настраивать CUPS и отслеживать его состояние можно через web интерфейс,​ который по умолчанию доступен по адресу **//​%%http://​localhost:​631/​admin%%//​**. Web интерфейс можно использовать для выполнения любых задач управления принтером.</​note>​
  
-CUPS can be configured and monitored using a web interfacewhich by default is available at http://​localhost:​631/​adminThe web interface can be used to perform all printer management tasks.+Чтобы выполнить административную задачу через ​web интерфейсвы должны либо разрешить учетную запись root на своем сервере,​ либо авторизоваться как пользователь из группы **lpadmin**По соображениям безопасности CUPS не авторизует пользователей с пустыми паролями.
  
-In order to perform administrative tasks via the web interface, you must either have the root account enabled on your server, or authenticate as a user in the lpadmin group. For security reasons, CUPS won't authenticate a user that doesn'​t have a password. +Чтобы добавить пользователя в группу ​lpadmin, ​выполните в терминале следующую команду
- +<​code>​sudo usermod -aG lpadmin username</​code>​ 
-To add a user to the lpadmin ​grouprun at the terminal prompt+Дальнейшая документация доступна через закладку **//%%Documentation/​Help%%//​** ​web интерфейса.
- +
-sudo usermod -aG lpadmin username +
- +
-Further documentation is available in the Documentation/​Help ​tab of the web interface.+
  
 ====Ссылки==== ====Ссылки====
  
-CUPS Website +  ​-- [[http://​www.cups.org/​|Сайт проекта CUPS]]
- +
-Debian Open-iSCSI page+
  
 ---- ----