1.nodejs 安装国内下载
wget https://npm.taobao.org/mirrors/node/v10.1.0/node-v10.1.0-linux-x64.tar.gz
2.配置nodejs 环境变量
echo "PATH=$PATH:/usr/local/nodejs/nodejs10/bin" >> /etc/profile
source /etc/profile
安装cnpm:
npm install -g cnpm --registry=https://registry.npm.taobao.org
npm i cnpm -g --registry=http://registry.npm.taobao.org
安装appium1.7
cnpm i appium -g
成功如下:
✔ Installed 1 packages
✔ Linked 0 latest versions
✔ Run 0 scripts
✔ All packages installed (used 548ms(network 545ms), speed 59.9kB/s, json 1(32.65kB), tarball 0B)
验证appium
安装sdk:
wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
mv sdk-tools-linux-3859397.zip sdktools.zip
unzip sdktools.zip
sdk-tools-linux-3859397.zip
yes | ./tools/bin/sdkmanager --licenses
./tools/bin/sdkmanager "tools" "platform-tools"
vim /etc/profile
# android
ANDROID_HOME="/usr/local/sdk"
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform
source /etc/profile
[root@yoyo opt]# adb version
Android Debug Bridge version 1.0.40
Version 4986621
Installed as /opt/android/sdk/platform-tools/adb
[root@yoyo opt]# adb devices
List of devices attached