Compiling and Installing Greenplum
The following uses Greenplum 5.11.3 as an example to describe how to install Greenplum through source code compilation. You can refer to this section for other Greenplum versions as well.
- Go to the /opt directory. Download the Greenplum source package to the /home directory on the server, and decompress the package.
For the download link of the Greenplum source code, see Table 2.
- Modify the Greenplum source code.
This step is required only when Greenplum 6.12.1 is installed.
- Open the file.
vim /home/gpdb-6.12.1/src/backend/gporca/libgpos/include/gpos/utils.h
- Press i to enter the insert mode, comment out the movq commands in lines 23 and 24, and add the following content to the file:
#define GPOS_ASMFP __asm__( \ "mov x0, xzr\n\t" \ "mov x1, %[ARG0_64]\n\t" \ "b .Lfunc_end_kpt_1\n\t" \ ".Lfunc_end_kpt_1:\n\t" \ : \ :[ARG0_64]"r"(&ulp) \ :"x0", "x1" \ ); #define GPOS_ASMSP __asm__( \ "mov x0, xzr\n\t" \ "mov x1,%[ARG0_64]\n\t" \ "sub x8, sp, #1024\n\t" \ "str x8, [x1]\n\t" \ "b .Lfunc_end_kpt_2\n\t" \ ".Lfunc_end_kpt_2:\n\t" \ : \ :[ARG0_64]"r"(&ulp) \ :"x0", "x1" \ );The following figure shows the modification result:

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Perform compilation.
1 2
cd gpdb ./configure --with-perl --with-python --with-libxml --prefix=/usr/local/gpdb
The Greenplum installation path is /usr/local/gpdb.

- Perform the installation.
1makemake install

- Configure the shell.
source /usr/local/gpdb/greenplum_path.sh
- Check the Greenplum installation directory.
ls /usr/local/gpdb

Parent topic: Greenplum Porting Guide