Steps to Install and Configure Lenses on Linux

I tried to install Lenses on Linux and couldn’t configure the systemd service file. What would be the steps to install Lenses on Linux?

Hello ejhon_s

If you consult the documentation it provides a lot of details about the installation on Linux:

In general, a minimal installation will include the following commands:

tar -zxvf lenses-5.3.0-linux64.tar.gz
sudo mkdir /opt/lenses
sudo mv lenses/* /opt/lenses
sudo cp /opt/lenses/security.conf.sample /opt/lenses/security.conf
sudo cp /opt/lenses/lenses.conf.sample /opt/lenses/lenses.conf

In the case of using specific environment variable for Lenses, you pass them to the systemd service file via:

sudo nano /etc/systemd/system/lenses.service

Write this on the lenses.service file and save:

Description=Run service

Environment=LENSES_OPTS="-Xmx1g -Xms1g -server -XX:+UseG1GC"
ExecStart=/opt/lenses/bin/lenses /opt/lenses/lenses.conf


After the creation of the file you can execute:

sudo systemctl daemon-reload

You need to pay attention to some points in installation, check the permissions of the Lenses folder and files, check if the file paths are correct. The "Environment" variable receives the variable used during the startup of Lenses, if anything is incorrect it won’t bring them all up. You can analyze the lenses.service you created is correct with this command:

sudo systemd-analyze verify lenses.service