Difference between revisions of "InContext Server Installation"

From Lingoport Wiki
Jump to: navigation, search
(InContext Server Files)
(Installation Steps)
Line 20: Line 20:
 
== Installation Steps ==
 
== Installation Steps ==
   
  +
1. Download and unzip the incontext-server-<version>.zip file from our SFTP site.
1. Download and install the latest Tomcat 8.5.x from <b>https://tomcat.apache.org/download-80</b> and place it in, for example, /usr/local/tomcat, which I will refer to as <b>tomcat</b>.
 
   
  +
2. Download and install the latest Tomcat 8.5.x from <b>https://tomcat.apache.org/download-80</b> and place it in, for example, /usr/local/tomcat, which I will refer to as <b>tomcat</b>.
2. Modify <b>tomcat</b>/conf/server.xml and change the port number from 8080 (used by Jenkins) to 8081
 
   
  +
3. Modify <b>tomcat</b>/conf/server.xml and change the port number from 8080 (used by Jenkins) to 8081
3. Create an empty MySQL database. You may use <b>incontext</b> or any database name you would like:
 
  +
  +
4. Create an empty MySQL database. You may use <b>incontext</b> or any database name you would like:
 
shell> mysql -u root –p<your_password>
 
shell> mysql -u root –p<your_password>
 
mysql> CREATE DATABASE <b>incontext</b> DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;
 
mysql> CREATE DATABASE <b>incontext</b> DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;
   
4. Create a database user and password, replacing dbuser and dbpass with your configured values:
+
5. Create a database user and password, replacing dbuser and dbpass with your configured values:
 
shell> mysql -u root –p<your_password>
 
shell> mysql -u root –p<your_password>
 
mysql> GRANT ALL PRIVILEGES ON *.* TO '<b>dbuser</b>'@'localhost' IDENTIFIED BY '<b>dbpass</b>' WITH GRANT OPTION;
 
mysql> GRANT ALL PRIVILEGES ON *.* TO '<b>dbuser</b>'@'localhost' IDENTIFIED BY '<b>dbpass</b>' WITH GRANT OPTION;
 
mysql> GRANT ALL PRIVILEGES ON *.* TO '<b>dbuser</b>'@'%' IDENTIFIED BY '<b>dbpass</b>' WITH GRANT OPTION;
 
mysql> GRANT ALL PRIVILEGES ON *.* TO '<b>dbuser</b>'@'%' IDENTIFIED BY '<b>dbpass</b>' WITH GRANT OPTION;
   
5. Configure the following values in the <b>incontext-server.sh</b> file for your environment and place the file in the <b>tomcat</b> directory:
+
6. Configure the following values in the <b>incontext-server.sh</b> file for your environment and place the file in the <b>tomcat</b> directory:
 
* export CATALINA_HOME=<b>/usr/local/tomcat</b>
 
* export CATALINA_HOME=<b>/usr/local/tomcat</b>
 
* export JAVA_HOME="<b>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre</b>"
 
* export JAVA_HOME="<b>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre</b>"
 
* export JRE_HOME="<b>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre</b>"
 
* export JRE_HOME="<b>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre</b>"
   
6. Configure the following values in the <b>IncontextServerConfig.groovy</b> file for your environment and place the file in the <b>tomcat</b> directory:
+
7. Configure the following values in the <b>IncontextServerConfig.groovy</b> file for your environment and place the file in the <b>tomcat</b> directory:
 
* String dbname = "<b>incontext</b>"
 
* String dbname = "<b>incontext</b>"
 
* String dbuser = "<b>dbuser</b>"
 
* String dbuser = "<b>dbuser</b>"
 
* String dbpass = "<b>dbpass</b>"
 
* String dbpass = "<b>dbpass</b>"
   
7. Copy the <b>incontext-server.war</b> file to the <b>tomcat</b>/webapps directory
+
8. Copy the <b>incontext-server.war</b> file to the <b>tomcat</b>/webapps directory
   
8. Launch the server:
+
9. Launch the server:
 
> cd <b>tomcat</b>
 
> cd <b>tomcat</b>
 
> ./incontext-server.sh start
 
> ./incontext-server.sh start

Revision as of 20:29, 1 March 2019

InContext Server Installation Requirements

The InContext Server requires the following:

  • Tomcat 8.5.x
  • Java 8
  • MySQL 5.5.3+

Since the Lingoport Suite already requires Java and MySQL, the only additional requirement for the InContext Server is Tomcat.

InContext Server Files

There are three files that comprise the InContext Server:

  • incontext-server.war
  • incontext-server.sh
  • IncontextServerConfig.groovy

The incontext-server.war is the server itself and must be placed under the tomcat/webapps directory.
The incontext-server.sh file is a script for starting/stopping the Server and must be configured and placed in the tomcat directory.
The IncontextServerConfig.groovy file is the configuration file for the InContext Server and must be configured and placed in the tomcat directory.

Installation Steps

1. Download and unzip the incontext-server-<version>.zip file from our SFTP site.

2. Download and install the latest Tomcat 8.5.x from https://tomcat.apache.org/download-80 and place it in, for example, /usr/local/tomcat, which I will refer to as tomcat.

3. Modify tomcat/conf/server.xml and change the port number from 8080 (used by Jenkins) to 8081

4. Create an empty MySQL database. You may use incontext or any database name you would like:

shell> mysql -u root –p<your_password> 
mysql> CREATE DATABASE incontext DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci; 

5. Create a database user and password, replacing dbuser and dbpass with your configured values:

shell> mysql -u root –p<your_password> 
mysql> GRANT ALL PRIVILEGES ON *.* TO 'dbuser'@'localhost' IDENTIFIED BY 'dbpass' WITH GRANT OPTION; 
mysql> GRANT ALL PRIVILEGES ON *.* TO 'dbuser'@'%' IDENTIFIED BY 'dbpass' WITH GRANT OPTION;

6. Configure the following values in the incontext-server.sh file for your environment and place the file in the tomcat directory:

  • export CATALINA_HOME=/usr/local/tomcat
  • export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre"
  • export JRE_HOME="/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre"

7. Configure the following values in the IncontextServerConfig.groovy file for your environment and place the file in the tomcat directory:

  • String dbname = "incontext"
  • String dbuser = "dbuser"
  • String dbpass = "dbpass"

8. Copy the incontext-server.war file to the tomcat/webapps directory

9. Launch the server:

> cd tomcat
> ./incontext-server.sh start

The InContext Server should be launched and you can browse to: http://yourserverurl:8081/incontext-server