新网创想网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

在linux6上如何安装vertica列式数据库

这篇文章主要介绍在linux6上如何安装vertica列式数据库,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

成都创新互联长期为上千客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为内丘企业提供专业的网站制作、成都网站制作,内丘网站改版等技术服务。拥有10余年丰富建站经验和众多成功案例,为您定制开发。

数据库用户和权限

  • dbadmin—Administrative     user

  • verticadba—Group     for DBA users

集群节点之间的dbadmin用户要配置互信。

集群节点之间用户名和密码要相同。

Dbadmin用户的shell环境设置为/bin/bash,因为vertica所有的shell脚本要在bash shell环境下执行。

提供读写执行权限对下面的目录:

/opt/vertica/*

/home/dbadmin

安装前准备

存储路径

指定存储catalog files的目录和data files的目录。Catalog和data files存放路径应该分开,不应存放在一起。Catalog的存放目录要在集群内所有节点保持一致。而且节点之间注意不要用共享目录存放这两类文件。

Disk Space Requirements for Vertica

网络配置

单节点和集群的网络配置都是一样的,只有一种情况是例外的。如果安装时使用了localhost和回环地址(127.0.0.1),那么只能是单节点使用。后续无法添加节点变成集群。

必须能够使用ssh协议登录。

端口畅通性

Port

Protocol

Service

Notes

7

TCP

Management Console

Required by Management Console to discover Vertica  nodes.

22

TCP

sshd

Required by Administration Tools and the Management Console Cluster Installation wizard.

5433

TCP

Vertica

Vertica client (vsql, ODBC, JDBC, etc) port.

5434

TCP

Vertica

Intra- and inter-cluster communication. Vertica opens the Vertica client  port +1 (5434 by default) for intra-cluster communication, such as during a  plan. If the port +1 from the default client port is not available, then  Vertica opens a random port for intra-cluster communication.

5433

UDP

Vertica

Vertica spread monitoring.

5444

TCP

Vertica
Management Console

MC-to-node and node-to-node (agent) communications port. See Changing MC or Agent Ports.

5450

TCP

Vertica
Management Console

Port used to connect to MC from a web browser and allows communication  from nodes to the MC application/web server. See Connecting to Management Console.

4803

TCP

Spread

Client connections.

4803

UDP

Spread

Daemon to Daemon connections.

4804

UDP

Spread

Daemon to Daemon connections.

6543

UDP

Spread

Monitor to Daemon connection.

防火墙设置

Rhel6/centos6

# service iptables save
# service iptables stop
# chkconfig iptables off
# service ip6tables save
# service ip6tables stop
# chkconfig ip6tables off

General Operating System Configuration - Automatically Configured by the Installer

General Operating System Configuration - Manual Configuration

System User Configuration

Rpm包安装

openssh—Required for Administration Tools connectivity between nodes.
which—Required for Vertica operating system integration and for validating installations.
dialog—Required for interactivity with Administration Tools.
# yum install openssh
# yum install which
# yum install dialog

TZ变量设置

如果没有设置TZ变量,安装会报错S0305.

自动修改的操作系统参数

These general Operating System settings are automatically made by the installer if they do not meet Vertica requirements. You can prevent the installer from automatically making these configuration changes by using the--no-system-configurationparameter for theinstall_verticascript.

下面这些参数如果不满足vertica需求,那么会在安装的时候自动修改。如果不想被自动修改的话,可以用--no-system-configuration参数跳过。

sysctl

Nice Limits Configuration

min_free_kbytes Setting

User Max Open Files Limit

System Max Open Files Limit

Pam Limits

pid_max Setting

User Address Space Limits

User File Size Limit

User Process Limit

Maximum Memory Maps Configuration

手动修改的操作系统参数

The following general Operating System settings must be done manually.

Manually Configuring Operating System Settings

Check for Swappiness

Disk Readahead

Enabling Network Time Protocol (NTP)

Enabling chrony or ntpd for Red Hat 7/CentOS 7 Systems

SELinux Configuration

CPU Frequency Scaling

Enabling or Disabling Transparent Hugepages

Disabling Defrag for Red Hat and CentOS Systems

I/O Scheduling

Support Tools

下面安装一个单节点的vertica数据库:

随便装个测试环境玩玩,很多没细细考究。

操作系统版本:

[root@ verticatest ~]# lsb_release -a

LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch

Distributor ID: RedHatEnterpriseServer

Description:    Red Hat Enterprise Linux Server release  6.4 (Santiago)

Release:        6.4

Codename:       Santiago

操作系统时区:

[root@verticatest ~]# more  /etc/sysconfig/clock

ZONE="Asia/Shanghai"

安装rpm包:

[root@verticatest ~]# yum install openssh  ntp which dialog –y

[root@verticatest ~]# service ntpd  restart

Shutting down ntpd:                                        [FAILED]

Starting ntpd:                                             [  OK  ]

[root@verticatest ~]# chkconfig ntpd on

防火墙权限:

service iptables save
service iptables stop
chkconfig iptables off
service ip6tables save
service ip6tables stop
chkconfig ip6tables off

Selinux设置:

[root@verticatest ~]# more  /etc/selinux/config

 

# This file controls the state of SELinux  on the system.

# SELINUX= can take one of these three  values:

#     enforcing - SELinux security policy is enforced.

#     permissive - SELinux prints warnings instead of enforcing.

#     disabled - No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of these two  values:

#     targeted - Targeted processes are protected,

#     mls - Multi Level Security protection.

SELINUXTYPE=targeted

 

 

[root@verticatest ~]#setenforce 0

setenforce: SELinux is disabled

其他配置:

echo deadline >  /sys/block/sda/queue/scheduler

echo never  >/sys/kernel/mm/redhat_transparent_hugepage/enabled

echo never >/sys/kernel/mm/redhat_transparent_hugepage/defrag

echo no >  /sys/kernel/mm/redhat_transparent_hugepage/khugepaged/defrag

echo 0 > /proc/sys/vm/swappiness

/sbin/blockdev --setra 8192 /dev/sda

Ssh配置

LoginGraceTime 0

[root@verticatest ~]# service sshd reload

Reloading sshd:

创建用户:

[root@verticatest ~]#groupadd -g 601  verticadba

[root@verticatest ~]# useradd -u 601 -g  601 dbadmin

[root@verticatest ~]#mkdir -p  /home/dbadmin/data^C

[root@verticatest ~]# echo oracle|passwd  --stdin dbadmin

Changing password for user dbadmin.

passwd: all authentication tokens updated  successfully.

[root@ verticatest ~]# su - dbadmin

[dbadmin@ verticatest ~]$ mkdir -p  /home/dbadmin/data

[dbadmin@ verticatest ~]$ mkdir -p  /home/dbadmin/catalog

 

[dbadmin@ verticatest ~]$ more  .bash_profile

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

 

# User specific environment and startup  programs

 

PATH=$PATH:$HOME/bin

 

export PATH

export  TZ="Asia/Shanghai"

[dbadmin@ verticatest ~]$ . .bash_profile

[dbadmin@ verticatest ~]$ echo $TZ

Asia/Shanghai

安装数据库软件:

[root@verticatest ~]# /opt/vertica/sbin/install_vertica --hosts 192.168.117.4  --rpm /root/vertica-8.0.0-0.x86_64.RHEL6.rpm --dba-user dbadmin

Vertica Analytic Database 8.0.0-0  Installation Tool

 

 

>> Validating options...

 

 

Mapping hostnames in --hosts (-s) to  addresses...

 

>> Starting installation tasks.

>> Getting system information for  cluster (this may take a while)...

 

Default shell on nodes:

192.168.117.4 /bin/bash

 

>> Validating software versions  (rpm or deb)...

 

 

>> Beginning new cluster  creation...

 

successfully backed up admintools.conf on  192.168.117.4

 

>> Creating or validating DB Admin  user/group...

 

Successful on hosts (1): 192.168.117.4

    Provided DB Admin account details: user = dbadmin, group = verticadba,  home = /home/dbadmin

    Creating group... Group already exists

    Validating group... Okay

    Creating user... User already exists

    Validating user... Okay

 

 

>> Validating node and cluster  prerequisites...

 

System prerequisites passed.  Threshold = WARN

 

 

>> Establishing DB Admin SSH  connectivity...

 

Installing/Repairing SSH keys for dbadmin

 

 

>> Setting up each node and  modifying cluster...

 

Creating Vertica Data Directory...

 

Updating agent...

Creating node node0001 definition for  host 192.168.117.4

... Done

 

>> Sending new cluster  configuration to all nodes...

 

Starting agent...

 

>> Completing installation...

 

Running upgrade logic

No spread upgrade required:  /opt/vertica/config/vspread.conf not found on any node

Installation complete.

 

Please evaluate your hardware using  Vertica's validation tools:

    https://my.vertica.com/docs/8.0.x/HTML/index.htm#cshid=VALSCRIPT

 

To create a database:

  1. Logout and login as dbadmin. (see note below)

  2. Run /opt/vertica/bin/adminTools as dbadmin

  3. Select Create Database from the Configuration Menu

 

  Note: Installation may have made configuration changes to dbadmin

  that do not take effect until the next session (logout and login).

 

To add or remove hosts, select Cluster  Management from the Advanced Menu.

 

 创建数据库:

[dbadmin@verticatest ~]$ /opt/vertica/bin/admintools

企业版要指定license file的位置,社区版直接确定ok。

上下键选择,tab键选择下面的OK,cancel和help。

上下键选到第二行,空格建选中,tab键选中ok,按回车键。

选择6 configuration menu

选择1 Create database:

输入数据库的名字和db的注释:

输入口令:

确认口令:

 

选择catalog和data文件路径:

k-safe是vertica数据库集群的高可用等级:

创建过程:

*** Creating database: firstvdb ***

        Creating database firstvdb

        Starting bootstrap node v_firstvdb_node0001 (192.168.117.4)

        Starting nodes:

                v_firstvdb_node0001  (192.168.117.4)

        Starting Vertica on all nodes. Please wait, databases with large  catalog may take a while to initialize.

        Node Status: v_firstvdb_node0001: (DOWN)

        Node Status: v_firstvdb_node0001: (DOWN)

        Node Status: v_firstvdb_node0001: (DOWN)

        Node Status: v_firstvdb_node0001: (DOWN)

        Node Status: v_firstvdb_node0001: (UP)

Automatically installing extension  packages

Package: flextable

        Success: package flextable successfully installed

Package: approximate

        Success: package approximate successfully installed

Package: hdfsconnector

        Success: package hdfsconnector successfully installed

Package: AWS

        Success: package AWS successfully installed

Package: logsearch

        Success: package logsearch successfully installed

Package: txtindex

        Success: package txtindex successfully installed

Package: MachineLearning

        Success: package MachineLearning successfully installed

Package: idol

        Success: package idol successfully installed

Package: kafka

        Success: package kafka successfully installed

Package: place

        Success: package place successfully installed

 

连接数据库:

[dbadmin@verticatest ~]$ vsql -h  192.168.117.4 -U dbadmin

Password:

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=>

 

这里也可以用本地回环地址。

以上是“在linux6上如何安装vertica列式数据库”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注创新互联行业资讯频道!


新闻标题:在linux6上如何安装vertica列式数据库
标题来源:http://wjwzjz.com/article/iijcjc.html
在线咨询
服务热线
服务热线:028-86922220
TOP