Use apt-get or yum to install CUPS (Common Unix Printing System).
~]# yum install cups
The CUPS configuration file is located at /etc/cups/cupsd.conf. By default, CUPS is configured to only listen for connections on the server itself. To be able to connect to the server from any PC in the subnet, make the following change to the cupsd.conf file (replace x.x.x.x with the IP address of the server).
Listen x.x.x.x:631 Listen /var/run/cups/cups.sock
Restart CUPS, and ensure CUPS is active and running.
~]# systemctl restart cups ~]# systemctl status cups
By default, the server does not have any allow or deny rules. Add Allow from 192.168.0.0/24 (use your actual network address and prefix).
<Location /> Order allow,deny Allow from 192.168.0.0/24 </Location> <Location /admin> Order allow,deny Allow from 192.168.0.0/24 </Location>
You can now access the CUPS web browser interface by navigating to http://www.example.com:631 (replace www.example.com with the hostname or IP address of your CUPS print server). The CUPS web based utility has many options, such as add printers, find printer drivers, and view print jobs.
By default, CUPS will not have any printers listed. To add printers, in the web based utility, select the Administration tab > Add Printer, and follow the prompts. Once the printer has been added, use the lpstat -p command on the CUPS server to verify the printer is listed.
~]# lpstat -p printer HP-Photosmart is idle. enabled since Mon 01 Jan 2016 00:00:01 AM CST
There should also be a PostScript Printer Definition (PPD) file in the /etc/cups/ppd directory. The .ppd file contains the printers configuration settings, such as paper size, duplexing, and fonts (just to name a few).
~]# ls /etc/cups/ppd HP-Photosmart.ppd
The /etc/cups/printers.conf file will include the list of printers connected to the CUPS server.
~]# cat /etc/cups/printers.conf <DefaultPrinter HP-Photosmart> UUID urn:uuid:xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Info HP Photosmart DeviceURI hp:/net/Photosmart_C6200_series?zc=HP58BE98 . . .