At this point, Greenplum has been installed. Let’s check the installed version:
1 2
$ ls /opt greenplum-db-6.24.3
Configure environment variables:
1 2 3
$ source /opt/greenplum-db-6.24.3/greenplum_path.sh $ which gpssh /opt/greenplum-db-6.24.3/bin/gpssh
Copy the initialization file to the user directory:
1 2 3
$ cp$GPHOME/docs/cli_help/gpconfigs/gpinitsystem_singlenode . $ ls gpinitsystem_singlenode
Write the hostname into a file:
1 2 3 4 5
$ hostname node0.dingzr.risb-pg0.utah.cloudlab.us # Create a new file hostlist_singlenode $ vim hostlist_singlenode # Paste the output of hostname into it
Create the corresponding node directories:
1 2 3 4
$ mkdir greenplum $ cd greenplum $ mkdir primary master $ cd ..
Modify the initialization file:
1 2 3 4
$ vim gpinitsystem_singlenode # declare -a DATA_DIRECTORY=(/users/dingzr/greenplum/primary /users/dingzr/greenplum/primary) # MASTER_HOSTNAME=node0.dingzr.risb-pg0.utah.cloudlab.us # MASTER_DIRECTORY=/users/dingzr/greenplum/master
1 2 3 4 5 6 7 8 9 10 11 12 13
$ gpssh-exkeys -f hostlist_singlenode [STEP 1 of 5] create local ID and authorize on local host
[STEP 2 of 5] keyscan all hosts and update known_hosts file
[STEP 3 of 5] retrieving credentials from remote hosts
[STEP 4 of 5] determine common authentication file content
[STEP 5 of 5] copy authentication files to all remote hosts
$ createdb demo $ psql demo psql (9.4.26) Type "help" for help.
demo=#
Installing Python 3.7
Download the compressed package with wget:
1 2 3 4
$ wget https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tgz $ tar -xzvf Python-3.7.9.tgz $ ls gpAdminLogs gpinitsystem_singlenode greenplum hostlist_singlenode Python-3.7.9 Python-3.7.9.tgz
Enter the extracted Python folder, install dependencies, and build Python:
1 2 3 4 5 6 7 8 9 10 11 12 13
$ cd Python-3.7.9 # Install dependencies (very important, otherwise you might encounter strange errors!) $ sudo apt-get install libbz2-dev libffi-dev libncurses5-dev libgdbm-dev liblzma-dev sqlite3 libsqlite3-dev openssl libssl-dev tcl8.6-dev tk8.6-dev libreadline-dev zlib1g-dev uuid-dev # Sometimes, after installing Python, you might encounter segmentation faults like "for ifunc symbol `clock_gettime'". I solved it this way (reference: https://stackoverflow.com/questions/58077672/python3-relink-issue-while-importing-opencv): # $ sudo apt install python3-opencv # Compile. Note: you can specify a directory after --prefix, or leave it unset. $ ./configure --prefix=/usr/local/src/python37 # Install $ sudo make && sudo make install # Create symbolic links. Note: replace /usr/local/src/python37 with the directory you specified after --prefix $ sudoln -s /usr/local/src/python37/bin/python3.7 /usr/bin/python3.7 $ sudoln -s /usr/local/src/python37/bin/pip3.7 /usr/bin/pip3.7
Then you need to re-source the environment and reset PYTHONHOME and PYTHONPATH, since they were modified by Greenplum: