HowTo: Compile and Install SCM and SC

From SCInterface Wiki

Jump to: navigation, search

Compiling and installing an SCM and SCs should only be completed by those very comfortable with compiling source code or those experiencing issues with using the consolidated SCInterface installer. Please refer to the SCInterface Quick Start Guide on how to use the SCInterface installer to install an SCM and SC.


The following provides the step-by-step process for installing and compiling an SCM and SC on a Linux system.

Contents

Dependencies

Required Libraries

These are the libraries required to compile the SCM and SC:

  • libcrypto
  • libm
  • libpthread
  • libssl
  • libxml2
  • libz
  • libpq (SCM only)
  • libpqxx (SCM only)
  • libusb (SCM only; only if compiling dongle support)

Database

  • Postgres 7.x or later

Obtaining the code

Its recommended to download a stable tarball.

Alternately, you can download the most recent cvs code using these instructions:

  1. Make sure subversion is installed
  2. svn co svn://svn.scinterface.com/SCInterface/trunk SCInterface

Compiling SCM and SC

Run the configure script in typical unix fashion to setup your compilation environment. ./configure --help will show you some options that you can enable and disable for compile time. If you are doing a one time compile, it is worth compiling with --enable-optimized passed to the configure script.

After the configure script is run you can compile using make.

If no errors have occured, this will create two binaries, the SCManager and the SController. If you enabled the license generator flag in the configure options, you will also see a LicenseGen binary which can be used to create licenses to restrict the SCM to a specific host.

SC setup

Run make setup-sc to install the scuser, groups, add sudo entries, etc. This should only need to be run one time.

To setup which SCM host the SC should connect to and its port, run 'make setup-schost'

Installing SCM/SC

Run make install to populate the database and install the binaries into /usr/bin. Make sure that the database is installed before running this target.

Notes about the database authentication methods

The setup process attempts to setup database authentication via ident, under the user scmuser. Ident authentication will allow you to enter the database without a password if you are running as one of the authorized users defined (in this case scmuser). If you want the SCM to connect in this fashion it is necessary to run the SCM binary under the user scmuser whom is already created by the setupdb.sh script. The scripts also attempt to setup a password based authentication, but you may have to tweak your pg_hba.conf in order to use this method, because the script does only add entries for ident at this point. You can add a line before the ident lines that looks like:

 local all all md5 

If you want to use this md5 method of database authentication, you'll want to make sure the include/systemSettings.h are using the scmuser as SERVERDB_USERNAME and SERVERDB_PASSWORD. If you want to change this username or password, you'll have to make sure this user is created within postgres and has access to all data. You'll also want to verify that the dbservers table has the correct username/password.

Post-install tweaks

Note : this can be a cause for headaches, so if you're not an experienced Linux user, it might not be worth the extra hassle

When installing the SCM, a few libraries will be installed in the scmuser's home directory to help you get going as soon as possible if some libraries aren't installed on your system. This includes libxml2 (xml parsing lib), libpqxx (C postgresql client api), libssl0.9.8 (openssl). If these packages are already installed centrally on your system, it might be worth using your version instead of the ones bundled with the SCM. To test the feasability of this, a few tests can be run : ldd /usr/bin/SCManager. This will tell you which libs are found elsewhere on your system and which need to be installed (or can't be found). Basically, the ones that can't be found must either be installed separately or you must continue on using the ones installed with the SCM. (when launching the SCM, it adds the /home/scmuser as a lib path so that it can load libs from there first).

  1. Rename the libs that you want to remove to something else (don't remove them quite yet)
  2. Launch the SCManager. (either by launching through the runme.sh script then looking at the log or by entering this command : "LD_LIBRARY_PATH=/home/scmuser /usr/bin/SCManager". If everything launches fine, then you're all set.
Personal tools