LightDB/PostgreSQL 客戶端部署

哎呀我的天吶發表於2022-08-02

1、恆生官網下載LightDB,這裡以lightdb-x-13.3-22.2-5950-el7.x86_64.zip為例

2、安裝包上傳到客戶端伺服器,解壓並且給予相應的許可權,系統使用者我們以oracle為例

[oracle@node1 ~]$ cd /home/ta6/lightdb_client/lightdb-x-13.3-22.2-5950-kylinV10sp1.x86_64/lightdb-x/13.3-22.2/bin/
[oracle@node1 bin]$ pwd
/home/ta6/lightdb_client/lightdb-x-13.3-22.2-5950-kylinV10sp1.x86_64/lightdb-x/13.3-22.2/bin

3、配置環境變數

[ta6@client bin]$ cat ~/.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 LIGHTDB_PORT=
export PGUSER=
export LIGHTDB_HOST=
export PGHOME=/home/ta6/lightdb_client/lightdb-x-13.3-22.2-5950-kylinV10sp1.x86_64/lightdb-x/13.3-22.2
export PGDATA=
export PATH=${PGHOME}/bin:${PGHOME}/tools/iftop/bin:${PGHOME}/tools/iotop/bin:${PGHOME}/tools/linux-ftools/bin:${PGHOME}/tools/vmtouch/bin:${PATH}
export LD_LIBRARY_PATH=${PGHOME}/lib:${PGHOME}/lib/ltext:${LD_LIBRARY_PATH}
export LTPORT=
export LTUSER=
export LTHOST=
export LTHOME=/home/ta6/lightdb_client/lightdb-x-13.3-22.2-5950-kylinV10sp1.x86_64/lightdb-x/13.3-22.2
export LTDATA=
export PATH=${LTHOME}/bin:${LTHOME}/tools/bin:${LTHOME}/tools/sbin:${PATH}
export LD_LIBRARY_PATH=${LTHOME}/lib:${LTHOME}/lib/ltext:${LTHOME}/tools/lib64:${LD_LIBRARY_PATH}

4、執行. ~/.bashrc 使環境變數生效


如果執行ltsql報如下錯誤

ltsql: error while loading shared libraries: libreadline.so.8: canot open shared object file


需要進入安裝包下的system-lib目錄使用root執行

rpm -ivh readline-8.0.3.ky10.x86_64.rpm

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29990276/viewspace-2908587/,如需轉載,請註明出處,否則將追究法律責任。

相關文章