我要评分
获取效率
正确性
完整性
易理解

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.

  1. 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.

  2. Modify the Greenplum source code.

    This step is required only when Greenplum 6.12.1 is installed.

    1. Open the file.
      vim /home/gpdb-6.12.1/src/backend/gporca/libgpos/include/gpos/utils.h
    2. 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:

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  3. 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.

  4. Perform the installation.
    1
    makemake install
    

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