日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

Greenplum【环境搭建 01】CentOS Linux release 7.5 环境单机版详细安装配置步骤+问题解决(含安装包资源)

發布時間:2024/10/6 linux 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Greenplum【环境搭建 01】CentOS Linux release 7.5 环境单机版详细安装配置步骤+问题解决(含安装包资源) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

安裝文件

greenplum-db-6.13.0-rhel7-x86_64.rpm
鏈接:https://pan.baidu.com/s/1-Wep7oQ4GTQpwdr7Y7sOhw
提取碼:emhd

1.查看環境

  • 防火墻:

開了以后需要各種設置,很可能造成各種外部的連接不成功,比如ftp、telnet、ssh…(有些問題并不是浮在表面,你根本不知道是防火墻的鍋),簡單起見云服務器可以關閉防火墻而使用容易配置的安全組。

  • SELinux:

SELinux策略是白名單原則,需要非常清楚安裝軟件使用的權限才能配置好(配置麻煩不說,頭疼的是你不知道需要什么權限),而Linux已經有了比較完善的Security Best Practice。在Linux上部署工具有更多的實踐經驗和可行方案去保證系統的安全,即便是沒有SELinux,是故大家普遍選擇關閉SELinux。

# 查看防火墻是否關閉,未關閉使用(systemctl stop firewalld) systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemonLoaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)Active: inactive (dead)Docs: man:firewalld(1)# 查看selinux狀態,未關閉修改(SELINUX=disabled) cat /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 three two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted

2.修改配置

# 未設置 /etc/sysctl.conf /etc/security/limits.conf

3.添加組及用戶

添加組及用戶是很重要的,很多操作必須在特定用戶下執行,之前安裝postgresql遇到很多這方面的坑,大家小心。

groupadd gpadmin useradd -r -m -g gpadmin gpadmin # 給 gpadmin 用戶設置密碼 passwd gpadmin # 刪除組 groupdel gpadmin 刪除用戶 userdel gpadmin echo "RemoveIPC=no" >> /etc/systemd/logind.conf service systemd-logind restart

4.安裝

[root@tcloud greenplum]# rpm -Uvh greenplum-db-6.13.0-rhel7-x86_64.rpm error: Failed dependencies:apr is needed by greenplum-db-6-6.13.0-1.el7.x86_64apr-util is needed by greenplum-db-6-6.13.0-1.el7.x86_64krb5-devel is needed by greenplum-db-6-6.13.0-1.el7.x86_64libevent is needed by greenplum-db-6-6.13.0-1.el7.x86_64# 報依賴缺失,直接使用 yum install,所需依賴自動安裝。 [root@tcloud greenplum]# yum install -y greenplum-db-6.13.0-rhel7-x86_64.rpm # 默認安裝到/usr/local下 lrwxrwxrwx 1 root root 30 Jul 5 10:00 greenplum-db -> /usr/local/greenplum-db-6.13.0 drwxr-xr-x 11 root root 4096 Jul 5 10:00 greenplum-db-6.13.0 # 賦權 chown -R gpadmin /usr/local/greenplum* chgrp -R gpadmin /usr/local/greenplum*# 使環境變量生效 source /usr/local/greenplum-db/greenplum_path.sh

5.初始化準備

# 創建實例目錄(主節點及segment實例存儲文件夾gpnode個數視服務器情況而定) mkdir -p /home/greenplum/gpdata/master mkdir -p /home/greenplum/gpdata/gpnode1 mkdir -p /home/greenplum/gpdata/gpnode2 mkdir -p /home/greenplum/gpdata/gpnode3 mkdir -p /home/greenplum/gpdata/gpnode4# 修改目錄屬主 chown -R gpadmin:gpadmin /home/greenplum/ chown -R gpadmin:gpadmin /home/greenplum/gpdata chown -R gpadmin:gpadmin /home/greenplum/gpdata/master chown -R gpadmin:gpadmin /home/greenplum/gpdata/gpnode*

6.以下使用gpadmin用戶操作

su gpadmin# ----環境變量配置 # postgresql默認端口號5432 這里使用2345 cat <<EOF >> /home/greenplum/.bashrc source /usr/local/greenplum-db/greenplum_path.sh export PGPORT=2345 export PGUSER=gpadmin export MASTER_DATA_DIRECTORY=/home/greenplum/gpdata/master/gpseg-1 export PGDATABASE=gpdb # export LD_PRELOAD=/lib64/libz.so.1 ps EOF source /home/greenplum/.bashrc# ----節點host配置(單機版值配置一個master節點) cat <<EOF >> /home/greenplum/hostfile_exkeys tcloud EOF# ----ssh權限互通設置 gpssh-exkeys -f /home/greenplum/hostfile_exkeys# ----設置節點服務器(單機版就是master節點) cat <<EOF >> /home/greenplum/seg_hosts_file tcloud EOF# ----編輯gp初始化文件 cp /usr/local/greenplum-db/docs/cli_help/gpconfigs/gpinitsystem_config /home/greenplum/gpinitsystem_configvim /home/greenplum/gpinitsystem_config # 以下為配置文件內容 declare -a DATA_DIRECTORY=(/home/greenplum/gpdata/gpnode1 /home/greenplum/gpdata/gpnode2) MASTER_HOSTNAME=tcloud MASTER_PORT=2345 MASTER_DIRECTORY=/home/greenplum/gpdata/master DATABASE_NAME=gpdb# ---- 初始化(-s xx代表備用主節點是xx機器 單機無需配置) gpinitsystem -c gpinitsystem_config -h seg_hosts_file

初始化,輸入Y繼續…


7.使用設置

# psql登錄修改密碼 psql -p 2345 # 修改數據庫密碼 alter role gpadmin with password 'xxxxxx'; # 遠程連接配置 vim /home/greenplum/gpdata/master/gpseg-1/pg_hba.conf # 添加: host all gpadmin 0.0.0.0/0 md5 # 重新加載配置文件 gpstop -u


重新加載配置文件報錯

:-gpstop failed. (Reason='[Errno 2] No such file or directory: '/home/greenplum/gpdata/master/postgrsql # 解決 export MASTER_DATA_DIRECTORY=/home/greenplum/gpdata/master/gpseg-1

8.其他命令

gpstart #正常啟動 gpstop #正常關閉 gpstop -M fast #快速關閉 gpstop –r #重啟

總結

第二部分的配置文件沒有進行修改,這部分要根據實際情況進行配置,本文旨在單機安裝gp數據庫,具體使用方法需要更多的學習??

總結

以上是生活随笔為你收集整理的Greenplum【环境搭建 01】CentOS Linux release 7.5 环境单机版详细安装配置步骤+问题解决(含安装包资源)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。