#搭建jdk环境
#卸载旧的java版本
useradd lzmhtest
rpm -qa | grep java ---查看包
rpm -e 包的全称
rz #上传java.tar.gz
unzip java.tar.gz
mv usr/local/java /usr/local/
vim /etc/profile
#JAVA HOME
JAVA_HOME="/usr/local/java/jdk1.8.0_60/"
CLASS_PATH="$JAVA_HOME/lib:$JAVA_HOME/jre/lib"
PATH=".:$PATH:$JAVA_HOME/bin"
source /etc/profile
#修改为默认版本
update-alternatives --install /usr/bin/java java /usr/local/java/jdk1.8.0_60/bin/java 300
update-alternatives --install /usr/bin/javac javac /usr/local/java/jdk1.8.0_60/bin/javac 300
update-alternatives --config java
java -version
#下载sdk
cd /opt
mkdir android-sdk-linux
wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
unzip sdk-tools-linux-3859397.zip
mv tools android-sdk-linux
vim /etc/profile
#set sdk environment
export ANDROID_HOME=/opt/android-sdk-linux
export PATH=$PATH:$ANDROID_HOME/tools/bin
source /etc/profile
sdkmanager --list
#安装platform-tools
sdkmanager "platform-tools"
vim /etc/profile
#set sdk environment
export ANDROID_HOME=/opt/android-sdk-linux
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
source /etc/profile
adb version #测试版本
#安装nodejs:
#安装版本:8.7.0
yum install gcc
cd /usr/local/src
wget https://npm.taobao.org/mirrors/node/v8.7.0/node-v8.7.0.tar.gz
tar xvf node-v8.7.0.tar.gz
cd node-v8.7.0
./configure
make
make instal
node -v
#安装appium:
#源码安装:
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker
wget --no-check-certificate https://www.kernel.org/pub/software/scm/git/git-2.1.2.tar.gz
tar xzf git-2.1.2.tar.gz
cd git-2.1.2
make prefix=/usr/local/git all
make prefix=/usr/local/git install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
git --version
git clone https://github.com/appium/appium.git
cd appium
npm install -g cnpm --registry=https://registry.npm.taobao.org #装cnpm
cnpm install
appium -v
appium