Difference between revisions of "Retain Linux Install"

From GWAVA Technologies Training
Jump to: navigation, search
(Prerequisites)
(MySQL JDBC driver install)
Line 126: Line 126:
 
===Post-install Tasks===
 
===Post-install Tasks===
 
====MySQL JDBC driver install====
 
====MySQL JDBC driver install====
#MySQL on Windows or Linux:
+
MySQL on Linux:
#The MySQL Connector/J  driver must be provided to the Retain Server and/or the Reporting and Monitoring Server and/or the Stubbing Server.
+
 
 +
The MySQL Connector/J  driver must be provided to the Retain Server and/or the Reporting and Monitoring Server and/or the Stubbing Server.
 
#Download Connector/J 5.1.21 or higher [https://dev.mysql.com/downloads/connector/j/]
 
#Download Connector/J 5.1.21 or higher [https://dev.mysql.com/downloads/connector/j/]
 +
#Extract Connector/J <code>tar –xzvf  mysql-connector-java-5.1.39.tar.gz</code>
 
#Stop Tomcat [http://support.gwava.com/kb/?View=entry&EntryID=1436]
 
#Stop Tomcat [http://support.gwava.com/kb/?View=entry&EntryID=1436]
#Copy the mysql-connector-java-5.1.39-bin.jar file to ...RetainServer/WEB-INF/lib (for Retain Server) and/or ...RetainStatsServer/WEB-INF/lib (for the Reporting and Monitoring Server) and/or ...RetainStubbingServer/WEB-INF/lib (for the Stubbing Server).
+
#Copy the mysql-connector-java-5.1.39-bin.jar file to  
#Change the ownership of the jar file to match the other files with chown tomcat:www mysql-connector-java-5.1.39-bin.jar
+
**...RetainServer/WEB-INF/lib (for Retain Server)  
#Change the permissions of the jar file to match the other files with chmod 755 mysql-connector-java-5.1.39-bin
+
**...RetainStatsServer/WEB-INF/lib (for the Reporting and Monitoring Server)  
 +
**...RetainStubbingServer/WEB-INF/lib (for the Stubbing Server)
 +
#Change the ownership of the jar file to match the other files with <code>chown tomcat:www mysql-connector-java-5.1.39-bin.jar</code>
 +
#Change the permissions of the jar file to match the other files with <code>chmod 755 mysql-connector-java-5.1.39-bin</code>
 
#Start Tomcat
 
#Start Tomcat
  

Revision as of 21:11, 29 September 2016

Contents

Multiple Disks

Create multiple disks to follow Retain best practices. This is optional but recommended.

  1. Create the disks in the VM software
  2. Format the disks in the VM itself using YaST/Partitioner, these values should be large enough for a few million small messages
      • ARCHIVE (60-80GB)
      • INDEX (15-30GB)
      • LOGS (6-15GB)
      • DATABASE (20-40GB)

Prerequisites

Database

For Retain 4.x you need to manually download and install a database.

Download MySQL

You can suer MySQL 5.5 or 5.6, this will use 5.6

  1. Create a directory and download it md /software/mysql directory and change to it
  2. download MySQL Community Server 5.5 [1] direct [2] or 5.6[3] direct [4] to that mysql directory
    1. Extract the MySQL client and MySQL server or just untar the whole thing
    • tar -xf MySQL-5.5.42-1.sles11.x86_64.rpm-bundle.tar

Unzip MySQL

Unzip the MySQL package: tar –xvf MySQL-5.6.33-1.sles11.x86_64.rpm-bundle.tar

Install the MySQL server and client

Install with rpm: rpm –ivh MySQL-client-5.6.33-1.sles11.x86_64.rpm rpm –ivh MySQL-server-5.6.33-1.sles11.x86_64.rpm

Changing the Data Directory for MySQL

By default the location of the MySQL data is going to go into the /var/lib/mysql directory. To change this, you need to modify the my.cnf file to point to the location where you want the database.

Note: The location of the database files must have the ownership and group mysql. Be sure to change this accordingly chown –r mysql:mysql /directory

An initial installation of MySQL should not have created the databases yet. Create a directory, if desired, where you want the MySQL database stored.

Edit the my.cnf file (usually found in /etc/my.cnf or can also be in /usr/my.cnf).

Note: If you do not have the my.cnf file you can create one yourself in the /etc directory.

Look for the section [mysqld]. If you do not see it, or you have created your own my.cnf file, create the section by typing it in. Underneath this section, type: datadir=/directory. Save the file.

Once you start MySQL it will create the db logs and database (ibdata1) in this directory. If it fails, check the permissions on the directory, and make it recursive if needed.

Note: If you started MySQL after the initial installation, and the database files were created in the default /var/lib/mysql directory, then you will need to copy everything to your new directory to keep the scaffolding that was created when it was first loaded. Stop MySQL and then copy all of the files from the default location(/var/lib/mysql) to the new location. Double check the ownership and permissions. Edit the my.cnf to reflect the new data location.

