準備環境:java
1.centos 7.0鏡像python
2.vertica-9.1.1-1.x86_64.RHEL6.rpmlinux
安裝過程:sql
1.安裝CentOS 7.0數據庫
注意:掛載的文件系統必須是ext4,不能是默認的xfs!centos
2.關閉防火牆app
[root@localhost ~]# systemctl disable firewalld
[root@localhost ~]# systemctl stop firewalld
3.設置selinux爲disable工具
[root@localhost ~]# vi /etc/selinux/config SELINUX=disabled
[root@localhost ~]# setenforce 0
4.安裝依賴包測試
[root@localhost ~]# yum install gdb mcelog sysstat chrony ntp ntpdate -y
5.安裝必要工具:java,python,rsync,ptsui
[root@localhost ~]# python --version
[root@localhost ~]# yum install rsync -y
[root@localhost ~]# rsync --version
[root@localhost ~]# ls /dev |grep pts
[root@localhost ~]# yum install java-1.8.0-openjdk.x86_64 -y
[root@localhost ~]# java -version
6.調整參數
[root@localhost ~]# vi /etc/sysctl.conf vm.swappiness = 1
[root@localhost ~]# echo 1 > /proc/sys/vm/swappiness
[root@localhost ~]# vi /etc/rc.d/rc.local
echo deadline > /sys/block/sdb/queue/scheduler
echo deadline > /dev/sdb
/sbin/blockdev --setra 8192 /dev/sdb
7.安裝vertica
[root@localhost ~]# rpm -ivh vertica-9.1.1-1.x86_64.RHEL6.rpm
[root@localhost ~]# /opt/vertica/sbin/install_vertica --host 192.168.*.* --rpm vertica-9.1.1-1.x86_64.RHEL6.rpm --failure-threshold FAIL --dba-user dbadmin
8.初始化數據庫
[root@localhost ~]# su - dbadmin
[dbadmin@localhost ~]$ ./opt/vertica/bin/adminTools
(1)提示輸入License File Path時,由於用的是社區版license,不用填,直接回車
(2)Accept EULA
(3)Configuration Menu
(4)Create Database
(5)輸入Database Name: vertica
(6)輸入密碼和確認密碼
(7)選擇主機IP,由於是單節點安裝,直接選擇默認的那個IP
(8)確認數據實例安裝目錄,看需求,或者不用改,直接用默認的,/home/dbadmin
(9)會出現一個k-safe的提示,這是隻有一個節點致使的,直接忽略,繼續下一步
(10)安裝成功
9.測試鏈接
[dbadmin@localhost bin]$
vsql -h 127.0.0.1 -d vertica -u dbadmin
vsql: warning: extra command-line argument "dbadmin" ignored vsql: Warning: The -u option is deprecated. Use -U. User name: 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 vertica =>