Linux Installation Instructions

 
Author
Message
SysAid Technical Writer
580
 

Linux Installation Instructions

Installation with a MySQL or MS SQL database

This guide describes how to install SysAid with Docker using an MySQL or MS SQL database. For information on SysAid requirements, see SysAid System Requirements.

 

Prepare the database

Preparing your SQL database for installing SysAid involves two basic steps:

  1. Creating an empty SysAid database with the necessary priveliges on your running SQL server.
  2. Configure the database to allow remote login.

 

Create an empty database

 

On a MySQL server:

Run:
mysql -u<user> -p<Password>

create database sysaid;
grant all privileges on <DB name>.* to <DB user name>@'%' identified by '<Password>';

 

Instead of granting all IP addresses, you can grant permissions to the docker subnet - usually “172.17.0.%”, but you need to verify it after docker-ce installation (“docker0” interface in “ifconfig”).
For example:
grant all privileges on sysaid.* to root@'172.17.0.%' identified by 'Password1';

Then run:
flush privileges;


On a MS SQL server:

Run:

sqlcmd -S localhost -U sa -P '<YourPassword>'

CREATE DATABASE sysaid

GO

 

Allow remote login

Example texts included here apply to My SQL servers.

 

  1. On your MySQL server edit relevant configuration file:

  • Ubuntu / Debian : /etc/mysql/mysql.conf.d/mysqld.cnf or /etc/mysql/my.cnf

  • CentOs: /etc/my.cnf -
    1. If no “bind-address” line exists, continue to next step.
      If there is a “bind-address” line, update it to: bind-address = 0.0.0.0
    2. Verify below lines are commented out, if they exist at all.
      # skip-networking
      # skip-external-locking
    3. If needed, Open iptables rules.
  1. Run /usr/bin/mysql_secure_installation
    • Update your DB details and answer “n” to the question: Disallow root login remotely?
  2. CentOS-7 - add SQL port access to firewall:
    firewall-cmd --zone=public --add-port=3306/tcp --permanent ; service firewalld restart
  3. Restart SQL server:
    • MySQL: Ubuntu / Debian - /etc/init.d/mysql restart
    • CentOS - service mysql restart
  4. On your Linux server, install MYSQLclient (if not already installed):
    • Ubuntu: apt-get install mysql-client
    • CentOS: yum install mysql
    1. Verify you can access sql db. For example: mysql -h<sql server IP> -u<User> -p<Password>
    2. Verify you are getting the sql prompt.

      Note: Do not continue with this procedure unless you can access the SQL server from the Linux docker unit.

    3. If the connection fails, check that the database exists, privileges have been granted, bind-address has been opened, FW open, etc.

General preparations

  1. On your Linux machine, copy the following files to the /tmp directory:
    • activation.xml (the account’s activation file)
    • SysAid_Prepare_Docker_Env.py
    • Install_SysAid.py
    You can locate the files at http://cdn3.sysaid.com/Install_SysAid.py http://cdn3.sysaid.com/SysAid_Prepare_Docker_Env.py
  2. If the unit has an external network connection, the script automatically fetches the needed packages.
    If you want to install docker without fetching packages from web (i.e. locally), copy the relevant docker pkg to a the /tmp directory:
    • For Ubuntu/Debian installation:
      Find your type by running:
      “lsb_release -a |grep Codename”
      Find your arch by running:
      “dpkg --print-architecture”
      Find relevant docker-ce pkg under:
      https://apt.dockerproject.org/repo/pool/main/d/docker-engine/
      Package name:
      docker-engine_17.05.0~ce-0~<ubuntu/debian>-<TYPE>_<ARCH>.deb (i.e. docker-engine_17.05.0-ce-0-ubuntu-xenial_amd64.deb)
    • For CentOs installation:
      Docker-ce-17.09.0.ce-1.el7.centos.x86_64.rpm
      Can be found here:
      https://download.docker.com/linux/centos/7/x86_64/stable/Packages
  3. For faster and clearer output of the preparation script, run it before the upgrade:
    Ubuntu / Debian: apt-get update -y
    CentOS: yum update -y
  4. Run the preparation script:
    python2.7 ./SysAid_Prepare_Docker_Env.py
    If you want to install docker from a local package, run:
    python2.7 ./SysAid_Prepare_Docker_Env.py -local
    This script verifies prerequisites and installs docker-ce.
  5. Validate that the script finished successfully. If the script fails, fix the problem and rerun the script.