Start MySQL.

Create Root Password in MySQL (Initial Installation)

Run mysqld_safe without the permissions loaded. Then you can connect and add a user.

Make sure mysql is not running. rcmysql stop

Type : mysqld_safe --skip-grant-tables & This will launch the process in the background.

Open a new terminal prompt and type : mysql –u root – p.

For the password do not type anything. Just hit [Enter]. This will log you into MySQL

Type : use mysql;

Create password for root user by typing: update user set password=password(‘password1’) where user like ‘%root%’;

Exit out of MySQL. Type : Exit

Stop the background process on the other terminal: [CTRL-C]

Start MySQL normally: rcmysql start

Create a New User (Not Required)

You can use the root user and password for Retain. However, if you’d like to create a new user instead, follow these steps:

Log into MySQL: mysql –u root –p and enter in the password.

Then type: use MySQL

Create Retain Database and Assign Rights and Permission to User

Create your database according to the documentation: Type in the follow commands one at a time.

CREATE DATABASE retain DEFAULT CHARACTER SET 'utf8' DEFAULT COLLATE 'utf8_bin';

Create a new user by typing in: create user ‘retainuser’ @’localhost’ identified by ‘password’;

GRANT ALL PRIVILEGES ON retain.* TO '(UserName)'@'%' IDENTIFIED BY '(Password)';

GRANT ALL PRIVILEGES ON retain.* TO '(Username)'@'localhost' IDENTIFIED BY '(Password)';


Webserver

All versions of Retain need a webserver installed, which tomcat will be installed onto.

Install HTTP Server

  1. Install http server (apache2) from YaST
  2. If connecting to Exchange:
    1. Set DNS to Exchange server, in YaST/Network Settings

The Retain installer will download Java and MySQL if you wish.

Install

Download Retain

  1. Create Retain download directory
      • md /software/retain[version] directory and change to it
    1. download the current version of Retain [5] or the beta.
  2. Unzip Retain
      • chmod +x *.sh

Install Retain

  1. ./RetainInstall.sh Retain 4 requires extensive resources the lab doesn't have, see your mentor about provisioning.
  2. Install typical modules:
    • Retain Server
    • Reporting & Monitoring
    • Worker
    • Skip Stubbing as very few customers use that functionality
    • Skip the Router as that should be installed on its own server in the network DMZ
  3. Setup database, using MySQL
    • give it the path from above
    • give mysql root user a password (remember this)
    • create a database (retain), username (retain) and password
  4. Take the defaults and finish the install

Post-install Tasks

MySQL JDBC driver install

MySQL on Linux:

The MySQL Connector/J driver must be provided to the Retain Server and/or the Reporting and Monitoring Server and/or the Stubbing Server.

  1. Download Connector/J 5.1.21 or higher [6]
  2. Extract Connector/J tar –xzvf mysql-connector-java-5.1.39.tar.gz
  3. Stop Tomcat [7]
  4. Copy the mysql-connector-java-5.1.39-bin.jar file to
    • ...RetainServer/WEB-INF/lib (for Retain Server)
    • ...RetainStatsServer/WEB-INF/lib (for the Reporting and Monitoring Server)
    • ...RetainStubbingServer/WEB-INF/lib (for the Stubbing Server)
  1. Change the ownership of the jar file to match the other files with chown tomcat:www mysql-connector-java-5.1.39-bin.jar
  2. Change the permissions of the jar file to match the other files with chmod 755 mysql-connector-java-5.1.39-bin
  3. Start Tomcat

Next Step

Retain Post Install Configuration

Set Disk Permissions if using Multiple Data Volumes

  1. If using multiple disks:
    1. Stop tomcat rcretain-tomat7 stop
    2. Change ownership on INDEX and LOGS to chown -R tomcat:tomcat /[volume]
    3. Change permissions on INDEX and LOGS to chmod -R 774 /[volume]
    4. Change ownership on DATABASE to chown -R mysql:mysql /DATABASE
    5. Change permissions on DATABASE to chmod -R 774 /DATABASE
    6. Change ownership on ARCHIVE to chown -R tomcat:tomcat /ARCHIVE
    7. Change permissions on ARCHIVE to chmod -R 777 /ARCHIVE
  2. Start tomcat rcretain-tomat7 start



Return to Retain Training

Personal tools
Namespaces

Variants
Actions
Home
Exchange
GroupWise
JAVA
Linux
MTK
Retain
GW Monitoring and Reporting (Redline)
GW Disaster Recovery (Reload)
GW Forensics (Reveal)
GWAVA
Secure Messaging Gateway
GW Mailbox Management (Vertigo)
Windows
Other
User Experience
Toolbox
Languages
Toolbox