Setting up an IPP Print Server using CUPS

advertisement
How-to’s » Linux » Step-by-Step IPP Based Print Server Using CUPS
Setting up an IPP Print Server using CUPS
This tutorial describes how to install an IPP Linux print server with CUPS, install and
configure printer drivers on the print server, and how to setup an IPP printer in Windows.
Contents:
1. Linux:
IPP Print Server setup
2. Linux:
Installation/Configuration of Linux printer drivers
3. Windows: IPP Client (printer) setup
Linux Files to be edited:
1.
2.
3.
4.
/etc/cups/cupsd.conf
/var/log/cups/error_log
/etc/cups/mime.types
/etc/cups/mime.convs
1. Linux IPP Print Server setup
Step #1 – Install the CUPS Service
# su root
# yum install cups*
Step #2 - Configure CUPS
The default CUPS configuration limits administration to the local machine. To open up
access, edit the /etc/cups/cupsd.conf file and comment out the lines reading:
The Below lines restricts web administration access to localhost
Comment lines 842, 843, 844 so it should look like this:
Order deny,allow
Deny from all
Allow from 127.0.0.1
To disable password authentication you need to edit the /etc/cups/cupsd.conf file
and comment out the lines reading:
The Below lines restricts the printer access to system users
Comment lines 838, 839 so the user can print without authentication
AuthType Basic
AuthClass System
Page 1 of 11
IPP Print Server using CUPS
ITNW 2332 Unix Network Integration
Prof. Michael P. Harris
Step #3 - Restart the CUPS server
# service cups restart
Step #4 - Run the steps in Part 2. “Installation/Configuration of Linux printer drivers”
Step #5 - Restart the CUPS Service
# service cups restart
– If required the CUPS can be managed with
http://localhost:631
- on the local host
or
http://192.168.6.210:631
- on a remote host (Note the port designation :631)
Note: Here IP: 192.168.6.210 is for the example, use your own IP-address
Step #6 – Run the steps in Part 3. “Windows IPP Client(printer) setup” if needed.
Step #7 - Trouble shooting CUPS
If you find the error message in the log file /var/log/cups/error_log:
print_job: Unsupported format 'application/octet-stream'!
Hint: Do you have the raw file printing rules enabled?
Page 2 of 11
IPP Print Server using CUPS
ITNW 2332 Unix Network Integration
Prof. Michael P. Harris
Solution: uncomment the line in the /etc/cups/mime.types file:
application/octet-stream
and in the /etc/cups/mime.convs file:
application/octet-stream
application/vnd.cups-raw
If the CUPS is installed with public IP-address:
port 631 should be enabled on the proxy/squid/router level
If the CUPS is installed with a private IP-address and you want to print from anywhere:
configure port forwarding at the router and the router should configured with a public
IP-address so that the print service can be controlled with a web-browser at address:
http://public-IP:631/printers/printername
and the router will forward packets to local-IP:631.
2. Installation/Configuration of Linux Printer drivers
Print Driver Installation for an HP LaserJet printer on Linux.


Printer Model: HP LaserJet 1020
Operating System: Linux
Note: Steps 1 to 9 differ from printer to printer
Step #1
# cd /tmp
Step #2
- Download print driver for a HP LJ1020 (or your printer…)
# wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz
Please go through the reference: http://foo2zjs.rkkda.com/ for more information on different type of printers.
Step #3
- De-compress & Extract the files
# tar -xvzf foo2zjs.tar.gz
Page 3 of 11
IPP Print Server using CUPS
Step #4
ITNW 2332 Unix Network Integration
- Compile it
# cd foo2zjs
# make
Step #6
- Get the driver info for HP LaserJet 1020
# ./getweb 1020
Step #7
- Install the printer driver
# make install
Step #8
- Enable the USB hot plug feature
# make install-hotplug
Step #9
- Bind the HPLJ1020 printers drivers to CUPS
# make cups
Step #10.a - Configure the printer using the Command Line Interface
# lpadmin -p hplj1020 -E -v /dev/usb/lp0 -m
\
/backup/downloads/foo2zjs/PPD/HP-LaserJet_1020.ppd
- Set it as the default printer (if required)
# /usr/sbin/lpadmin -d hplj1020
- Start printer services
# /usr/bin/enable hplj1020
- Accept printing requests into the Print Queue
# /usr/sbin/accept hplj1020
Page 4 of 11
Prof. Michael P. Harris
IPP Print Server using CUPS
ITNW 2332 Unix Network Integration
Prof. Michael P. Harris
Step #10.b - Configuration of printer using GUI Interface (Preferred)
# printconf-gui
Or we can choose it from
(GNOME)-> Applications -> System Settings -> Printing
- Click [New] to set up a new Print Queue
- Click [Forward]
Page 5 of 11
IPP Print Server using CUPS
ITNW 2332 Unix Network Integration
Prof. Michael P. Harris
- Name = hplj1020 (choose your own)
- Short description = HP LaserJet 1020 PostScript Printer (choose your own)
- Select the printer
Note: If the printer is not listed, click [Rescan devices] to list the printers
Page 6 of 11
IPP Print Server using CUPS
ITNW 2332 Unix Network Integration
Prof. Michael P. Harris
- Review the Manufacturer/Model of the printer and name of the Print Queue
- Click [Yes] (to print a test page)
Page 7 of 11
IPP Print Server using CUPS
ITNW 2332 Unix Network Integration
- if the test print is OK, Click [Yes]
3. IPP Windows Client (printer) setup
Client OS: Windows XP/Windows Server
Step #1
– Start -> Settings -> Printers and Faxes
Step #2
- Click [Add a printer]
Page 8 of 11
Prof. Michael P. Harris
IPP Print Server using CUPS
ITNW 2332 Unix Network Integration
Prof. Michael P. Harris
- Click [Next]
- Select option: (•) “A network printer, or a printer attached to another computer”
Page 9 of 11
IPP Print Server using CUPS
ITNW 2332 Unix Network Integration
Prof. Michael P. Harris
- Select option: (•) “Connect to a printer on the Internet or a home or office network:”
URL: http://192.168.6.210:631/printers/hplj1020
Note: Specify the URL of the Linux CUPS/IPP print server
- Choose the correct Printer Driver for the printer
Page 10 of 11
IPP Print Server using CUPS
ITNW 2332 Unix Network Integration
Prof. Michael P. Harris
- Select option: (•) “Yes” (If you want to run this printer as default)
Click [Finish] and test your Windows IPP client to Linux CUPS/IPP print server setup
Page 11 of 11
Download