How to Install and Configure Cups Print Server on Centos 7

Installation and Configuration of CUPS Print Server on CentOS 7/Red Hat 7

CUPS stands for common unix printing system.CUPS allow a operating system (LINUX OS) to act as a print server due to its modular printing system. CUPS is a open source printing system that is develop by Apply Inc for macOS, Linux OS and UNIX OS. CUPS support local and network printers due to use of Internet Printing Protocol (IPP). In Linux operating system CUPS is also use as a centralized printing system means other computer on a network use CUPS host as a Print Server, in other words you can say that the computers on a local network that connect to the CUPS host for printing can send a print jobs to the printer on a network by the use of CUPS host. In Linux CUPS Print Server can send a print job to shared printer, network printer and local printer (Printer is directly connect to the CUPS Print Server).

LINUX CUPS (Common Unix Printing System) Print Server is providing below mentions options for printing as a service in a network.

  1. Internet Printing Protocol (ipp).
  2. Internet Printing Protocol (ipps).
  3. LPD/LPR Host or Printer.
  4. AppSocket.
  5. Internet Printing Protocol (http).
  6. Internet Printing Protocol (https).
  7. Windows Printer via SAMBA.

Internet Printing Protocol (IPP and IPPS): IPP (Internet Printing Protocol) is use for the communication between printers and client machines. By use of this protocol you can send multiple print jobs, check the status of printers and also cancel the print jobs. IPPS (Internet Printing Protocol Secure), actually IPP is a application layer protocol and by use of IPPS it is provides a secure application level protocol used for network printing.
LPD/LPR: LPD stands for Line Printer Daemon and LPR stands for Line Printing Request. The both printing protocol  are use TCP/IP connection between printer and the client machines. The Line Printer Daemon (LPD) is install on Print Server, for example CUPS (Common Unix Printing System). The Line printer remote (LPR) software is install on client machines, for example windows base machines that use direct attach printer and provide as shared network printer.
AppSocket: AppSocket is a protocol that invent by Tektronix. It is simple and fastest network protocol that use for printing without security. In CUPS (Common Unix Printing System), it is use for to create connection Network IP Printers with print server (For example: CentOS Linux).
Internet Printing Protocol (HTTP and HTTPS): In Internet printing protcol HTTP (Hyper Text Transfer Protocol) and HTTPS (Hyper Text Transfer Protocol Secure) both protocol are use. HTTP use port 80 and HTTPS is use port 443.
Windows Printer via SAMBA: In CUPS (Common Unix Printing System) Windows Printer via SAMBA means the printer is direct attach with Windows base OS machine that is shared, and SAMBA is a package of Linux OS that is use to integrate Linux servers with stand alone windows base machine or complete active directory environment.

To install package CUPS (Common Unix Printing System) on CentOS Linux 7 machine for enable the printing service on CentOS Linux 7  machine, type the below mention command.
yum install cups
how install and configure cups print server on centos 7

The package CUPS (Common Unix Printing System) with all the dependencies on CentOS Linux 7 machine has been successfully installed. As you can see on the below image.

how install and configure cups print server on centos 7

To start, enable and check the status of CUPS (Common Unix Printing System) on CentOS Linux 7 machine, type the below mention command.
systemctl start cups
systemctl enable cups
systemctl status cups
how install and configure cups print server on centos 7

To configure the CUPS (Common Unix Printing System) on CentOS Linux 7 machine edit the file "cupsd.conf" that is available in the directory "/etc/cups/" by use of vi editor, the command is mention below.
vi /etc/cups/cupsd.conf
how install and configure cups print server on centos 7

Use :se nu  to show the file with numbering, go to the line number 14 for uncomment "listen localhost:631" and write "Port 631" on the next line. The configuration steps are shown below.
#listen localhost:631
Port 631
how install and configure cups print server on centos 7

Go to the line number 30 to allow the specific IP to access the CUPS print server through web browser, edit the below mention line.
Allow from <192.168.10.3>
or
Go to the line number 30 to allow the Local host to access the CUPS print server through web browser, edit the below mention line.
Allow @Local
or
Go to the line number 30 to allow All the host of different Networks to access the CUPS print server through web browser, edit the below mention line.
Allow @All
how install and configure cups server on centos 7

Go to the line number 36 to allow the Specific IP/Local host/All Host to access the Admin pages of CUPS print server through web browser, edit the below mention line.
Allow from <192.168.10.3>
or
Allow @Local
or
Allow @All
how install and configure cups server on centos 7

Go to the line number 44 to allow the Specific IP/Local host/All Host to access the configuration files of CUPS print server through web browser, edit the below mention line.
Allow from <192.168.10.3>
or
Allow @Local
or
Allow @All
how install and configure cups server on centos 7

Edit the below mention lines to allow the Specific IP to access the log files of CUPS print server through web browser.
#To be able to access log files in the CUPS web UI
<Location /admin/log>
AuthType Default
Require user @SYSTEM
Allow from <192.168.10.3>
Order allow,deny
</Location>
You can replace the (Allow from <192.168.10.3>) to (Allow @Local or Allow @All) as per the requirement.
how install and configure cups server on centos 7

Use encryption for the authenticated request on CentOS Linux 7 client machine, edit the below mention line.
DefaultEncryption IfRequested
install and configure cups server on centos 7

After configure the CUPS (Common Unix Printing System) on CentOS Linux 7 machine save the file and restart the CUPS service, type the below mention command.
systemctl restart cups
systemctl status cups
install and configure cups server on centos 7

Add the below mention firewall rule to access CUPS (Common Unix Printing System) through web browser on a network. The tcp port is use to access CUPS (Common Unix Printing System) through web browser is 631. After add this port "631/tcp" to firewall "firewalld", must reload the firewall "firewalld" on CentOS Linux 7 machine. 
firewall-cmd --permanent --add-port=631/tcp
systemctl reload firewalld
install and configure cups server on centos 7

To scan and add printers from the local network start and enable service "cups-browsed", type the below mention command. if you enable the service "cups-browsed", the service "cups-browsed" automatically start after the reboot on CentOS Linux 7 machine and other Linux machines as well.
systemctl start cups-browsed
systemctl enable cups-browsed
install and configure cups server on centos 7

To check the status of service "cups-browsed" on CentOS Linux 7 machine, type the below mention command.
systemctl status cups-browsed
install and configure cups server on centos 7

To install the CUPS (Common Unix Printing System) drivers for Canon, Epson, HP and compatible printers. Type the below mention command.
yum install hplip
yum install gutenprint-cups
To access the CUPS (Common Unix Printing System) through web browser on a network, type the below mention link on browser.
https://IP:631
or
https://192.168.10.225:631
installation and configuration of cups server on centos 7

In the above image you can see that the CUPS (Common Unix Printing System) has been successfully configured to administrate through web interface. In Cups, total six tabs is shown that are home, administration, classes, online help, jobs and printers. To administrate the CUPS (Common Unix Printing System) through web you can go to the every tabs except Administration. To enter into the the administration tab you need administrative privilege of server or at least cups printer administrative privileges. To add a new printer (direct attach printer, network printer and shared network printer), access a log files and etc, go to the administration tab.   

Thanks to read this Article

Comments