CentOS7にVerticaをインストールするメモ
以下のサイトから専用フォームへアクセスして、
「HPE Vertica Community Edition 日本語ガイド (PDF 1.50MB)」をダウンロードする
■verticaのダッシュボードURL
■日本語ガイド無料ダウンロード
http://h22242.www2.hpe.com/products/software/hpsoftware/vertica/trials.html#download
■Community Edition
3ノードクラスター、1Tbyte まで無料でお試しいただけるエディション。
■OSインストールチェック
・OS領域を含め、非LVM構成とすること
・ファイルシステムは「ext4」であること
・Swap領域は2GB設定されていること
・HPE Verticaのカタログとデータ用(※)に使うディスクのブロックサイズが4096バイトであるこ
※ext4のデフォルトが4096バイト
・メモリは1つの論理プロセッサ毎に1GB以上のメモリが搭載されていること
■各種設定が必要
hp_vertica_community_edition_guide_jp.pdfを参照
■ 事前にインストールが必要なパッケージ
$ yum -y install dialog $ yum -y install gdb $ yum -y install mcelog $ yum -y install sysstat $ echo deadline > /sys/block/sda/queue/scheduler $ cat /sys/block/sda/queue/scheduler noop [deadline] cfq
■install_verticaスクリプトを使用してのHPE Verticaのインストール
※下記例では、「--failure-threshold」を「NONE」で指定しているため、
FAILやWARNINGがインストール中に発生しても、無視してインストールが進行する指定になっています。
FAILが発生した場合にインストールを中断させたい場合は、「--failure-threshold FAIL」と指定し、インストールを実行ください。
# /opt/vertica/sbin/install_vertica --hosts 127.0.0.1 --rpm /tmp/rpm/vertica-8.0.0-0.x86_64.RHEL6.rpm --ssh-password root --dba-user-password dbadmin --license CE --accept-eula --failure-threshold NONE
■データベース作成
$ /opt/vertica/bin/admintools
■サンプルデータ作成
$ cd /opt/vertica/examples/VMart_Schema
$ ./vmart_gen
■データベースへの接続
1. /opt/vertica/bin/admintools
2. Main Menu上で、「2 Connect to Database」を選択し、OKをクリックする。
■verticaのコマンド一覧
\? --> ヘルプ
\q --> vsqlの終了
\dj --> Projection一覧
\db --> ユーザーテーブル一覧
\dS --> システムテーブル一覧
\d
\dn --> スキーマ一覧
\timing --> タイミングの切り替え。実行時間を確認したいクエリの実行前には、必ずタイミングがONとなっていること
\i --> SQLの論理スキーマのスクリプトの実行
■vertica-consoleのインストール
(1)LANG設定を実行する
# export LANG=en_US.UTF-8
# rpm -Uvh vertica-console-8.0.0-0.x86_64.RHEL6.rpm Preparing... ################################# [100%] [preinstall] Starting installation.... /var/tmp/rpm-tmp.s036cM: line 129: netstat: command not found [preinstall] Backing up config directory ‘/opt/vconsole/config’ -> ‘/opt/vconsole/config.bak’ Updating / installing... 1:vertica-console-8.0.0-0 ################################# [100%] [postinstall] copy vertica-consoled [postinstall] configure the daemon service mkdir: cannot create directory ‘tools’: File exists Cleaning up temp folder... Starting the vertica management console.... Starting vertica-consoled (via systemctl): [ OK ] [postinstall] Changing permissions of /opt/vconsole
▼https://xxx.xxx.xxx.xxx:5450/webui/でエラーする場合
(1)mconsole.logを確認する
# view /opt/vconsole/log/mc/mconsole.log 01 12 2016 16:14:42,108 [MCThread-1480576482108] HomeController INFO - Welcome to login page from: 192.168.56.1
(2)startup.logを確認する
# view /opt/vconsole/log/mc/startup.log javax.servlet.jsp.JspTagException: No message found under code 'home.infrastructure_title' for locale 'ja'.
(3)messages_ja_JP.propertiesを作成する
cd /opt/vconsole/temp/webapp/WEB-INF/messages/ cp -p messages_en.properties messages_ja_JP.properties
▼「Management Console "could not establish a connection with the agent」エラーする場合
vertica_agentを起動させる
[dbadmin@localhost ~]$ /opt/vertica/sbin/vertica_agent start