This post explains the steps to add a network printer on a Linux Server.
1. Verify if new printer already exists
# lpstat -p
Note: This command will list all installed printers.
2. Verify if printer has a DNS record:
# host [printer name]
3. If error found in verifying if printer has a DNS record, modify /etc/hosts:
# echo "[printer IP address] [printer name]" >> /etc/hosts
Note: Modifying /etc/hosts can be done manually by using vi command.
4. Add printer:
# lpadmin -p [printer name] -E -v socket://[printer name]:[port]
5. Verify if printer has been installed successfully:
# lpstat -p | grep [printer name]
or
# ping [printer name]
Note: Do not modify /etc/cups/printers.conf configuration file directly. Use the lpadmin command to add or remove printers.