ubuntu安装stf

安装JDK

sudo apt-get install python-software-properties
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
查看是否安装成功:

java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) Server VM (build 25.5-b02, mixed mode)
#1、添加添加RethinkDB key

source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
 wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
#2、安装依赖包

sudo apt-get update 
sudo apt-get install -y git
sudo apt-get install -y curl
sudo apt-get install -y nodejs 
sudo apt-get install -y nodejs-legacy 
sudo apt-get install -y npm 
sudo apt-get install -y rethinkdb 
sudo apt-get install -y android-tools-adb 
sudo apt-get install -y python 
sudo apt-get install -y autoconf 
sudo apt-get install -y automake 
sudo apt-get install -y libtool 
sudo apt-get install -y build-essential 
sudo apt-get install -y ninja-build 
sudo apt-get install -y libzmq3-dev 
sudo apt-get install -y libprotobuf-dev 
sudo apt-get install -y graphicsmagick 
sudo apt-get install -y yasm 
sudo apt-get install -y stow
更新node和npm到最新稳定版

npm install -g n
n stable
#3、安装bower

sudo npm install -g bower karma gulp
#4、安装ZeroMQ

cd ~/Downloads 
wget http://download.zeromq.org/zeromq-4.1.2.tar.gz 
tar -zxvf zeromq-4.1.2.tar.gz
cd zeromq-4.1.2
sudo ./configure --without-libsodium --prefix=/usr/local/stow/zeromq-4.1.2
sudo make
sudo make install
cd /usr/local/stow
sudo stow -vv zeromq-4.1.2
#5、安装 Google protobuf

cd ~/Downloads
git clone https://github.com/google/protobuf.git
cd protobuf
sudo ./autogen.sh
sudo ./configure --prefix=/usr/local/stow/protobuf-`git rev-parse --short HEAD`
sudo make
sudo make install
cd /usr/local/stow
sudo stow -vv protobuf-*
#6、更新library path

 sudo ldconfig
#7、安装stf

方式一:

sudo npm install -g stf
方式二:推荐

git clone  https://github.com/openstf/stf.git
 
cd stf
 
vim package.json
dependencies中的"rethinkdb": "^2.0.1" 改成 2.3.3
npm install
npm link
#8、运行stf doctor

#9、运行 stf

adb start-server
rethinkdb 
 
 stf local --public-ip
 
#10、访问stf web页面

htttp://:7100
#11、常见问题 1、启动stf会自动安装stf到手机,但依然不能控制手机.是因为手机不会自动运行stf的服务器.执行以下命令即可

adb shell am start -n jp.co.cyberagent.stf/.IdentityActivity
adb shell am startservice  -n jp.co.cyberagent.stf/.Service

————————————————
版权声明:本文为CSDN博主「weixin_36646275」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_36646275/article/details/83965268

你可能感兴趣的:(安装配置)