1. 下载和安装JDK
vim /etc/profile
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_92
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$JAVA_HOME/bin:$PATH
source /etc/profile
java -version
或:
# .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
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_92
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
2.下载和配置jmeter
sudo vi .bashrc
alias jmeter="/home/ezpeipa/jmeter/apache-jmeter-3.1/bin/jmeter.sh"
source .bashrc
jmeter -v