The Open Source Edition of the ActiveGrid Server

The Open Source Edition of the ActiveGrid Server
The Open Source Edition of the ActiveGrid Server, bundles MySQL, rather than DB2 Express-C. This appendix explains how to install the Open Source Edition. It contains the following sections:
Before Installing the ActiveGrid Server
Before you install the ActiveGrid Server, make sure you do not have an instance of MySQL running. The ActiveGrid Server installation also installs MySQL and, if you’re running an instance of MySQL on the same port, you’ll have problems with your installation.
Some versions of Linux automatically run MySQL, so even if you do not use MySQL, you should check to make sure it’s not running on the machine.
If you need to keep your MySQL instance running during the ActiveGrid Server installation, check the port number for the existing MySQL instance and make sure to use a different MySQL port number.
Installing the ActiveGrid Server
To install the Open Source Edition of the ActiveGrid Server, download and run the appropriate installer (called activegrid-server-x.x-linux-installer.bin where x.x is the version number). You might need to change the permissions on the installer executable in order to run it. The installation includes all third-party packages necessary for running the ActiveGrid Server (“Third-Party Components” on page 20).
The install wizard prompts you to enter the following configuration information:
Installation Directory: The installer puts all the files and sub-directories for the ActiveGrid Server in this directory.
Hostname: The hostname for the server. The default value is localhost, which is sufficient for a single-node server. If you plan to use a cluster of servers, then use the same hostname that the servers in the cluster use to communicate with each other internally.
Port Number: The port number for the ActiveGrid Server. There are no restrictions on the port number.
MySQL Port: The port number for MySQL Server. The default port number for the MySQL Server is 3306.
Many versions of Linux automatically run MySQL on the default port. Before you select port 3306, make sure that you don’t have an instance of MySQL already running on this port.
Testing the Installation
Invoke the start script by running:
INSTALL_DIR/bin/activegridctl start
The Apache Server and MySQL Server should both come up. Try accessing the Pet Store Demo application at:
http://localhost:8080/petstore
Installing in Silent Mode (Batch Installations)
You can install the ActiveGrid Server in silent mode, which is useful for batch installations of the ActiveGrid Server on multiple machines. To run the installer in silent mode, use the following command:
./activegrid-server-X.X-linux-installer.bin --mode unattended --prefix INSTALL_DIR --port SERVER_PORT --hostname HOSTNAME --mysqlport MYSQL_PORT
where:
X.X is the version of the ActiveGrid Server that you’re installing.
INSTALL_DIR is the directory in which you’re installing the ActiveGrid Server.
SERVER_PORT is the main port the ActiveGrid Server listens on. If you leave out the SERVER_PORT argument, the installer uses the default (8080).
MYSQL_PORT is the TCP port that MySQL runs on. If you leave out the MYSQL_PORT argument, the installer uses the default (3306).
HOSTNAME is the hostname that the ActiveGrid Server listens on. If you leave out the HOSTNAME argument, the installer uses the default (localhost) which is fine for a single-node server configuration. However, if you are using the distributed session management mode, set HOSTNAME to the name of the correct DNS resolvable name of the machine.
Installing Multiple Server Instances on a Single System
It is possible to install the ActiveGrid Server and use that installation to start multiple server instances. For example, on a multi-user machine, you can install the product as root, and individual users on the system can start their own server instance without having to reinstall the product.
To set up another server instance on a machine that already has the ActiveGrid Server installed, follow these steps:
1.
Copy the INSTALL_DIR/local directory and all of its contents to the location on the system from which you want to run another instance. In this documentation, we refer to the location of the new isntance as NEW_INSTANCE_ROOT.
2.
Within the NEW_INSTANCE_ROOT/local directory, edit each of the following files, changing all references to the INSTALL_DIR/local/conf directory to point to the NEW_INSTANCE_ROOT/local directory:
3.
Make sure that all files are owned by the user running the new server instance, rather than the user who originally installed the server.
4.
If you are running as the root user, change the permissions on the data/ and logs/ directories so that their contents are read/writable by the nobody user. This is because Apache changes the effective UID to that user for the running Apache Server.
5.
Set the value of the ACTIVEGRID_SERVER_HOME environment variable to the NEW_INSTANCE_ROOT/local directory.
export ACTIVEGRID_SERVER_HOME=NEW_INSTANCE_ROOT/local
You can then start and stop the server using:
./activegridctl start
and
./activegridctl stop
6.
If you do not want to set reset the ACTIVEGRID_SERVER_HOME environment variable, you can instead explicitly pass in a reference to the httpd.conf and mysql.conf files from the instance to start and stop the server:
./activegridctl start -f INSTANCE_ROOT/conf/httpd.conf -m NEW_INSTANCE_ROOT/conf/mysql.conf
./activegridctl stop -f INSTANCE_ROOT/conf/httpd.conf -m NEW_INSTANCE_ROOT/conf/mysql.conf
If you do not explicitly pass these references, the server uses the configuration files in INSTALL_DIR/local/conf.
 

ActiveGrid
Installation and Deployment Guide
Version 2.0