Skip to content

Commit

Permalink
run ./onekey.sh all occur error: ./onekey.sh: line 39: pgxc_ctl: comm…
Browse files Browse the repository at this point in the history
…and not found (#40)

* Update README.md

* Update onekey.sh:env PATH is invalid

* Update README.md: source ~/.bashrc

* Update README.md

* Update onekey.sh

Co-authored-by: mingzong-sdm <84764391+mingzong-sdm@users.noreply.github.com>
  • Loading branch information
ThinkBlue1991 and mingzong-sdm committed Jun 9, 2021
1 parent dcc1076 commit 93dc28c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -47,6 +47,7 @@ ssh-copy-id username@IP
vi ~/.bashrc
export PATH="$HOME/polardb/polardbhome/bin:$PATH"
export LD_LIBRARY_PATH="$HOME/polardb/polardbhome/lib:$LD_LIBRARY_PATH"
source ~/.bashrc
```

### Fast Deployment(One-Key for all)
Expand Down
28 changes: 15 additions & 13 deletions onekey.sh
Expand Up @@ -33,34 +33,36 @@ fi

CMD=()

PGXC_CTL=$PGBIN/pgxc_ctl

if [[ "$BLD_OPT" == "all" ]]; then
sh ./build.sh
mkdir -p $HOME/polardb
touch $HOME/polardb/polardb_paxos.conf
pgxc_ctl -c $HOME/polardb/polardb_paxos.conf prepare standalone
pgxc_ctl -c $HOME/polardb/polardb_paxos.conf deploy all
pgxc_ctl -c $HOME/polardb/polardb_paxos.conf clean all
pgxc_ctl -c $HOME/polardb/polardb_paxos.conf init all
pgxc_ctl -c $HOME/polardb/polardb_paxos.conf deploy cm
pgxc_ctl -c $HOME/polardb/polardb_paxos.conf monitor all
$PGXC_CTL -c $HOME/polardb/polardb_paxos.conf prepare standalone
$PGXC_CTL -c $HOME/polardb/polardb_paxos.conf deploy all
$PGXC_CTL -c $HOME/polardb/polardb_paxos.conf clean all
$PGXC_CTL -c $HOME/polardb/polardb_paxos.conf init all
$PGXC_CTL -c $HOME/polardb/polardb_paxos.conf deploy cm
$PGXC_CTL -c $HOME/polardb/polardb_paxos.conf monitor all
elif [[ "$BLD_OPT" == "build" ]]; then
sh ./build.sh
elif [[ "$BLD_OPT" == "configure" ]]; then
mkdir -p $HOME/polardb
touch $HOME/polardb/polardb_paxos.conf
pgxc_ctl -c $HOME/polardb/polardb_paxos.conf prepare standalone
$PGXC_CTL -c $HOME/polardb/polardb_paxos.conf prepare standalone
elif [[ "$BLD_OPT" == "deploy" ]]; then
pgxc_ctl -c $HOME/polardb/polardb_paxos.conf deploy all
$PGXC_CTL -c $HOME/polardb/polardb_paxos.conf deploy all
elif [[ "$BLD_OPT" == "setup" ]]; then
pgxc_ctl -c $HOME/polardb/polardb_paxos.conf clean all
pgxc_ctl -c $HOME/polardb/polardb_paxos.conf init all
pgxc_ctl -c $HOME/polardb/polardb_paxos.conf monitor all
$PGXC_CTL -c $HOME/polardb/polardb_paxos.conf clean all
$PGXC_CTL -c $HOME/polardb/polardb_paxos.conf init all
$PGXC_CTL -c $HOME/polardb/polardb_paxos.conf monitor all
elif [[ "$BLD_OPT" == "cm" ]]; then
pgxc_ctl -c $HOME/polardb/polardb_paxos.conf deploy cm
$PGXC_CTL -c $HOME/polardb/polardb_paxos.conf deploy cm
elif [[ "$BLD_OPT" == "dependencies" ]]; then
sudo yum install bison flex libzstd-devel libzstd zstd cmake openssl-devel protobuf-devel readline-devel libxml2-devel libxslt-devel zlib-devel bzip2-devel lz4-devel snappy-devel python-devel
elif [[ "$BLD_OPT" == "clean" ]]; then
pgxc_ctl -c $HOME/polardb/polardb_paxos.conf clean all
$PGXC_CTL -c $HOME/polardb/polardb_paxos.conf clean all
else
echo "Invalid Parameter! Usage: $0 [all|build|configure|deploy|setup|dependencies|cm|clean]"
popd
Expand Down

0 comments on commit 93dc28c

Please sign in to comment.