centos6.6 GreenPlum 4のインストール方法を説明します。3.5.2?
GP公式サイトでは、最新GPのCentosでの対応バージョンが見えないので、RedHatのバージョンを使えば良いです。
前言:GPの実装は概ねこのようなもので,マスター機として1台,その他をSegment機として選択する.それほど多くのマシンがないため、仮想マシンは3つのcentos 6を開いた。6、1+2モードを採用。
インストール時、GPはまずMaster機に装着することができ、その後、Maser機とSegment機の間で相互信頼(gpssh-exkeys)を確立することでリモートインストールのようなものを行うことができ、gpsshを通じてすべての機に登録することができ、ユーザーの構築、インストールされたGPのコピーなど、一連の操作を行うことができることを覚えておいてください。もちろん、インストール前にカーネルパラメータ、制限パラメータなどを構成する人もいますが、必要に応じて。私の仮想マシンのため、ハードウェアはほとんど公式サイトの要求に達しないので、このステップを捨てました。
インストール前の準備(オプション) 1.Master機の/etc/sysctl.confに追加[html] view plaincopy
kernel.shmmax = 500000000 kernel.shmmni = 4096 kernel.shmall = 4000000000 kernel.sem = 250 512000 100 2048 kernel.sysrq = 1 kernel.core_uses_pid = 1 kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.msgmni = 2048 net.ipv4.tcp_syncookies = 1 net.ipv4.ip_forward = 0 net.ipv4.conf.default.accept_source_route = 0 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_max_syn_backlog = 4096 net.ipv4.conf.all.arp_filter = 1 net.ipv4.ip_local_port_range = 1025 65535 net.core.netdev_max_backlog = 10000 net.core.rmem_max = 2097152 net.core.wmem_max = 2097152 vm.overcommit_memory = 2
ダウンセットまたはsysctl-pを再起動して有効にします
2、Master機/etc/security/limits.conf追加 [html]* soft nofile 65536 * hard nofile 65536 * soft nproc 131072 * hard nproc 131072
!!! 注意RedHat 6.xとCentos 6.xのマシンは/etc/security/limits.d/90-nproc.confのパラメータは、上記のファイルパラメータを上書きします。両方のファイルにパラメータを設定場合は、パラメータが90-nprocであることを保証します。confが設定されています。
3、ファイアウォールを閉じるchkconfig iptables off ;//永久停止、再起動後は起動しない
service iptables stop ;//再起動すると起動し、サービスiptables statusでステータスをチェックします。
GP実装開始 1.MasterにGP,root権限をインストールするダウンロードしたgreenplum-db-4.3.5.2-build-1-RHEL 5-x 86_64.zipは1つのディレクトリの下に置いて、解凍(unzip)して、ReadMeとを得る.binファイル、デフォルトGPは/usr/local/greenplumの下にインストールされています。その実装はどこでもいいです。こちらは/opt/greenplum/の下にインストールします。
binファイルを実行し、ディレクトリの下に解凍します。/ greenplum-db-4.3.5.2-build-1-RHEL5-x86_64.bin
あなたがyes|noに負けるまで、スペースキーを押して、yesを打ってください。
インストールディレクトリを選択して、インストールするディレクトリを入力します。ここで/opt/greenplum/greenplum-db-4.3.5.2
もう一度yesを降りるとインストールされ、すぐにインストールされます。
2、マスターマシンにGPデータベースを担当するユーザーgpadminを作成し、その後のsegmentマシンのユーザーgpadminをgpsshで追加する習慣がある一般的に最初はgpadminユーザーがいなかったので、直接新規作成します。
groupadd -g 530 gpadmin
useradd -g 530 -u 530 -m -d /home/gpadmin -s /bin/bash gpadmin
passwd gpadmin ;パスワードの追加
GPインストールフォルダへのアクセス権の変更
chown -R gpadmin:gpadmin /home/gpadmin
chown -R gpadmin:gpadmin /opt/greenplum
GPインストールディレクトリの下にある環境変数ファイルをユーザに追加する.
source /opt/greenplum/greenplum-db/greenplum_path.sh ;/opt/greenplum/greenplum-dbは/opt/greenplum/greenplum-db-4.3.5.2のリンクであり、ln-s/opt/greenplum/greenplum-db-4.3.5.2/opt/greenplum/greenplum-dbを自分でリンクしていない
3、ホスト間の相互通信を確立するまず、Masterマシンで/etc/hostsファイルを編集し、
MasterマシンとsegmentマシンのIp,hostnameを入力します。
のように
# /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.127.1136 mdw#master機
192.168.127.1137 sdw 1#segment機
192.168.127.38 sdw 2#segment機
次に、あるディレクトリの下に/varのようにすべてのホストhostnameを保護するファイルhostlists(名前は勝手に取る)とsegment機hostnameを含むseg_を作成します。hosts。
/var/hostlists:
mdw
sdw1
sdw2
/var/seg_hosts
sdw1
sdw2
相互信頼の確立を開始gpssh-exkeys -f /var/hostlists
[root@localhost ~]$ gpssh-exkeys -f /var/hostlists
[STEP 1 of 5] create local ID and authorize on local host
... /home/root/.ssh/id_rsa file exists ... key generation skipped
[STEP 2 of 5] keyscan all hosts and update known_hosts file
[STEP 3 of 5] authorize current user on remote hosts
... send to mdw
... send to sdw1
***
*** Enter password for sdw1:
[STEP 4 of 5] determine common authentication file content
[STEP 5 of 5] copy authentication files to all remote hosts
... finished key exchange with mdw
... finished key exchange with sdw1
[INFO] completed successfully
に注意相互信頼が確立されるとgpssh-f/var/seg_hostsはすべてのマシンにアクセスしました。