当前位置: 首页 > 工具软件 > Vertica > 使用案例 >

Vertica安装建库

温星华
2023-12-01

1 注意事项

1.1 操作系统

 
  1. 对于 Vertica 7.X 版本,其操作详细要求如下:

  2. 1.Red Hat Enterprise Linux 5 and 6

  3. 2.SUSE Linux Enterprise Server 11

  4. 3.Oracle Enterprise Linux 6 - Red Hat Compatible Kernel only - HP Vertica does not support the unbreakable kernel (kernels with a uel suffix)

  5. 4.Debian Linux 6

  6. 5.Cent OS 5 and 6

  7. 6.Ubuntu 12.04LTS

1.2 版本下载

You are being redirected...

2 安装数据库

下面以Redhat6.4系统为例,分别讲解如何以本机或者集群的模式安装数据库。

2.1 本机模式

 
  1. # root用户:安装Vertica的rpm包

  2. rpm -ivh vertica-7.1.1-0.x86_64.RHEL5.rpm

  3. # root用户:创建管理员组

  4. groupadd verticadba

  5. # root用户:创建管理员

  6. useradd dbadmin -g verticadba

  7. # root用户:设置管理员密码

  8. passwd dbadmin

  9. # root用户:安装Vertica,并制定管理员用户(按照错误提示后的URL修改系统参数;failure-threshold级别:HINT<WARN<FAIL<HALT<NONE)

  10. # 执行成功后,Vertica安装完毕

  11. /opt/vertica/sbin/install_vertica --hosts localhost --failure-threshold FAIL -u dbadmin -l /home/dbadmin -d /home/dbadmin

2.2 集群模式

 
  1. # root用户:安装Vertica的rpm包

  2. rpm -ivh vertica-7.1.1-0.x86_64.RHEL5.rpm

  3. # root用户:创建管理员组(每个节点创建)

  4. groupadd verticadba

  5. # root用户:创建管理员(每个节点创建)

  6. useradd dbadmin -g verticadba

  7. # root用户:设置管理员密码(每个节点创建,密码相同)

  8. passwd dbadmin

  9. # root用户:安装Vertica,并制定管理员用户(按照每个节点错误提示后的URL修改系统参数;failure-threshold级别:HINT<WARN<FAIL<HALT<NONE)

  10. # 执行成功后,Vertica安装完毕

  11. /opt/vertica/sbin/install_vertica --hosts host1,host2,host3 --failure-threshold FAIL -u dbadmin -l /home/dbadmin -d /home/dbadmin

3 数据库实例

3.1 创建数据库实例

 
  1. # 切换到dbadmin用户(集群模式时,在任意一个节点操作即可)

  2. su - dbadmin

  3. # 打开控制台,管理数据库

  4. /opt/vertica/bin/admintools

  5. # 1.On the Main Menu, click Configuration Menu, and click OK.

  6. # 2.On the Configuration Menu, click Create Database, and click OK.

  7. # 3.Enter the name of the database and an optional comment, and click OK.

  8. # 4.Establish the superuser password for your database.

  9. # 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.

  10. # 6.Specify the directories in which to store the data and catalog files, and click OK.

  11. # 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.

  12. # 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.

  13. # 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.

  14. # 10.Click OK to acknowledge the message.

3.2 常用命令

3.2.1 启动数据库

 
  1. # dbadmin:vertica管理员用户

  2. # db_name:待启动数据库名称

  3. # password:数据库管理员密码

  4. su -l "dbadmin" -c "/opt/vertica/bin/admintools -t start_db -d db_name -p password"

3.2.2 关闭数据库

 
  1. # dbadmin:vertica管理员用户

  2. # db_name:待关闭数据库名称

  3. # password:数据库管理员密码

  4. # -F:强制关闭

  5. su -l "dbadmin" -c "/opt/vertica/bin/admintools -t stop_db -d db_name -p password -F"

3.2.3 开机自动启动

 
  1. # 编辑/etc/rc.local,增加下列命令(同启动数据库实例命令)

 类似资料: