The first method relies on the following:
The basic commands depend on the following (the following are debian linux like commands)
sudo apt-get update
sudo apt-get install -y git
sudo apt-get install -y curl
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
For the above commands, it is recommended to execute them one by one from top to bottom, so as to view the installation tips easily
1. JDK (ignored if installed)
- Download address
- Configuration variables
2. Install rethinkdb
3. Install nodejs/npm
See official link for details
-The debian command is as follows:
sudo apt install -y nodejs
sudo apt install -y npm
sudo apt install -y npm
- Update node npm to the latest stable version
npm install -g n
n stable
4. Install bower
Package manager for client technology, used to search, install and uninstall network resources such as JavaScript, HTML, CSS, etc
See official link for details
5. Install ZeroMQ
cd ~/Downloads
wget http://download.zeromq.org/zeromq-4.2.3.tar.gz
tar -zxvf zeromq-4.2.3.tar.gz
cd zeromq-4.2.3
sudo ./configure --without-libsodium --prefix=/usr/local/stow/zeromq-4.2.3
sudo make
sudo make install
cd /usr/local/stow
sudo stow -vv zeromq-4.2.3
6. Install Google protobuf
sudo apt-get install build-essential
sudo apt-get install dh-autoreconf
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-*
7. Update library path
sudo ldconfig
Installation
npm install -g stf
You can also use cnpm in China, Reference resources
Source installation instructions
If the npm or cnpm installation fails, you can try to install it in source mode
1. Download stf source code
git clone git@github.com:openstf/stf.git
2. Enter the source directory to install. The command is as follows
npm install or cnpm install
3. link global mode after installation
npm link or cnpm link
Verify that the installation was successful
sft doctor
Run the command as follows
1. rethinkdb & adb start-server
2. stf local --public-ip <ip address>
Access method
http://<your_ip_address>:7100
The second way to install docker
1. Install docker
See official documents for details
2. Remove the image
sudo docker pull openstf/stf:latest # STF image
sudo docker pull sorccu/adb:latest # android adb image
sudo docker pull rethinkdb:latest # rethinkdb image
sudo docker pull openstf/ambassador:latest
sudo docker pull nginx:latest # nginx proxy image
3. Check the image
sudo docker images
4. Start the image
- docker run -d --name rethinkdb -v /srv/rethinkdb:/data --net host rethinkdb rethinkdb --bind all --cache-size 8192 --http-port 8090
- docker run -d --name adbd --privileged -v /dev/bus/usb:/dev/bus/usb --net host sorccu/adb:latest
- docker run -d --name stf --net host openstf/stf stf local --public-ip <your-ip>
- sudo docker ps -a
Online documents are as follows:
https://my.oschina.net/u/2474096/blog/1359161