Difference between revisions of "Retain Linux Install"

From GWAVA Technologies Training
Jump to: navigation, search
(Create Retain Database and Assign Rights and Permission to User)
(Prerequisites)
Line 13: Line 13:
  
 
====Download MySQL ====
 
====Download MySQL ====
You can use MySQL 5.5 or 5.6, this will use 5.6
+
You can use MySQL 5.5, 5.6, or 5.7
 +
 
 +
===MySQL 5.6===
 +
This will use 5.6
  
 
# Create a directory and download it md /software/mysql directory and change to it
 
# Create a directory and download it md /software/mysql directory and change to it
Line 78: Line 81:
 
Create a new user by typing in: <code>create user ‘retainuser’ @’localhost’ identified by ‘password’;</code>
 
Create a new user by typing in: <code>create user ‘retainuser’ @’localhost’ identified by ‘password’;</code>
  
====Create Retain Database and Assign Rights and Permission to User====
+
===MySQL 5.7===
 +
[[MySQL57_SLES12_Installation]]
 +
 
 +
===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 your database according to the documentation: Type in the follow commands one at a time.

Revision as of 19:56, 18 August 2017

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 use MySQL 5.5, 5.6, or 5.7

MySQL 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

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 (optional)

By default the location of the MySQL will be installed to the /var/lib/mysql directory. If you wish to change where the database is installed, follow these instructions. If not skip this step.

To change the data directory for MYSQL follow these steps:

  • Create a directory where you want the MySQL database stored.
  • Start MySQL.

MySQL will create the database files in the default location found in /var/lib/mysql directory.

  • Stop MySQL
  • Copy all of the MySQL files from the /var/lib/mysql directory to the new directory that was created.
  • Edit the my.cnf file. This is usually found in the /etc directory.
  • Locate the section [mysqld] and underneath type in:
             datadir=[new directory path]

Note: If the my.cnf file does not exist create it and add in the [mysqld] section with the datadir=[new directory path] below it.

  • Change the ownership rights for the newly created directory to mysql: chown –r mysql:mysql /directory
  • Start MySQL. service mysql start

Change Root Password in MySQL (Post-Installation)

After the installation, MySQL 5.6 will create a random password for the root user. The password is found in a file in the home directory.

To access this file type: cd [ENTER]. This will take you back to the home directory.

Then type: cat .mysql_secret. This will display the random password. You will need this to change the root password.

To change the root password follow these steps: [5]

  • Start MySQL rcmysql start
  • Type: mysql_secure_installation
  • Enter in the password that you got from the /root/.mysql_secret file.
  • When it asks to change the password say yes, and make the change.
  • Proceed through the rest of the prompts and say yes to all of them.
  • Log into MySQL by typing: mysql –u root –p and type in the new root password.

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.

Type: use MySQL

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

MySQL 5.7

MySQL57_SLES12_Installation

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.

Log into MySQL:

  • mysql -u root -p

Create the retain database by typing in:

  • 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;
  • For internal GWAVA test systems you may go ahead and use the root user for MySQL. For customers it is recommended to create a new user.

Give the user the necessary right to the Retain database. After creating the database type in:

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

Example:

  • GRANT ALL PRIVILEGES ON retain.* TO 'retain'@'%' IDENTIFIED BY 'password1';
  • GRANT ALL PRIVILEGES ON retain.* TO 'retain'@'localhost' IDENTIFIED BY 'password1';

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 [6] 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

If using 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 [7]
  2. Extract Connector/J tar –xzvf mysql-connector-java-5.1.39.tar.gz
  3. Stop Tomcat [8]
  4. Copy the mysql-connector-java-5.1.39-bin.jar file to
    • ...RetainServer/WEB-INF/lib (for Retain Server)

If the Reporting and Monitoring and Stubbing Servers are installed add the JDBC file into those as well.

    • ...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.jar
  3. Start Tomcat

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
    8. Start tomcat rcretain-tomcat7 start
Change Log Location

To change the location of the log files, simply create a symbolic link (somewhat synonymous with Windows shortcuts). Retain, by default, gives you the option during installation to store the logs at /var/log/retain-tomcat7 or at /opt/beginfinite/retain/tomcat7. If stored at /var/log/retain-tomcat7, then Retain creates a symbolic link at /opt/beginfinite/retain/tomcat7 directory called 'logs" that points to the /var/... location.

  1. Create the directory in the location you wish to use
  2. Stop tomcat
  3. Move the current logs to the new location: mv /var/log/retain-tomcat7/* /[path to new directory]
  4. Make tomcat the owner of the new directory path: chown -R tomcat:tomcat /[path to new directory]
  5. Set the appropriate file *permissions for the tomcat user and group: chmod -R 664 /[path to new directory]
    • If you are moving them to a separate volume, the file permissions must be 774
  6. Create a symbolic link in the parent directory of the default logs directory and point it to the new location:
    1. Change to the /var/log directory
    2. Remove the current log directory: rm -r retain-tomcat7
    3. Create a new symbolic link called retain-tomcat7 that points to your new log location: ln -s [path to new directory] ./retain-tomcat7 (and press ENTER)
  7. Set the new Start tomcat

Next Step

Retain Post Install Configuration

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