In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Environment:
Server version: centos 6.5
Database version: greenplum-db-4.2.8.5-build-1-RHEL5-x86_64.zip
1. Create user and group gpadmin
Groupadd-g 3030 gpadmin
Useradd-u 3030 gpadmin-g gpadmin-d / home/gpadmin
Passwd gpadmin
Configure kernel parameters and add the following:
Vi / etc/sysctl.conf
# By greenplum
Net.ipv4.ip_forward = 0
Net.ipv4.conf.default.accept_source_route = 0
Kernel.sysrq = 1
Kernel.core_uses_pid = 1
Net.ipv4.tcp_syncookies = 1
Kernel.msgmnb = 65536
Kernel.msgmax = 65536
Kernel.sem = 250 64000 100 512
Kernel.shmmax = 500000000
Kernel.shmmni = 4096
Kernel.shmall = 4000000000
Kernel.sem = 250 64000 100 512
Net.ipv4.tcp_tw_recycle=1
Net.ipv4.tcp_max_syn_backlog=4096
Net.core.netdev_max_backlog=10000
Vm.overcommit_memory=2
Net.ipv4.conf.all.arp_filter = 1
The above parameters can be modified according to your own system configuration.
Execute the command manually to make the parameter take effect
[root@gpmaster] # sysctl-p
Add the following configuration to the limits.conf file
[root@gpmaster ~] # vi / etc/security/limits.conf
# End of file
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
Configure users ssh users log in without password, stand-alone must also be configured
[root@gpmaster ~] # su-gpadmin
[gpadmin@gpmaster] $mkdir ~ / .ssh
[gpadmin@gpmaster] $chmod 700 ~ / .ssh
[gpadmin@gpmaster ~] $cd .ssh /
[gpadmin@gpmaster .ssh] $ssh-keygen-t rsa
[gpadmin@gpmaster .ssh] $ssh gpmaster cat / home/gpadmin/.ssh/id_rsa.pub > > authorized_keys
[gpadmin@gpmaster .ssh] $chmod 600 authorized_keys
[gpadmin@gpmaster .ssh] $ssh gpmaster date
two。 Install GP softwar
[root@gpmaster ~] # unzip greenplum-db-4.2.8.5-build-1-RHEL5-x86_64.zip
[root@gpmaster ~] #. / greenplum-db-4.2.8.5-build-1-RHEL5-x86_64.bin
Create the directories required by instance
[root@gpmaster] # mkdir-p / app/master
[root@gpmaster] # mkdir-p / app/data/gp1
[root@gpmaster] # mkdir-p / app/data/gp2
[root@gpmaster] # mkdir-p / app/data/gp3
[root@gpmaster] # mkdir-p / app/data/gp4
Modify the directory owner:
[root@gpmaster] # chown-R gpadmin:gpadmin / usr/local/greenplum-db*
[root@gpmaster] # chown-R gpadmin:gpadmin / app/master
[root@gpmaster] # chown-R gpadmin:gpadmin / app/data/gp1
[root@gpmaster] # chown-R gpadmin:gpadmin / app/data/gp2
[root@gpmaster] # chown-R gpadmin:gpadmin / app/data/gp3
[root@gpmaster] # chown-R gpadmin:gpadmin / app/data/gp4
Modify the gpadmin user environment configuration:
[root@gpmaster ~] # su-gpadmin
[gpadmin@gpmaster ~] $vi .bash _ profile
Source / usr/local/greenplum-db/greenplum_path.sh
Export MASTER_DATA_DIRECTORY=/app/master/gpseg-1
Export PGPORT=5432
Export PGUSER=gpadmin
Export PGDATABASE=gpmaster
Effective:
[gpadmin@gpmaster ~] $source .bash _ profile
Edit the all_hosts_file file and add the following:
[gpadmin@gpmaster ~] $vi all_hosts_file
Gpmaster
Execute the following command to verify user equivalence
[gpadmin@gpmaster] $gpssh-exkeys-f all_hosts_file
3. Initialize the system:
Edit the parameter file initialized by the system. You can use the template for editing this file. The template file is located in the following directory:
[gpadmin@gpmaster ~] $cp / usr/local/greenplum-db/docs/cli_help/gpconfigs/gpinitsystem_config / home/gpadmin/
Edit the gp parameter file and modify the configuration as follows:
[gpadmin@gpmaster ~] $vi gpinitsystem_config
Declare-a DATA_DIRECTORY= (/ app/data/gp1 / app/data/gp2 / app/data/gp3 / app/data/gp4)
MASTER_HOSTNAME=gpmaster
MASTER_DIRECTORY=/app/master
DATABASE_NAME=gpmaster
Edit the seg_hosts_file file
[gpadmin@gpmaster ~] $vi seg_hosts_file
Gpmaster
Execute the initialization system command:
[gpadmin@gpmaster] $gpinitsystem-c gpinitsystem_config-h seg_hosts_file
The system initializes, and then you will see the following prompt:
Continue with Greenplum creation Yy/Nn >
Enter Y, press enter, and the system will be initialized.
After installation, you can connect to the GP database:
[gpadmin@gpmaster] $psql-d gpmaster
Psql (8.2.15)
Type "help" for help.
Gpmaster=#
Create a database
[gpadmin@gpmaster ~] $createdb testDB-E utf-8
Give permissions to the database
[gpadmin@gpmaster] $psql-d gpmaster
Psql (8.2.15)
Type "help" for help.
Gpmaster=#\ c testDB
You are now connected to database "testDB" as user "gpadmin".
TestDB=# alter role gpadmin with password 'gpadmin'
Remote permission
[gpadmin@gpmaster ~] $cd $MASTER_DATA_DIRECTORY/
[gpadmin@gpmaster gpseg-1] $ls
Base pg_distributedlog pg_stat_tmp pg_xlog
Global pg_distributedxidmap pg_subtrans postgresql.conf
Gp_dbid pg_hba.conf pg_tblspc postmaster.opts
Gpperfmon pg_ident.conf pg_twophase postmaster.pid
Pg_changetracking pg_log pg_utilitymodedtmredo
Pg_clog pg_multixact PG_VERSION
[gpadmin@gpmaster gpseg-1] $
[gpadmin@gpmaster gpseg-1] $vi pg_hba.conf
Host testDB gpadmin 192.168.96.1/32 md5
Use the gpstop-u command to make the configuration effective
[gpadmin@gpmaster gpseg-1] $gpstop-u
Log in to the database through other machines
$psql-h292.168.96.128-p5432-d testDB-Ugpadmin
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.