LocalSolver logo
is now
Hexaly logo

We're excited to share that we are moving forward. We're leaving behind the LocalSolver brand and transitioning to our new identity: Hexaly. This represents a leap forward in our mission to enable every organization to make better decisions faster when faced with operational and strategic challenges.

This page is for an old version of Hexaly Optimizer. We recommend that you update your version and read the documentation for the latest stable release.

Installation on Linux

Here are described the main steps for installing and licensing LocalSolver on your computer. LocalSolver is implemented in C++ language. The software can be used either as a standalone executable or as a callable library (C++, Java, Python, .NET). Please check that your computer meets the minimum system requirements before installing the software.

System requirements

  • Architecture: x64.
  • Operating systems: Linux with libc 2.9 (or superior) and libstdc++ 6.0.15 (or superior).
  • For the C++ library: GCC 4.6 (or superior).
  • For the Java library: Java 7 (or superior).
  • For the .NET library: .NET Core 2.0 (or superior), Mono 2.6 (or superior).
  • For the Python library: Python 2.7, Python 3.6 or Python 3.7

Installation

You must have administrator rights on your computer to install LocalSolver. If you haven’t done so yet, download LocalSolver for Linux from the LocalSolver website.

  1. Open a terminal as root where the archive LocalSolver_XXXX.run is located.
  2. Execute the following command line: bash LocalSolver_XXXX.run
../_images/installation-linux-1.png

Press enter to continue.

Choose the install location of LocalSolver and press enter to start the installation. Note that you can install different versions of LocalSolver on your system but only the last installed version will be easily accessible from the command line. To use the previous ones, you have to use their exact path (e.g. /opt/localsolver_9_0/bin/localsolver). Furthermore, you will experience troubles if you try to use the native C library without modifying environment variables such as LD_LIBRARY_PATH.

../_images/installation-linux-2.png

Choose the install location of LocalSolver.

If you install LocalSolver for the first time or if no license file is already present on your system, a specific page with your hardware signature will appear at the end of the installation. You will have to give us this hexadecimal number if you want to apply for a free trial license or a free academic license on our website.

../_images/installation-linux-3.png

Hardware signature. It is generated only if you have not specified any license.

Licensing for: Free Trial, Free Academic, Desktop or Server licenses

Note

If you don’t have your license yet, please go to our website to register and request a free academic license or a free trial license. As licenses are manually delivered by a member of the LocalSolver team, the whole procedure can take a few days to complete (usually 1 day).

You simply have to put the correct license file in the installation folder of LocalSolver. For that:

  1. Go on LocalSolver website, login on your account and download your license file.
  2. Copy the file license.dat downloaded from your account in /opt/localsolver_XXX/.

Licensing for: Floating or Site licenses

This procedure applies only if you bought a floating or an academic network license. You have to setup a token server and then license each client machine as follows.

For the token server

  1. Go to your account and download the license file of the token server.
  2. Copy the file license.dat downloaded from your account in /opt/localsolver_XXX/.
  3. Open a terminal and launch the executable “lstokenserver”. Note that this program is launched in background and will keep running until the machine is shut down. You can safely close your terminal.

If you want to start automatically the token server when the machine is rebooted you have to create an init script. You can also add the following line in /etc/rc.local:

/opt/localsolver_XXX/bin/lstokenserver

For each client machine

Create a new file and write the following line with the IP of the token server:

TOKEN_SERVER = <HOST NAME OR IP ADDRESS OF THE TOKEN SERVER>

Save it in /opt/localsolver_XXX/license.dat.

Note

The token server listens on TCP port 7462. Please ensure that your firewall is correctly configured to allow the trafic between the lstokenserver service and your applications.

Alternative license locations

If you want to use several licenses on the same machine, or if you have no write access to the default license location, you can specify a different license path. LocalSolver will look at the following locations for a valid license file, in that order:

  1. The file the LS_LICENSE_PATH environment variable points to.
  2. In the current directory, if a file named license.dat is present.
  3. In the default location, /opt/localsolver_XXX/license.dat.

The LocalSolver API provides methods to set the license path. To use it, please consult the documentation for your programming language.

Testing

Open a terminal in folder /opt/localsolver_XXX/ and enter the following line:

$ localsolver examples/toy/toy.lsp lsTimeLimit=1

If no error occurs, you are ready to use LocalSolver and solve your first model.

Uninstall LocalSolver

You must have root privileges on your computer to uninstall LocalSolver. Then, uninstall LocalSolver in 2 steps:

  1. Open a terminal as root and navigate to /opt/localsolver_XXX/
  2. Execute the following command line: bash uninstall.sh