Pythian Blog: Technical Track

How to install Vertica for test purposes

The column-oriented Vertica Analytics Database Platform was designed to manage large, fast-growing volumes of data and provide very fast query performance when used for data warehouses and other query-intensive applications. The following instructions show how to create a Vertica database version 9.1.1-0 in Oracle Linux Server 7.6, just for test purposes. This will be handy if we perform tests before implementing a change in the production system. But if you need to install Vertica in a real scenario, please follow all the requirements on Vertica Installation Guide

Installing Vertica database software in a single node for test purposes

1. As root user, install dialog package with "yum install dialog".
[root@host1 ~]# yum install dialog
 ...
 Complete!
 [root@host1 ~]#
 
2. Download the Vertica (Community Edition) RPM from https://vertica.com/download/vertica/community-edition/
The Vertica Community Edition is free allowing the setup of up to 3 nodes and 1 Terabyte of data
 Create an user login to connect on "Vertica Community Edition (CE)"
 Choose the correct OS under "Local Server (Linux OS)"
 
3. As root user, install Vertica RPM file.
[root@host1 Download]# rpm -Uvh vertica-9.1.1-0.x86_64.RHEL6.rpm
 ...
 1:vertica-9.1.1-0 ################################# [100%]
 View the latest Vertica documentation at https://my.vertica.com/docs/
 [root@host1 Download]#
 
4. As root, install Vertica software and try to fix the warnings, hints and errors (as much as possible).
[root@host1 Download]# /opt/vertica/sbin/install_vertica --hosts host1 
 ...
>> Validating node and cluster prerequisites... Prerequisites not fully met during local (OS) configuration for verify-192.168.25.16.xml: HINT (S0305): https://my.vertica.com/docs/9.1.x/HTML/index.htm#cshid=S0305 TZ is unset for dbadmin. Consider updating .profile or .bashrc HINT (S0041): https://my.vertica.com/docs/9.1.x/HTML/index.htm#cshid=S0041 Could not find the following tools normally provided by the mcelog package: mcelog WARN (S0160): https://my.vertica.com/docs/9.1.x/HTML/index.htm#cshid=S0160 These disks do not have 'ext3' or 'ext4' filesystems: '/dev/mapper/ol- root' = 'xfs' WARN (N0010): https://my.vertica.com/docs/9.1.x/HTML/index.htm#cshid=N0010 Linux iptables (firewall) has some non-trivial rules in tables: mangle, filter WARN (S0112): https://my.vertica.com/docs/9.1.x/HTML/index.htm#cshid=S0112 vm.swappiness is higher than recommended: your 30 > 1 System prerequisites failed. Threshold = WARN Hint: Fix above failures or use --failure-threshold Installation FAILED with errors. 5. During the installation, the hints and warnings below were fixed following the URL instructions provided by Vertica.
HINT (S0305): https://my.vertica.com/docs/9.1.x/HTML/index.htm#cshid=S0305
 TZ is unset for dbadmin. Consider updating .profile or .bashrc
 HINT (S0041): https://my.vertica.com/docs/9.1.x/HTML/index.htm#cshid=S0041
 Could not find the following tools normally provided by the mcelog
 package: mcelog
 WARN (S0112): https://my.vertica.com/docs/9.1.x/HTML/index.htm#cshid=S0112
 vm.swappiness is higher than recommended: your 30 > 1
 
6. In order to bypass the remaining issues like filesystem format and Linux iptables (firewall), the following syntax was used "--failure-threshold HALT".
[root@host1 Download]# /opt/vertica/sbin/install_vertica --hosts host1 -r vertica-9.1.1-0.x86_64.RHEL6.rpm -u dbadmin -g verticadba -d /home/dbadmin --failure-threshold HALT
 ...
Prerequisites not fully met during local (OS) configuration for verify-192.168.25.16.xml: WARN (S0160): https://my.vertica.com/docs/9.1.x/HTML/index.htm#cshid=S0160 These disks do not have 'ext3' or 'ext4' filesystems: '/dev/mapper/ol- root' = 'xfs' WARN (N0010): https://my.vertica.com/docs/9.1.x/HTML/index.htm#cshid=N0010 Linux iptables (firewall) has some non-trivial rules in tables: mangle, filter System prerequisites passed. Threshold = HALT
...
 >> Completing installation...
 
 
7. During the Vertica software installation, the user dbadmin was created. 7.1 Login as dbadmin. 7.2 Create the Vertica database with admintools command line, using --skip-fs-checks to skip file system check. [dbadmin@host1 database]$ admintools -t create_db -c /home/dbadmin/database/ -D /home/dbadmin/database/ -s host1 -d vdb --skip-fs-checks
  • Parameters used on above syntax -t | --tool -c CATALOG, the catalog is a set of files that contains information (metadata) about the objects in a database, such as the nodes, tables, constraints -D DATA, --data_path=DATA -s NODES, --hosts=NODES -d DB, --database=Database Name --skip-fs-checks Skip file system checks while creating a database (not recommended).
Enter ACCEPT to accept license terms & conditions, or REJECT to not accept the license and quit: ACCEPT ... Database vdb created successfully. [dbadmin@host1 database]$ 8. As a dbadmin user, connect to the new database using vsql and check its status.
[dbadmin@host1 database]$ vsql -U dbadmin
 Welcome to vsql, the Vertica Analytic Database interactive terminal.
 
 Type: \h or \? for help with vsql commands
 \g or terminate with semicolon to execute query
 \q to quit
 
 dbadmin=> SELECT node_name, node_state FROM nodes ORDER BY 1;
  node_name | node_state
 ----------------+------------
  v_vdb_node0001 | UP
dbadmin=> SELECT dbadmin-> node_name , dbadmin-> user_name , dbadmin-> client_os dbadmin-> FROM dbadmin-> v_monitor.sessions; node_name | user_name | client_os ----------------+-----------+-------------------------------------------- v_vdb_node0001 | dbadmin | Linux 4.1.12-124.21.1.el7uek.x86_64 x86_64 (1 row) dbadmin=> dbadmin=> select GET_COMPLIANCE_STATUS(); GET_COMPLIANCE_STATUS --------------------------------------------------------------------------------- Raw Data Size: 0.00TB +/- 0.00TB License Size : 1.00TB Utilization : 0% Audit Time : 2019-10-24 14:43:15.030145-04 Node count : 1 License Node limit : 3 Compliance Status : The database is in compliance with respect to raw data size. No expiration date for a Perpetual license dbadmin=> 9. The database has been created for tests. Use the admintools interface to do different tasks related to database administration, such as stopping/starting the database. $ /opt/vertica/bin/adminTools Vertica_AdminTools 10. VMart Example Database Vertica ships with a sample multi-schema database called the VMart Example Database, which represents a database that might be used by a large supermarket (VMart) to access information about its products, customers, employees, and online and physical stores. Using this example, you can create, run, optimize, and test a multi-schema database for learning purposes. Further information in VMart Example Database 11. Other posts related Vertica: https://blog.pythian.com/d-vertica/ https://blog.pythian.com/log-buffer-62-a-carnival-of-the-vanities-for-dbas/  

No Comments Yet

Let us know what you think

Subscribe by email