【Vertica系列】一、安装&建库

1 注意事项

1.1 操作系统

对于 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

1.2 版本下载

https://my.vertica.com/download-community-edition/

2 安装数据库

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

2.1 本机模式

# 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

2.2 集群模式

# 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

3 数据库实例

3.1 创建数据库实例

# 切换到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 常用命令

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,增加下列命令(同启动数据库实例命令)
su -l "dbadmin" -c "/opt/vertica/bin/admintools -t start_db -d db_name -p password"

本文来自AlcorZheng个人博客

转载于:https://my.oschina.net/zhx56/blog/1791808

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值