Wednesday, May 29, 2013

Simple procedure to installing cups printer from Linux server:


Searching for the required packages using yum

[root@pavan /]# yum search cups
Loaded plugins: product-id, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
====================================================== N/S Matched: cups ======================================================
gutenprint-cups.x86_64 : CUPS drivers for Canon, Epson, HP and compatible printers
cups.x86_64 : Common Unix Printing System
cups-pk-helper.x86_64 : A helper that makes system-config-printer use PolicyKit
ptouch-driver.x86_64 : CUPS driver for Brother P-touch label printers
  Name and summary matches only, use "search all" for everything.
[root@pavan /]#

Installing the packages..  
 [root@pavan /]# yum install cups.x86_64
Loaded plugins: product-id, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Resolving Dependencies
Dependency Updated:
  dbus-libs.x86_64 1:1.2.24-7.el6_3
Complete!
Install Hp Supported driver for cups printer.

[root@pavan /]# yum install gutenprint-cups.x86_64
Loaded plugins: product-id, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gutenprint-cups.x86_64 0:5.2.5-2.el6 will be installed
--> Processing Dependency: gutenprint = 5.2.5-2.el6 for package: gutenprint-cups-5.2.5-2.el6.x86_64
--> Processing Dependency: libgutenprint.so.2()(64bit) for package: gutenprint-cups-5.2.5-2.el6.x86_64
--> Running transaction check
---> Package gutenprint.x86_64 0:5.2.5-2.el6 will be installed
Complete!
[root@pavan /]#

Configuring cups
Just edit /etc/cups/cupsd.conf

Keep the following entries:
# Only listen for connections from the local machine.
Listen 172.50.0.95:631
Listen /var/run/cups/cups.sock

# Restrict access to the server...
  Order allow,deny
  Allow 192.168.0.0/16 10.0.0.0/8 62.243.72.0/24 127.0.0.1  (here add client vpn address)
# Restrict access to the admin pages...
  Order allow,deny
  Allow 192.168.0.0/16 10.0.0.0/8 62.243.72.0/24 127.0.0.1 (here add client vpn address)

open the port 631.
Service cups restart

Go to browser with ip address:
http://172.50.0.95:631/

Add the required printer & enjoy printing. ...