安装或设置

操作系统设置 (Linux-CentOS x64 或 RedHat x64)

1 - 将交换空间增加到最小 2 Gb

2 空间和 CPU 要求:

-Vertica 每个 CPU 至少需要 1 GB。

每个节点的磁盘利用率不应超过百分之六十(60%)。某些查询执行操作符(例如散列连接和排序)临时需要磁盘空间,以防它们必须溢出到磁盘。

-configure TEMP SPACE 与数据磁盘空间分开。

3 - 安装 Vertica Cluster 的先决条件

yum install  rsync  python*  telnet ruby*  java* sudo  openssh-server openssh-clients
chkconfig sshd on
service sshd start

4 - 编辑/etc/pam.d/su 文件

vi  /etc/pam.d/su
#add the line
session required pam_limits.so

5 - 验证 NTP 守护程序是否正在运行

chkconfig --list ntpd
#if is not on use the commands
chkconfig ntpd on
#start ntp service
/etc/init.d/ntpd start

6 - 删除不重要的应用程序

For optimal performance, Vertica is designed to use all available resources on each host machine. Vertica recommends that you remove or disable all non-essential applications from cluster hosts.

7 - 配置网络

更改 / etc / hosts 文件。确保文件存在且包含环回地址 127.0.0.1

7.1-设置群集主机

确保/ etc / hosts 文件包含成为群集一部分的所有主机。例如,如果主机名为 host01,host02,host03 和 host04,则每个主机上的 / etc / hosts 文件如下所示:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
192.xxx.13.128          host01
192.xxx.13.129          host02
192.xxx.13.130          host03
192.xxx.13.131          host04

这应该在所有主机(节点)中完成

7.2-编辑/ etc / sysconfig / network 文件:

vim /etc/ sysconfig/network
Alter the hostname and set it to the desired name :
HOSTNAME=host01

7.3 设置 HOSTNAME 环境变量

vim /etc/profile or /etc/bashrc
Add the line
export HOSTNAME=hostname

7.4-验证主机名解析是否正常使用该命令验证

/bin/hostname
Hostname

重新启动主机(节点)确保以 root 用户身份在所有主机(节点)中执行所有这些步骤。

7.5 禁用防火墙

不推荐用于数据库主机的防火墙 SELinux(安全增强型 Linux)Iptables

7.6 为 root 和 dbadmin 用户提供 SSH 访问群集

为 root 或 dbadmin 用户执行此操作的步骤:

[root@Vertica_Master1 ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa already exists.
Overwrite (y/n) y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
7c:b5:11:48:d3:c1:e6:f5:80:b3:4a:4a:93:ed:16:99
 root@Vertica_Master1
The key's randomart image is:
+--[ RSA 2048]----+
|         .o+oo   |
|          ..*.o  |
|         o =o+ o |
|       .+ E.oo  .|
|       .S=.o.    |
|        ..+      |
|         .       |
|                 |
|                 |
+-----------------+
[root@Vertica_Master1 ~]# cd ~
[root@Vertica_Master1 ~]# chmod 700 .ssh
[root@Vertica_Master1 ~]# cd .ssh/
[root@Vertica_Master1 .ssh]# cp id_rsa.pub authorized_keys

在所有主机上执行上面的步骤,然后按照后续步骤操作

[root@Vertica_Master1 .ssh]# cat id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEArX26Pgsyvkw+o0Vimm26FSOAtTh9C9
mZ+tS7LfO92y7RDKsSm38tSQO/p1f2NWP6UzAam8dG77Zo8W+wjwF6bEJbFU9Gq+S/j
hETD8bMTKh6odZNhXmZanddvH4qnA0eKngAPe9Y93udA6kEYGpA0sCWMFcbrtvwraz7@Vertica_Master1
[root@Vertica_Master1 .ssh]# ssh root@Vertica_Master2
The authenticity of host 'vertica_master2 (10.xxx.1.224)' can't be established.
RSA key fingerprint is ff:9c:48:27:7d:6b:a1:39:5a:17:d0:a3:a3:9d:f0:48.
Are you sure you want to continue connecting (yes/no) yes
Warning: Permanently added 'vertica_master2,10.xxx.1.224' (RSA) to the list of known hosts.
root@vertica_master2's password:xxxxxx- this is the password for the root user
Last login: Tue Sep  4 15:11:35 2012 from e05347
-bash: Vertica_Master2: command not found
[root@Vertica_Master2 ~]# hostname-check to see that you are on the Vertica_Master2
Vertica_Master2
 
[root@Vertica_Master1 .ssh]# vim authorized_keys

并将 id_rsa.pub 的内容复制到 authorized_keys 并保存。

对所有主机执行此操作,以便它们都在其 authorized_keys 文件中的所有主机上都有密钥。

  • Host1 将在其中保存 host1,host2,host3 公钥
  • Host2 将在其中保存 host1,host2,host3 公钥
  • Host3 将把 host1,host2,host3 公钥保存在里面

- 如果群集中有更多主机,则依此类推。

8 - 在主节点上下载并安装 Vertica 软件(你将在其中运行群集的管理作业)

作为根:

#rpm -ihv  vertica-<version>.x86_64.RHEL5.rpm
After entering the command, a progress indicator appears:
Preparing...   ##################################### [100%]
1:vertica      ##################################### [100%]
Vertica 6.0.xx successfully installed on host hostname.

通常默认情况下,vertica 将安装到 / opt / vertica 目录中。

8.1-运行安装脚本

在主节点上运行以下命令(主节点将是你最常访问管理工作的节点)

/opt/vertica/sbin/install_vertica -s host_list -r rpm_package -u dba_username

选项包括: -s host_list 以逗号分隔的主机名列表或要包含在集群中的 IP 地址; 不要在列表中包含空格字符。示例:

-s host01,host02,host03

要么

-s 192.xxx.233.101,192.xxx.233.102,192.xxx.233.103

-r rpm_package Vertica RPM 软件包的路径名。

例:

-r “vertica_6.0.x.x86_64.RHEL5.rpm” -u dba_username -this 将是用户的名称将如何运行 admintools(仅限)

  • 如果省略该参数,则默认数据库管理员帐户名为 dbadmin。

3 节点集群的完整命令示例:

# /opt/vertica/sbin/install_vertica -s 10.xxx.1.216,10.xxx.1.224,10.xxx.1.225 -r
 /home/user/Downloads/vertica-6.0.0-3.x86_64.RHEL5.rpm -u dbadmin

9 - 在每个节点上创建 Vertica 数据和目录目录:

Directory names are totally up to you. Remember that database user must have owner rights over them.

注意:这是指安装后添加的额外目录

mkdir /vertica_db/data
mkdir /vertica_db/data
chown  dbadmin:dbadmin  vertica_db/

10-将/ opt / vertica / bin 添加到 dbadmin 用户路径,以便可以在没有完整路径的情况下访问 vertica 工具

11-访问 adminTool,系统将要求你介绍 Vertica 提供的 licence.dat 文件(仅适用于 Enterprise Edition)

12-创建数据库并选择它将驻留在哪个节点上! 按照以下步骤操作,了解如何创建驻留在 Vertica 群集上的数据库