Print Server Config

Introduction

This manual describes the configuration of the server-side components of the GBS Print application.

The configuration procedure should be performed only after the installation step. For more information, refer to GBS Apps Setup Manual.

Configuration

The configurations steps are:

All steps are described below. An example config.properties file can be found in the Configuration File Example section.

Tomcat Configuration

Edit the Tomcat configuration file to configure the certificates and port that the application will use.

To change the port, look for Connector port=. This is the port for the backend operations.

The default port for GBS Print is 8127.

Certificates Configuration

To enable SSL authentication, search for Connector port= in the file /conf/server.xml.

There are multiple entries. Look for the one related defining an SSL HTTP/1.1 Connector. If necessary, remove the comment delimiters <!-- and -->. Then, adjust these settings:

The parameter port should be the desired network port for the application.

Change the path of keystoreFile and truststoreFile to the proper values. Do the same for keystorePass and truststorePass.

The parameter clientAuth="true" will require authentication from server-side to client-side and from client-side to server-side. This means that the client will need to import the certificate in the browser to be able to access the application.

Database Password Encryption

In the config.properties file, the jdbc.password parameter is an encrypted password. To generate the encrypted password, perform the following steps:

  1. Go to the following directory:

  2. Execute the command:

  3. The encrypted password will be displayed after the message: “Encrypted password is:”

Store this encrypted password. It will be used in the next step.

Application Properties File

To configure the application properties file, open with:

The most important changes in this configuration file are the jdbc.url, jdbc.username, jdbc.password, and gbds.url properties. Configure the parameters according to the environment.

The complete configuration file is shown in the Configuration File Example section.

Remember to substitute the correct encrypted password generated in the Database password encryption section in the file.

The last step is configuring IP and port of the application that the end-user will access. It must be the same IP and port configured in the Tomcat Configuration section.

Printing Systems

CUPS Installation

The Common UNIX Printing System (CUPS) is a printing system for UNIX-like operating systems. It allows a computer to act as a print server, receiving print jobs from client computers and sending them to the appropriate printer. To install CUPS, perform the following steps:

Install CUPS:

Enable and start CUPS service:

Then, install the graphical user interface for CUPS:

CUPS Configuration

To configure CUPS, edit the configuration file:

To allow access to the CUPS server from other computers, change the following line from:

To:

Then, to allow access to the server, add the Allow from all permission to <Location />. To do so, look for the following lines and change them as follows:

Also, to allow access to the admin pages, add the Allow from all permission to <Location /admin>. To do so, look for the following lines and change them as follows:

Then, save and close the configuration file.

Finally, to apply the changes, restart the CUPS service:

HPLIP Installation (HP Printer Driver)

The HP Linux Imaging and Printing (HPLIP) is a free, open-source HP-developed solution for printing using HP printers in Linux. To install HPLIP, run:

Then, create a group for printer administration:

Finally, add the root user to the lpadmin group:

Printer Configuration

First, start the service for browsing the network for printers running:

Then, access the CUPS web interface at http://<server_ip>:631 using a web browser.

On the top menu bar, click on the Administration tab and then on the Add Printer button.

If a message appears saying that an upgrade is required, click on the displayed URL, then on the Advanced button and on Proceed to https://<server_ip>:631 (unsafe).

Upon returning to the CUPS web interface, click on the Add Printer button again and, if prompted, log in with the root username and password credentials of the server.

On the Add Printer page, in the Local Printers section, select HP Printer (HPLIP) and click on the Continue button.

Next, in the Connection section, enter socket://<printer_IP> and click on the Continue button.

Then, enter a Name, Description and Location for the printer, following the instructions on the page for each field, and click on the Continue button.

In the Make section, select the manufacturer of the printer and click on the Continue button.

Then, in the Model section, select the model of the printer from the list and click on the Add Printer button.

Next, check the default settings of the printer and make sure they suit the environment.

Finally, click on the Set Default Options button to save the printer settings. If everything works as expected, a message will appear saying that the printer was added successfully and you will be redirected to the printer page.

CUPS PDF (optional)

The CUPS PDF printer provides a way to print to a PDF file. It is recommended for testing purposes.

To install CUPS PDF, run:

The default path for saving the PDF files is /root. To change the path, edit the CUPS PDF configuration file:

Then, edit the CUPS PDF configuration file:

In the Path Settings section, change the Out <path> parameter to the desired path.

Then, access the CUPS web interface at http://<server_ip>:631 using a web browser.

On the top menu bar, click on the Administration tab and then on the Add Printer button.

On the Add Printer page, in the Local Printers section, select CUPS-PDF (Virtual PDF Printer) and click on the Continue button.

Then, enter a Name, Description and Location for the printer, following the instructions on the page for each field, and click on the Continue button.

Next, in the Or Provide a PPD File section, click on the Choose File button and select the Cups-PDF.ppd file. This .ppd file can be found in the /etc/cups/ppd/ directory of the server where CUPS PDF is installed. Then, click on the Add Printer button.

Next, check the default settings of the printer and make sure they suit the environment.

Finally, click on the Set Default Options button to save the printer settings. If everything works as expected, a message will appear saying that the printer was added successfully and you will be redirected to the printer page.

Font Installation

The application uses three fonts that must be installed: Arial, OCR-B-10 BT, and Tahoma Bold.

Arial

First, check if the font is already installed:

If the font is not installed (empty result), download the font:

Then, install it:

Check if the font was successfully installed:

You can then remove the downloaded .rpm file:

OCR-B-10 BT

First, make sure to be logged in as root.

Then, check if the font is already installed:

If the font is not installed (empty result), create a ocrb directory in /usr/share/fonts/:

Transfer the font file to the server and move it to the /usr/share/fonts/ocrb directory.

Then, run:

Finally, check if the font was successfully installed:

Tahoma Bold

First, make sure to be logged in as root.

Then, check if the font is already installed:

The result must include Tahoma:style=Bold. If the font is not installed, create a tahomabd directory in /usr/share/fonts/:

Transfer the font file to the server and move it to the /usr/share/fonts/tahomabd directory.

Then, run:

Finally, check if the font was successfully installed:

The result must include Tahoma:style=Bold.

Finish Configuration

After all configuration steps are complete, go back to the GBS Apps Setup Manual - Configuration Section.

Configuration File Example

This section shows an example of the config.properties file.

Last updated

Was this helpful?