安装nodejs
tar -xvf node-v14.16.0-linux-x64.tar.xz
mv node-v14.16.0-linux-x64 /opt/module/nodejs
cd ~
ln -s /opt/module/nodejs/bin/node /usr/local/bin/node
ln -s /opt/module/nodejs/bin/npm/usr/local/bin/npm
检查版本:
node -v
npm -v
安装node-gpy:
npm install -g node-gyp
安装sqlpad
unzip sqlpad-master.zip
mv sqlpad-master /opt/module/sqlpad
cd sqlpad
scripts/build.sh
cp config-examples.env config.env
vim config.env
SQLPAD_ADMIN = admin
SQLPAD_ADMIN_PASSWORD = admin
SQLPAD_DB_PATH=“/opt/module/sqlpad/db”
SQLPAD_QUERY_RESULT_MAX_ROWS=“1000”
SQLPAD_TIMEOUT_SECONDS=6000000
启动:
nohup /usr/local/bin/node /opt/module/sqlpad/server/server.js --config /opt/module/sqlpad/config.env &