tidb icon indicating copy to clipboard operation
tidb copied to clipboard

user tidb's .bash_profile needs an additional PATH of $HOME/deploy/bin during Ansible deployment

Open tshqin opened this issue 9 years ago • 2 comments

  1. What did you do? If possible, provide a recipe for reproducing the error. during Ansible deployment(root deployment), the TiDB's bin directory has not been added to its PATH

  2. What did you expect to see? .bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin:$HOME/deploy/bin
export PATH
  1. What did you see instead?
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH
  1. What version of TiDB are you using (tidb-server -V)? Git Commit Hash: 365e4ab491b683a69c2004f30b1ae4f86256e2ad Git Commit Branch: master UTC Build Time: 2017-08-16 01:24:27

tshqin avatar Aug 19 '17 01:08 tshqin

@tshqin Thanks! @LinuxGit PTAL

shenli avatar Aug 19 '17 06:08 shenli

@tshqin By default, we don't add DEPLOY_DIR/bin to $PATH in .bash_profile or .bashrc. We use start_tidb.sh or start_tidb.sh script in DEPLOY_DIR/scripts to manage tidb-server process.The scripts use relative path. We don't need to clean environment when cleaning up clusters. And We are planning to use systemd.

LinuxGit avatar Aug 19 '17 10:08 LinuxGit