Installing Vector for Linux
Vector for Linux is distributed in RPM, DEB, and non-package manager (ingbuild) format.
Install libaio
The Linux Asynchronous I/O library, libaio, must be installed before installing Vector.
Libaio has a huge performance benefit over the standard POSIX asynchronous I/O facility because the operations are performed in the Linux kernel instead of as a separate user process.
Note: The Vector installer may install libaio automatically or flag it as missing, depending on the Vector distribution you downloaded.
To install libaio
Using RPM:
rpm ‑ivh libaio*.rpm
Using the yum system update tool:
yum install libaio
Using Ubuntu:
apt-get update
apt-get install libaio1
Import GPG Public Key (RPM and DEB Only)
The RPM and DEB packages are signed with a GPG key pair to ensure their authenticity. To enable the installation process to verify the packages, the public key must be downloaded and imported into the package management system.
The GPG public key file can be downloaded from the same location as the distribution:
http://esd.actian.com/.
To import the key
Specify the key file name on the appropriate command. For example:
Using RPM:
rpm --import actian-vector-6.2.0-100-com-linux-rpm-x86_64-key.asc
Using Ubuntu:
apt-key add actian-vector-6.2.0-100-com-linux-deb-amd64-key.asc
install.sh Command--Install Vector
The install.sh command can be used for both interactive and unattended installs.
Note: Not all command flags are valid for all distribution formats.
Debian/Ubuntu: The DEB distribution installs Vector under /opt/Actian/VectorVW; this location cannot be changed. Only one DEB instance per machine is allowed. If you want to install Vector in a different directory or install more than one instance on a machine, download the ingbuild distribution.
This command has the following format:
install.sh [-express|-interactive] [‑acceptlicense]
[-uid uid] [-user username] [-noroot] [-usesudo]
[-withad|-noad] [-respfile filename] [instance_ID] [install_dir]
[-sparkdownload] [-?|‑help]
-express
(Default) Does not prompt for configuration options. Installs Actian X with the default configuration. (Implies -acceptlicense; conflicts with ‑interactive.)
-interactive
Installs interactively, prompting for all configuration options. (For advanced users only.)
Note: For RPM and DEB installs, prompting is limited. For full control, use a response file.
-acceptlicense
Accepts all license prompts.
-uid uid
Specifies the user ID (UID) to be used when creating user. The username must exist. (Disallowed with -noroot.) (Not valid for RPM and DEB.)
-user username
Installs as username instead of actian. The username must exist. (Disallowed with -noroot.) (Not valid for RPM and DEB.)
-noroot
Installs Vector as the current user. All installation locations must exist and be writable as current user for the installation to succeed. Instance will be owned by current user. (Not valid for RPM and DEB.)
-usesudo
Installs Vector using the current user and invokes sudo for root access, locally and remotely. The instance is owned as “actian” by default. If required, the current user is used for remote connections and sudo is invoked for root access. (Not valid for RPM and DEB.)
-withad | ‑noad
Installs or excludes Actian Director.
-respfile filename
Uses filename as the response file when running setup. The absolute path to the filename must be specified. A response file lets you customize the installation. (Requires -express or ‑acceptlicense; not valid with ‑interactive.)
instance_ID
Defines a two-character string where the first character must be an uppercase letter and the second character must be an uppercase letter or a number from 0 to 9.
install_dir
Specifies the full path to the location where Vector is to be installed (II_SYSTEM).
Note: Not valid for DEBs, in which case II_SYSTEM is hard coded to: /opt/Actian/VectorVW.
-sparkdownload
Downloads and configures Apache Spark. Not valid with -interactive.
-? | ‑help
Displays usage information.
Notes:
• install.sh will fail if another instance of Vector exists with the same instance ID as the one being installed.
• If logged in as a user other than "actian", after install.sh completes, do the following:
1. Log off from the current user.
2. Log on as the "actian" system user and source .ingXXsh (where XX is the instance ID), which is found in the home directory ($HOME) of the "actian" system user.
Install Vector at the Command Line
You can install Vector using the installation shell script install.sh for package manager or non-package manager (ingbuild) distributions.
To install Vector at the command line
1. Copy the distribution TGZ file to a location where other users and not just root can read it, for example, /tmp.
Running the installer from a location such as /root will not work because other users do not have read access to this directory.
2. Unpack the distribution TGZ file. For example:
tar xf actian-vector-6.2.0-100-com-linux-ingbuild-x86_64.tgz
Note: You may need to use the z option, depending on the version of tar.
actian-vector-6.2.0-100-com-linux-ingbuild-x86_64
3. Change to the directory created in the previous step. For example:
cd ./actian-vector-6.2.0-100-com-linux-ingbuild-x86_64
4. Enter the following command as the root user to run the installation utility:
./install.sh
If you are logged in as a user other than root, use sudo to run the utility:
sudo ./install.sh
The installation utility starts.
5. Respond to the installation prompts.
All components are installed as user "actian" in the location: /opt/Actian/VectorVW/.
When the installation is complete, the instance is running.
Examples of install.sh Command
The .install.sh command will install package manager or non-package manager (ingbuild) distributions.
Examples for package manager distributions:
1. Install all packages with the default configuration into the default location "/opt/Actian/VectorVW":
install.sh
2. Install all packages with an instance ID of V1, prompting for other configuration options:
./install.sh ‑interactive V1
3. Install all packages with the default configuration into "/opt/VectorV2", with an instance ID of V2, without further prompting:
install.sh ‑express /opt/VectorV2 V2
Note: Not valid for DEBs, whose II_SYSTEM cannot be changed.
4. Install all packages in interactive mode (prompting for manual configuration):
install.sh -interactive
5. Install all packages with the configuration defined in a response file, resp.txt:
install.sh -respfile /path/to/resp.txt
Note: If you set II_RESPONSE_FILE to point to a valid response file, then you can install Vector with the configuration defined in that response file.
Examples for Ingbuild distribution:
1. Install Vector with default configuration, prompting for basic configuration options:
./install.sh
2. Install Vector under /opt/VectorV2, with an instance ID of V2 with a default configuration without further prompting:
install.sh -express /opt/VectorV2 V2
3. Install Vector, prompting for all configuration options:
./install.sh -interactive
Install Vector as a User Other than root
Vector can be installed without requiring full root access by using one of the following flags on the install.sh command.
Note: These flags are supported with the ingbuild distribution only.
-noroot
Installs Vector as the current user and does not require root access. All installation locations must exist and be writable as current user.
For example:
./install.sh -noroot
-usesudo
Installs Vector using the current user and invokes sudo for root access.
For example:
./install.sh -usesudo
Install Vector Using RPM Commands
You can install Vector by invoking RPM directly.
Vector packages that can be installed include the following:
• Core--Prerequisite of all other packages
• DBMS--DBMS Server
• Net--Communications servers
• Director--Actian Director
To install a single package
Invoke RPM with the appropriate installation flags, including the path of the package you want to install, as follows:
cd rpm folder/*.rpm
rpm ‑Uvh rpm_package_folder/Vector_package.rpm
To install more than one package at a time
Pass multiple file names, specifying the path to each package, as follows:
rpm ‑Uvh rpm_package_folder/Vector_package.rpm path_to_directory/Vector_package2.rpm path_to_directory/Vector_package3.rpm
To install all packages in the same directory
Specify the following:
rpm ‑Uvh rpm_package_folder/*.rpm
To install a package into a non-default location (that is, with an II_SYSTEM value other than the default)
Use the -‑prefix flag when invoking RPM. The following command installs the specified package with II_SYSTEM=/home/actian/VectorVZ:
rpm ‑Uvh ‑‑prefix=/home/actian/VectorVZ path_to_directory/Vector_package.rpm
Notes:
• The default instance ID is VW regardless of the installation directory. To change the instance ID, you must rebuild the RPM packages with a unique name, as described in
Installing Multiple RPM Package Instances.
• All packages installed in a single instance must have the same value of II_SYSTEM. So if you use the -‑prefix flag to install the base package, you must install all subsequent packages with the same --prefix value.
• After you have installed Vector using the RPM command, you must run the service script to configure the instance.
Installing Multiple RPM Package Instances
To install multiple Vector instances on one machine using RPM, you need a unique set of package names for each instance. You must rebuild each RPM packages to include an instance ID that is unique to the machine. You can then install this package using the instructions described in
Install Vector Using RPM Commands.
To rebuild the package, use the iirpmrename command. Multiple RPMs can be specified for renaming.
For example, to rebuild the base package named actian-vector-6.2.0-000.rpm to use an II_INSTALLATION of XX, issue the following command:
iirpmrename [path_to_directory]/actian-vector-6.2.0-000.rpm XX
A new RPM package is created in the current working directory called actian-vector-XX-6.2.0-000.rpm. The package will install with II_SYSTEM=/opt/Actian/VectorXX and II_INSTALLATION=XX.
Notes:
• While you can still override the value for II_INSTALLATION using the response file or other methods mentioned above, we do not recommend it.
• The rpm-build package must be installed for iirpmrename to work.
Configure the Instance
When installing Vector using the RPM command, the setup portion of the installation process must be completed by running the iisystemd script, which is under $II_SYSTEM/ingres/utility. This script configures and starts the instance for the systemd service.
You must run this script specifying a response file that contains II_LICENSE_DIR=/path_to_license_directory; otherwise, you will not be able to configure and start the installation.
To configure the instance
After the installation has completed, run the iisystemd script as follows:
$II_SYSTEM/ingres/utility/iisystemd -a configure
To run iisystemd to configure the instance according to settings in a response file
$II_SYSTEM/ingres/utility/iisystemd -a start -d $II_SYSTEM -r $II_RESPONSE_FILE -s rdbms
The instance is configured and started.
or
$II_SYSTEM/ingres/utility/iisystemd -a start -d $II_SYSTEM -r $II_RESPONSE_FILE -s rdbms
The instance is configured but not started.
How to Access the Instance on Linux
To access your instance, you must source the environment file that was written to the home directory ($HOME) of the operating system user ID defined during installation (the default is "actian").
The name of the environment file depends on the value of II_INSTALLATION:
.ingXXsh or .ingXXcsh
where XX is the instance ID.
To source the environment file created during installation
Issue the following command. (The following example assumes an operating system user ID of actian.)
source ~actian/.ingXXsh
For other users to access the instance and the Vector tools, they must have access to the .ingXXsh and .ingXXcsh scripts. The scripts can be copied to the home directory of any user.
Once Vector is started (as described in
Accessing Vector on page 29), you can then create a database, as described in
Creating a Database and Loading Data on page 37.
Virtual Address Space Allocation (Linux)
For optimal performance, Vector by default allocates a large amount of virtual address space to be able to use it most efficiently when needed. In some circumstances, this amount can be larger than the amount of physical memory.
Some Linux distributions by default disallow reserving unlimited virtual address space. We recommend that you configure your system to allow unlimited allocation of virtual address space unless there are compelling reasons (unrelated to Vector) not to.
To check if your system allows unlimited allocation of virtual address space:
# cat /proc/sys/vm/overcommit_memory
should return 1.
# ulimit –v
should return unlimited.
To ensure the system does not limit allocation of virtual address space
Issue these commands after every system restart:
# echo 1 > /proc/sys/vm/overcommit_memory
# ulimit –v unlimited
To learn how to make this setting persistent, refer to your Linux documentation.
Alternatively, Vector can be configured to not reserve virtual address space by setting the [memory] max_overalloc configuration parameter to 0. This may limit the maximum performance your system can deliver.
Note: If your system limits allocation of virtual address space by default, such allocation is automatically turned off in Vector during installation. If you reconfigure your system after Vector is installed to allow unlimited allocation of virtual address space, then you must also set the max_overalloc parameter correctly (to 2G by default).
Configuring Actian X High Availability for Linux
To provide high availability in a Linux Cluster environment, Vector provides an Open Cluster Framework (OCF) resource agent script template that treats an Vector instance, together with the Management Server, as a resource.
You can run a script to make an instance-specific version based on the provided template, and then install it.
To configure the OCF Resource Agent with Pacemaker
1. Locate the template named template.ocf in $II_SYSTEM/ingres/files/ocf.
2. Source the environment file $II_SYSTEM/ingres/.ingVWsh. (The following example assumes an operating system user ID of actian and an instance ID of VW.)
source ~actian/ .ingVWsh
3. Run mkocf as root. This creates a version for the specific Vector instance in the ocf directory. For example, if the instance ID is VW, the script would be named ingresVW.
mkocf
4. Use mkocf to install the script:
mkocf -i
The script is copied to the /usr/lib/ocf/resource.d/heartbeat directory and is made executable.
5. To install the script on the other nodes in the cluster, issue:
# mkocf -i -n node2
Note: Steps 3 and 4 can also be done manually.
The script is recognized as a possible resource under Pacemaker:
# pcs resource list | grep ingres
ocf:heartbeat:ingresVW - Manages Vector DBMS instance VW
6. Register the script as a managed resource:
# pcs resource create VectorVW ocf:heartbeat:ingresVW
# pcs enable VectorVW
The script implements the mandatory actions of start, stop, meta-data, validate-all, and monitor. It also returns an appropriate code for known unimplemented actions such as migrate-to and migrate-from.
Activity is logged to $II_SYSTEM/ingres/files/ocf_ra.log. This log “rotates” to a timestamped version, which can be removed, archived, or compressed when the log reaches a maximum number of lines. The maximum number of lines is configured by the ocf_ra_max_log_size configuration parameter, which defaults to 100,000 lines.