天天看點

安裝GaussDB 100 報錯 is inconsistent with os system oracle

安裝GaussDB100

[[email protected] GaussDB_100_1.0.0-DATABASE-REDHAT-64bit]# python install.py -U omm:dbgrp -R /opt/gaussdb/app -D /opt/gaussdb/data -C LSNR_ADDR=127.0.0.1,192.168.56.21 -C LSNR_PORT=1888 -C REPL_PORT=1889 -C "LOG_ARCHIVE_DEST_2=SERVICE=192.168.56.20:1889 SYNC" -O

Error: Run package GaussDB_100_1.0.0-RUN-REDHAT-64bit.tar.gz is inconsistent with os system oracle.

Please refer to install log "/home/omm/zengineinstall.log" for more detailed information.

根據錯誤提示查找python安裝腳本install.py 裡的代碼:

 # get run.sha256 file

        sha256_pattern = "^(%s|%s).*-64bit.sha256$" % (self.RUN_VERSION_A, self.RUN_VERSION_B)

        self.runSha256File = self.find_file(self.dirName, sha256_pattern)

        if not self.runSha256File:

            raise Exception("Can not get correct sha256 file in path %s" % self.dirName)

        # get run file name without suffix

        # compress package name is run.tar.gz, decompress is run, remove .tar.gz

        self.run_pkg_name = self.get_decompress_tarname(self.runFile)

        # check os version of package is mattched with current os version

        if self.run_pkg_name.find(distname.upper().replace("OS", "")) == -1:

            logExit("Run package %s.tar.gz is inconsistent with os system %s." % (self.run_pkg_name, distname))

        # get dialect tar package

        dialect_pattern = "^(%s|%s).tar.gz" % (self.DIALECT_SCRIPT_PREFIX_A, self.DIALECT_SCRIPT_PREFIX_B)

        self.dialect_tar = self.find_file(os.path.dirname(self.dirName), dialect_pattern)

        # check run, sha256, dialect is matched

        self.check_package()

        log("Using run file as : %s" % self.runFile)

    def is_readable(self, file_name, user):

        '''

        :param path:

        :param user:

        :return:

        '''

        user_info = pwd.getpwnam(user)

嘗試修改标紅色部分:

if self.run_pkg_name.find(distname.upper().replace("OS", "")) == -2;

重新安裝

[[email protected] GaussDB_100_1.0.0-DATABASE-REDHAT-64bit]# python install.py -U omm:dbgrp -R /opt/gaussdb/app -D /opt/gaussdb/data -C LSNR_ADDR=127.0.0.1,192.168.56.21 -C LSNR_PORT=1888 -C REPL_PORT=1889 -C "LOG_ARCHIVE_DEST_2=SERVICE=192.168.56.20:1889 SYNC" -O

Checking runner.

Checking parameters.

End check parameters.

Checking user.

End check user.

Checking old install.

End check old install.

Checking kernel parameters.

Checking directory.

Checking integrality of run file...

Decompressing run file.

Setting user env.

Checking data dir and config file

Initialize db instance.

Changing file permission due to security audit.

Install successfully, for more detail information see /home/omm/zengineinstall.log.

[[email protected] bin]$ python zctl.py -t build

Begin to shutdown database ...

Done

Begin to clear data and log ...

Done

Begin to startup instance nomount ...

Done

Begin to build database ...

Done

Successfully build database