This shows you the differences between two versions of the page.
система_печати_freebsd [2009/03/06 14:47] val |
система_печати_freebsd [2013/05/22 13:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Система печати FreeBSD ====== | ||
- | |||
- | ===== Использование локального принтера ===== | ||
- | Рассматриваются принтеры HP\\ | ||
- | С некоторыми lpt принтерами приходилось:\\ | ||
- | ''# hw.intr_storm_threshold: 25000''\\ | ||
- | ''# lptcontrol -s -d /dev/lpt0''\\ | ||
- | |||
- | ==== Использование lpd ==== | ||
- | <code> | ||
- | [gX:~] # pkg_add /usr/ports/packages/All/ghostscript-gpl-nox11.tbz | ||
- | |||
- | [gX:~] # cat /etc/printcap | ||
- | lp|local line printer:\ | ||
- | :sh:\ | ||
- | :lp=/dev/ulpt0:\ | ||
- | :sd=/var/spool/output/lpd:\ | ||
- | :if=/usr/share/examples/printing/ifhp:\ | ||
- | :lf=/var/log/lpd-errs: | ||
- | |||
- | [gX:~] # chmod +x /usr/share/examples/printing/ifhp | ||
- | |||
- | [gX:~] # cat >> /etc/rc.conf | ||
- | lpd_enable="YES" | ||
- | |||
- | [gX:~] # /etc/rc.d/lpd start | ||
- | Starting lpd. | ||
- | |||
- | [gX:~] # lpr /etc/rc.conf | ||
- | |||
- | [gX:~] # gunzip -c /usr/share/man/man1/cat.1.gz | groff -man -Tps | lpr | ||
- | |||
- | [gX:~] # zcat /usr/share/man/man1/cat.1.gz | groff -man -Tlj4 | lpr | ||
- | </code> | ||
- | |||
- | ===== Печать из Unix на Unix принт-сервере ===== | ||
- | |||
- | ==== Настройка сервера печати ==== | ||
- | Фильтр печати предполагается на клиенте | ||
- | <code> | ||
- | [gZ:~] # cat /etc/hosts.lpd | ||
- | ... | ||
- | gX | ||
- | ... | ||
- | |||
- | [gZ:~] # cat /etc/printcap | ||
- | lp|local line printer:\ | ||
- | :sh:\ | ||
- | :lp=/dev/ulpt0:\ | ||
- | :sd=/var/spool/output/lpd:\ | ||
- | :lf=/var/log/lpd-errs: | ||
- | </code> | ||
- | |||
- | ==== Настройка клиента ==== | ||
- | <code> | ||
- | [gX:~] # cat /etc/printcap | ||
- | lp|local line printer:\ | ||
- | :sh:\ | ||
- | :rm=gZ:\ | ||
- | :sd=/var/spool/output/lpd:\ | ||
- | :lf=/var/log/lpd-errs:\ | ||
- | :if=/usr/share/examples/printing/ifhp: | ||
- | |||
- | [gX:~] # chmod +x /usr/share/examples/printing/ifhp | ||
- | |||
- | [gX:~] # cat /etc/rc.conf | ||
- | ... | ||
- | lpd_enable="YES" | ||
- | ... | ||
- | |||
- | [gX:~] # /etc/rc.d/lpd start | ||
- | Starting lpd. | ||
- | |||
- | [gX:~] # lpr /etc/rc.conf | ||
- | </code> | ||
- | |||
- | ===== Печать из Windows на Unix принт-сервере ===== | ||
- | ==== Настройка сервера печати ==== | ||
- | Добавляем к конфигурации сервера печати: | ||
- | <code> | ||
- | [gX:~] # cat /usr/local/etc/smb.conf | ||
- | [global] | ||
- | ... | ||
- | printcap name = /etc/printcap | ||
- | printing = bsd | ||
- | ... | ||
- | [lp] | ||
- | path = /tmp | ||
- | printable = Yes | ||
- | print command = lpr -r %s | ||
- | use client driver = Yes | ||
- | </code> | ||
- | |||
- | ===== Печать из Unix на Windows принт-сервере ===== | ||
- | <code> | ||
- | [gX:~] # pkg_info | grep 'cups\|samba\|ghost' | ||
- | cups-base-1.3.9_2 Common UNIX Printing System | ||
- | cups-pstoraster-8.15.4_2 Postscript interpreter for CUPS printing to non-PS printers | ||
- | cups-smb-backend-1.0_2 A CUPS backend for printing to Windows servers | ||
- | ghostscript8-nox11-8.62_5 Ghostscript 8.x PostScript interpreter | ||
- | gutenprint-cups-5.1.7_3 GutenPrint Printer Driver | ||
- | samba-3.0.32_2,1 A free SMB and CIFS client and server for UNIX | ||
- | |||
- | [gX:~] # cat /etc/rc.conf | ||
- | ... | ||
- | cupsd_enable="YES" | ||
- | ... | ||
- | </code> | ||
- | Далее все через web интерфейс | ||
- | http://localhost:631 | ||
- | |||
- | |||