对于 Vertica 7.X 版本,其操作详细要求如下:
1.Red Hat Enterprise Linux 5 and 6
2.SUSE Linux Enterprise Server 11
3.Oracle Enterprise Linux 6 - Red Hat Compatible Kernel only - HP Vertica does not support the unbreakable kernel (kernels with a uel suffix)
4.Debian Linux 6
5.Cent OS 5 and 6
6.Ubuntu 12.04LTS
下面以Redhat6.4系统为例,分别讲解如何以本机或者集群的模式安装数据库。
# root用户:安装Vertica的rpm包
rpm -ivh vertica-7.1.1-0.x86_64.RHEL5.rpm
# root用户:创建管理员组
groupadd verticadba
# root用户:创建管理员
useradd dbadmin -g verticadba
# root用户:设置管理员密码
passwd dbadmin
# root用户:安装Vertica,并制定管理员用户(按照错误提示后的URL修改系统参数;failure-threshold级别:HINT<WARN<FAIL<HALT<NONE)
# 执行成功后,Vertica安装完毕
/opt/vertica/sbin/install_vertica --hosts localhost --failure-threshold FAIL -u dbadmin -l /home/dbadmin -d /home/dbadmin
# root用户:安装Vertica的rpm包
rpm -ivh vertica-7.1.1-0.x86_64.RHEL5.rpm
# root用户:创建管理员组(每个节点创建)
groupadd verticadba
# root用户:创建管理员(每个节点创建)
useradd dbadmin -g verticadba
# root用户:设置管理员密码(每个节点创建,密码相同)
passwd dbadmin
# root用户:安装Vertica,并制定管理员用户(按照每个节点错误提示后的URL修改系统参数;failure-threshold级别:HINT<WARN<FAIL<HALT<NONE)
# 执行成功后,Vertica安装完毕
/opt/vertica/sbin/install_vertica --hosts host1,host2,host3 --failure-threshold FAIL -u dbadmin -l /home/dbadmin -d /home/dbadmin
# 切换到dbadmin用户(集群模式时,在任意一个节点操作即可)
su - dbadmin
# 打开控制台,管理数据库
/opt/vertica/bin/admintools
# 1.On the Main Menu, click Configuration Menu, and click OK.
# 2.On the Configuration Menu, click Create Database, and click OK.
# 3.Enter the name of the database and an optional comment, and click OK.
# 4.Establish the superuser password for your database.
# 5.Select the hosts to include in the database from the list of hosts specified when HP Vertica was installed (install_vertica -s), and click OK.
# 6.Specify the directories in which to store the data and catalog files, and click OK.
# 7.Catalog and data path names must contain only alphanumeric characters and cannot have leading spaces. Failure to comply with these restrictions results in database creation failure.
# 8.Review the Current Database Definition screen to verify that it represents the database you want to create, and then click Yes to proceed or No to modify the database definition.
# 9.If you click Yes, HP Vertica creates the database you defined and then displays a message to indicate that the database was successfully created.
# 10.Click OK to acknowledge the message.
3.2.1 启动数据库
# dbadmin:vertica管理员用户
# db_name:待启动数据库名称
# password:数据库管理员密码
su -l "dbadmin" -c "/opt/vertica/bin/admintools -t start_db -d db_name -p password"
3.2.2 关闭数据库
# dbadmin:vertica管理员用户
# db_name:待关闭数据库名称
# password:数据库管理员密码
# -F:强制关闭
su -l "dbadmin" -c "/opt/vertica/bin/admintools -t stop_db -d db_name -p password -F"
3.2.3 开机自动启动
# 编辑/etc/rc.local,增加下列命令(同启动数据库实例命令)