Install SysAid server on Docker

  1. If you want to install SysAid with MSSQL docker container:
    1. Create MSSQL container:
      docker run --detach --name=mssql-sysaid -e 'ACCEPT_EULA=Y' -e
      'SA_PASSWORD=<sa password>' -v /opt/mssql_data:/var/opt/mssql -p
      1433:1433 -d microsoft/mssql-server-linux

    2. Verify that you can connect to the database you created with the datbase parameters you entered. Run the following script:
      docker exec -it <container id> /bin/bash
      (To find container id run: “docker ps”)
    3. Inside the container - connect to the database and create an empty sysaid database:
      /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P <password>
      CREATE DATABASE sysaid
      go
    4. Exit the database container by running “exit” twice.
  2. If you want to link the container to a different port on the host verify that the port is available

  3. There are two options for getting the SysAid docker image:
    1. Pull SysAid image from docker hub:
    • On your Linux machine with the docker installed, pull the relevant image (this process can take a while)
      docker pull sysaid/sysaid_server_linux
    • If you have proxy on this server, see Enable Docker pull with proxy, below.
    1. If you wish to create a local docker image (for slow NW or situations where no external NW is available):
    • Locally download the following files from the relevant version path:
      sysaid-server-linux_<version>.tar.gz
      Dockerfile
      SysAid_container_init.sh

      Validate that the files are owned by root and have full permissions. If not, run from the local directory: chown root:root ./*;chmod 777 ./*
  4. Copy Install_SysAid.py to server & run it
    1. For an existing image (pulled from docker hub), run:
      python2.7 Install_SysAid.py
    2. To create an image locally ( option "b" in the previous step, above), run:
      python2.7 Install_SysAid.py -local
    3. Supply all the requested info.

      Note: During the local installation, there will be an error after Stopping the Tomcat server. This is to be expected.
  5. Verify installation was successful:
    1. Follow installation progress by running:
      docker logs -f sysaidserver
    2. When installation finishes successfully, you should see the line:
      ******** WELCOME TO SYSAID ! **********
    3. If the container execution fails:
    • Check the reason in container log or in sysaid.log under sysaid_data_vol (see details in section 7 below).
    • Fix the problem.
    • On your SQL server - drop the Sysaid database and create a new empty database.
    • Re-run the installation script.
    1. Wait few minutes and check that the SysAid web page is up at:
      http://<IP>:<SysAid port> (IP of the Linux machine with the SysAid docker installation).
  6. At the end of this stage you will have a container running.
    “docker ps” output should look something like this:
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    1b3552a85356 sysaidserver:1.0 "/SysAid/SysAid_co..." 23 minutes ago Up 23 minutes 0.0.0.0:8080->8080/tcp sysaidserver
    (If there is a SQL container - you will see both containers).
  7. SysAid content can be found on the Linux machine under the defined volume: sysaid_data_vol
    To find mount location run:
    docker inspect sysaid_data_vol | grep Mountpoint
    For example, "Mountpoint": "/var/lib/docker/volumes/sysaid_data_vol/_data",
    SysAid Conf can be found under <mountpoint>/WEB-INF/conf
    SysAid logs can be found under <mountpoint>/WEB-INF/logs

 

If SQL is on docker - A volume with database data can be found at: /opt/mysql_data for MySQL, and /opt/mssql_data for MSSQL.

 

Enable Docker pull with proxy

If you have proxy on your Linux server, you need to enable the docker pull via proxy.

 

On Ubuntu:

  1. Create a systemd drop-in directory for the docker service:
    mkdir /etc/systemd/system/docker.service.d
  2. Create a file /etc/systemd/system/docker.service.d/http-proxy.conf that adds the HTTP_PROXY environment variable:
    [Service]
    Environment="HTTP_PROXY=http://<proxy_host>:<proxy_port>/"

    Or, if you are behind an HTTPS proxy server, create a file called
    /etc/systemd/system/docker.service.d/https-proxy.conf that adds the HTTPS_PROXY environment variable:
    [Service]
    Environment="HTTPS_PROXY=https://<proxy_host>:<proxy_port>/"
  3. Flush changes:
    sudo systemctl daemon-reload
  4. Verify that the configuration has been loaded:
    sudo systemctl show --property Environment docker
    You should see the environment you updated.
  5. Restart Docker:
    sudo systemctl restart docker

The above instructions were taken from docker official site, and can be found here:
https://docs.docker.com/engine/admin/systemd/#httphttps-proxy

This message was edited 2 times. Last update was at May. 01, 2018 03:31 AM

SysAider
3
 
if anybody is looking for the derby-DB to MySQL migration on linux:
ilient personel is not authorized to hand out the db-migration-tool for linux.
therefore (at least what they told me) there are only 2 options:
- on-site online migration (extra charge) by a technician from ilient
- offline migration (free): DB has to be sent to ilient, they migrate it, DB will be sent back.
SysAider
3
 
I'm trying to install but have this messages:

[root@sysaid sysaid-server-linux]# sh init-sysaid.sh /usr/share/tomcat/webapps/sysaid/
Welcome to the SysAid initialization script!
init-sysaid.sh: línea 2: $'\r': no se encontró la orden
This script will configure the database connection and initialize the database.
init-sysaid.sh: línea 3: $'\r': no se encontró la orden
init-sysaid.sh: línea 21: error sintáctico cerca del elemento inesperado `$'do\r''
'nit-sysaid.sh: línea 21: `for i in ${SYSAID_HOME}/WEB-INF/lib/*.jar ; do


Centos 7.1
java version "1.7.0_79"
OpenJDK Runtime Environment (rhel-2.5.5.1.el7_1-x86_64 u79-b14)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

This message was edited 1 time. Last update was at Jun. 13, 2015 12:33 PM

SysAid Community Manager Product Team
4866
 
Hi,

This could occur when the script file corrupts for some reason. Please try using the attached file (replace the one you already have). Please make sure not to open it on a Windows machine, as it may corrupt it.

Let me know if this resolves the issue.

Cheers,
Danny
init-sysaid.sh
SysAider
3
 
i upload a new init-sysaid.sh and have the same error again and again. how to do?

Thanks
SysAid Community Manager Product Team
4866
 
Hi,

Try installing the dos2unix package on your Linux, then use the command

Which will convert the file to one that Linux can understand (in case of it containing Windows characters).
Afterwards, please try running the installation again.

Let me know if this works.

Cheers,
Danny
SysAider
3
 
is ok now. thanks

but have another warning:

Checking connection....
initSysAid is initializing log4j
Initializing log4j with: /public_html/helpdesk/WEB-INF/log4j.properties
log4j:WARN No appenders could be found for logger (com.ilient).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Connection verified.
Validating license .....
initSysAid is initializing log4j
Initializing log4j with: /public_html/helpdesk/WEB-INF/log4j.properties
log4j:WARN No appenders could be found for logger (com.ilient).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
License verified. Account ID is free. Serial is 770CAFF1ABC62952
Please choose a main user name. Use this login for your first login into SysAid [sysaid]:

Please choose the password of the sysaid login [changeit]:
xxxxxxx
Initializing database....
initSysAid is initializing log4j
Initializing log4j with: /public_html/helpdesk/WEB-INF/log4j.properties
log4j:WARN No appenders could be found for logger (com.ilient).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Initialization complete! Please restart the web application server (Tomcat). Welcome to SysAid!

This message was edited 1 time. Last update was at Aug. 04, 2015 01:59 PM

SysAid Community Manager Product Team
4866
 
Hi,

These warnings are normal and can be ignored.

Cheers,
Danny
SysAider
3
 
Good day support,

I have tried to upgrade and get the following error:

Please enter SysAid Server root directory:
/usr/share/apache-tomcat-7.0.70/webapps/sysaid
Verify build type....
Dublicate sysaid.jar
Copy files....
Delete old files....
Fix translation file
dos2unix: converting file /usr/share/apache-tomcat-7.0.70/webapps/sysaid/util/FixCustomFile.sh to Unix format ...
dir not found
change permissions to accountConf and prop.properties...
dos2unix: converting file /usr/share/apache-tomcat-7.0.70/webapps/sysaid/WEB-INF/web.xml to Unix format ...
Done.

Please focus on this
dos2unix: converting file /usr/share/apache-tomcat-7.0.70/webapps/sysaid/util/FixCustomFile.sh to Unix format ...
dir not found

The file /usr/share/apache-tomcat-7.0.70/webapps/sysaid/util/FixCustomFile.sh exist, however I suspect that there is an issue with the syntax in the file FixCustomFile.sh
#!/bin/sh

if [ $# -ne "1" ]
then
echo "Usage: `basename $0` <SysAid Path>"
exit 1
fi

java -cp $1/WEB-INF/lib/sysaid.jar com.ilient.util.FixCustomFile $1

Please advise as we are DOWN atm
SysAid Community Manager Product Team
4866
 
Hi jerryv,

I understand you already have an open ticket with our customer support team, so I suggest sending this information as a reply to the ticket so our team could investigate this issue in depth in a timely manner.

Cheers,
Danny
SysAider
3
 
Good day,

Posting to a ticket now.

Cheers.
SysAider
1
 
What's the way to get a SysAID package to install?

The link from this help, doesn't work:

http://cdn3.sysaid.com/syaid-server-linux.tar.gz

I want to create a new basic installation, and I need this package.

Regards.
SysAid Community Manager Product Team
4866
 
Hi El Punt Avui,

I've sent you a PM.

Cheers,
Danny
SysAider
6
 
Hi,

I followed the upper instructions, but I get 404/sysaid

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/ilient/server/InitAccount : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:30
at java.lang.ClassLoader.loadClass(ClassLoader.java:35
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Initialization complete! Please restart the web application server (Tomcat). Welcome to SysAid!


Ubuntu 16.04
Apache Tomcat/7.0.68

SysAid Community Manager Product Team
4866
 
Hi goblin,

Which version of SysAid are you trying to install?
Please check your Java version, for the latest release of SysAid, Java 8 is required. The commands to download it are:
32 bit: wget http://cdn3.sysaid.com/jre-8u92-linux-i586.tar.gz
64 bit: wget http://cdn3.sysaid.com/jre-8u92-linux-x64.tar.gz

Cheers,
Danny

This message was edited 1 time. Last update was at Nov. 28, 2016 10:33 AM