cups printing network printer installation configuration

Installation and configuration of CUPS Printing Server on linux Cent OS 6, 7 


CUPS (Common UNIX Printing System), used for the purpose of print sharing server with full administrator controlled setup on your network. here we can follow few steps to install and configure cups printing on linux. 

CUPS works on port 631, Linux uses the Common UNIX Printing System to handle print jobs. CUPS uses the Internet Printing Protocol (IPP)  for managing print jobs and queues.

Steps to install cups on linux cent OS 6, 7 

1. #yum install cups


2. service cups start


3. chkconfig cups on 


the main cups configuration file path is 

#/etc/cups/cupsd.conf

basic working cups configuration of cups  

MaxLogSize 0
LogLevel warn
SystemGroup sys root
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Disable printer sharing and shared printers.
Browsing Off
DefaultAuthType Basic
<Location />
  # Allow remote administration...
  Order allow,deny
  Allow @LOCAL
</Location>
<Location /admin>
  # Allow remote administration...
  Order allow,deny
  Allow @LOCAL
</Location>
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  # Allow remote access to the configuration files...
  Order allow,deny
  Allow @LOCAL
</Location>
<Policy default>
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
<Policy authenticated>
  <Limit Create-Job Print-Job Print-URI>
  AuthType Default
  Order deny,allow
</Limit>
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
  AuthType Default
  Require user @SYSTEM
  Order deny,allow
    </Limit>
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
      </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
      AuthType Default
      Require user @OWNER @SYSTEM
      Order deny,allow
        </Limit>
  <Limit All>
        Order deny,allow
          </Limit>
</Policy>

make the changes accordingly and restart the cups service 

#service cups restart

#systemctl restart cups (for cent OS 7)

if all restarted successfully then you may have web access on localhost:631 to manage printing services. 

Before accessing this make sure port 631, 80 are allowed on print server firewall settings.   

now check the status of cups  

[root@techitadmin ~]# lpstat -a 

printername accepting requests since Mon 18 Mar 2019 12:22:14 PM IST

# lpoptions 

auth-info-required=none copies=1 device-uri=hp:/usb/HP_LaserJet_600_M602?serial=CNB8D20J03 finishings=3 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=0 media=na_letter_8.5x11in number-up=1 printer-commands=ReportLevels printer-info='Hewlett-Packard HP LaserJet 600 M602' printer-is-accepting-jobs=true printer-is-shared=true printer-location='office' printer-make-and-model='HP LaserJet 600 M601 M602 M603 Postscript (recommended)' printer-state=3 printer-state-change-time=1552902479 printer-state-reasons=none printer-type=8556756 printer-uri-supported=ipp://localhost:631/printers/printername sides=one-sided

make sure its showing printer-is-accepting-jobs=true printer-is-shared=true printer


Now add the shared printer using this steps -: 

 https://www.techitadmin.com/2018/06/steps-to-add-printer-network-printer-on.html



[root@techitadmin ~]#lpr filename use to send print command using command line Shell terminal 

[root@techitadmin ~]#lpq to check the status of given print jobs 

[root@techitadmin ~]# lpq 
printer is ready and printing
Rank    Owner   Job     File(s)                         Total Size

active  root    20      test                            1024 bytes

[root@techitadmin ~]#lprm job ID to kill / remove print jobs  




Previous Post
Next Post
Related Posts

2 Comments:

shouab said...

It is very important that you should be picky inchoosing a company for Printing Service. One of the most importantaspect that you need to consider is the quality of their finish product then next is their prices. Printing Service

Sharon M Jenkins said...

I enjoy your article greatly, Thanks a lot for being our mentor on this niche. You are always fairly kind to readers much like me and let me in my everyday living. OJ Pro 9025 setup

Follow by Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.