天天看點

GaussDB解除安裝後重新安裝報錯

安裝軟體

[[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.20 -C LSNR_PORT=1888 -C REPL_PORT=1889 -C "LOG_ARCHIVE_DEST_2=SERVICE=192.168.56.21:1889 SYNC" -C CHECKPOINT_TIMEOUT=3 -C SESSIONS=1500 -C REPL_WAIT_TIMEOUT=30000

Checking runner.

Checking parameters.

End check parameters.

Checking user.

End check user.

Checking old install.

Error: Database has been installed already.

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

檢查報錯日志: cat /home/omm/zengineinstall.log

[[email protected] etc]# cat /home/omm/zengineinstall.log

[2020-03-09 22:37:31] Begin init...

[2020-03-09 22:37:31] Installer runs on python version : 2.7.5

[2020-03-09 22:37:31] End init

[2020-03-09 22:37:31] Using run file as : /opt/software/gaussdb/GaussDB_100_1.0.0-DATABASE-REDHAT-64bit/GaussDB_100_1.0.0-RUN-REDHAT-64bit.tar.gz

[2020-03-09 22:37:31] Checking runner.

[2020-03-09 22:37:31] Check runner user id and group id is : 0, 0

[2020-03-09 22:37:31] End check runner is root

[2020-03-09 22:37:31] Checking parameters.

[2020-03-09 22:37:31] Program path is separated with data path!

[2020-03-09 22:37:31] Using omm:dbgrp to install database

[2020-03-09 22:37:31] Using install program path : /opt/gaussdb/app

[2020-03-09 22:37:31] Using option : all

[2020-03-09 22:37:31] Using install data path : /opt/gaussdb/data

[2020-03-09 22:37:31] Using set config parameters : ['LSNR_ADDR=127.0.0.1,192.168.56.20', 'LSNR_PORT=1888', 'REPL_PORT=1889', 'LOG_ARCHIVE_DEST_2=SERVICE=192.168.56.21:1889 SYNC', 'CHECKPOINT_TIMEOUT=3', 'SESSIONS=1500', 'REPL_WAIT_TIMEOUT=30000']

[2020-03-09 22:37:31] End check parameters.

[2020-03-09 22:37:31] Checking user.

[2020-03-09 22:37:31] Check user cmd: id -g omm | grep -q -w 0

[2020-03-09 22:37:31] Check user cmd: id -gn omm

[2020-03-09 22:37:31] End check user.

[2020-03-09 22:37:31] Checking old install.

[2020-03-09 22:37:31] Using user profile : /home/omm/.bashrc

[2020-03-09 22:37:31] Error: Database has been installed already.

發現在讀取/home/omm/.bashrc檔案後立即報錯,檢視檔案内容:

[[email protected] etc]# cat  /home/omm/.bashrc

# .bashrc

# Source global definitions

if [ -f /etc/bashrc ]; then

        . /etc/bashrc

fi

# Uncomment the following line if you don't like systemctl's auto-paging feature:

# export SYSTEMD_PAGER=

# User specific aliases and functions

export GSDB_HOME="/opt/gaussdb/app"

export PATH="/opt/gaussdb/app/bin":$PATH

export LD_LIBRARY_PATH="/opt/gaussdb/app/lib":"/opt/gaussdb/app/add-ons":$LD_LIBRARY_PATH

export GSDB_DATA="/opt/gaussdb/data"

注釋環境變量中Gaussdb參數,重新安裝。

[[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.20 -C LSNR_PORT=1888 -C REPL_PORT=1889 -C "LOG_ARCHIVE_DEST_2=SERVICE=192.168.56.21:1889 SYNC" -C CHECKPOINT_TIMEOUT=3 -C SESSIONS=1500 -C REPL_WAIT_TIMEOUT=30000

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.

Creating database.

Creating database succeed.

Changing file permission due to security audit.

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

安裝成功!!!