On Linux it is possible to pipe answers to all the questions the Greenplum installer asks the user when doing the installation manually.
This example uses Greenplum Database but the same holds true for all of the installers such as Greenplum Loaders.
Using Greenplum binary installer version 5.x as an example we can run the installer to see that it has several prompts that need answered:
Do you accept the Pivotal Database license agreement? [yes|no] Answer - yes Provide the installation path for Greenplum Database or press ENTER to accept the default installation path: /usr/local/greenplum-db-5.5.0 Answer - enter Install Greenplum Database into /usr/local/greenplum-db-5.5.0? [yes|no] Answer - yes /usr/local/greenplum-db-5.5.0 does not exist. Create /usr/local/greenplum-db-5.5.0 ? [yes|no] (Selecting no will exit the installer) Answer - yes
Using printf
we can now pipe the answers to these questions into the binary installer, using '\n
' to simulate the enter key and piping everything into an installer.log
file should something go wrong:
[root@gpdb-sandbox ~]# printf 'yes\n\nyes\nyes\n' | /bin/bash /home/gpadmin/greenplum-loaders-5.4.1-rhel6-x86_64.bin 2>&1 > installer.log