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.
- Internet Printing Protocol (ipp).
- Internet Printing Protocol (ipps).
- LPD/LPR Host or Printer.
- Internet Printing Protocol (http).
- Internet Printing Protocol (https).
- 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.
yum install cups
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.
systemctl start cupssystemctl enable cupssystemctl status cups
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.
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:631Port 631
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>
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>orAllow @LocalorAllow @All
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>orAllow @LocalorAllow @All
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 DefaultRequire user @SYSTEMAllow from <192.168.10.3>Order allow,deny</Location>
Use encryption for the authenticated request on CentOS Linux 7 client machine, edit the below mention line.
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 cupssystemctl status cups
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/tcpsystemctl reload firewalld
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-browsedsystemctl enable cups-browsed
To check the status of service "cups-browsed" on CentOS Linux 7 machine, type the below mention command.
systemctl status cups-browsed
yum install hplipyum install gutenprint-cups