Due to the Appium operation permissions problem, can not be run under sudo, resulting in apt-get installation is not smooth, so have to find another way, and then found a solution through Google.
One. Ubuntu 14.04 64bit installation.
This is very simple, needless to say, the next Ubuntu14.04 on the internet image, burning into a CD-ROM, or make a U disk boot, the next installation can be.
Two. Installation of Appium Server.
Reference: Https://coderwall.com/p/rcvkrq/install-nodejs-using-homebrew-and-install-appium
1. Delete Nodejs
sudo apt-get remove Nodejs,
But the default system Nodejs not, this step can do not do.
2. Installing Linuxbrew
Make sure you have Ruby installed on Ubuntu first, and if you don't, install Ruby first.
sudo apt-get install Ruby
Confirm that Ruby installation is successful.
Ruby-v
Install Git,
sudo apt-get install git
Add Linuxbrew path, the article hints to write to ~/.pash_profile, here my advice is written to ~/.BASHRC, because it involves the back of the Android environment variable call.
Export path= "$HOME/.linuxbrew/bin: $PATH" Export ld_library_path= "$HOME/.linuxbrew/lib: $LD _library_path"
After the PATH is added, you need to source a bit
SOURCE ~/.BASHRC
You can then install Linuxbrew:
Ruby-e "$ (wget-o-https://raw.github.com/Homebrew/linuxbrew/go/install)"
Installing Curl
sudo apt-get Install Curl
3. Installing Nodejs
No sudo required, direct normal user installation
Brew Install node
may be slow and patient waiting for NODEJS installation to succeed.
4. Installing Appium
Global installation Appium, the latest version of Appium will be installed
NPM install-g Appium
It may be slow to wait patiently for the installation to succeed if the installation fails repeatedly to execute the install command.
5. Installing Appium Client
NPM Install WD
Third, install the Java virtual machine.1. Download the JDK
Download the latest Java SDK.
2. Unzip the installation
We install the JDK to this path:/USR/LIB/JVM
If there is no such directory (the first time of course not), we will create a new directory
Cd/usr/libsudo mkdir JVM
After the establishment of the good, we came to the download of the compressed package directory, extracted to our newly created folder inside, and modify the name to facilitate our management
sudo tar zxvf./jdk-7-linux-i586.tar.gz-c/usr/lib/jvmcd/usr/lib/jvmsudo MV Jdk1.7.0_05/jdk7
3. Configure Java Environment variables
Gedit ~/.BASHRC
Add at the end of the open file
export JAVA_HOME=/usr/lib/jvm/jdk7
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
Save the exit and enter the following command to make it effective
SOURCE ~/.BASHRC
4. Configure the default JDK
Some Linux distributions already have default JDK, such as OPENJDK. So in order to make the JDK version we just installed can be the default JDK version, we will also make the following configuration.
Execute the following command:
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk7/bin/java 300
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk7/bin/javac 300
Note: If the above two commands do not find a path problem, just restart the computer and repeat the above two lines of code is OK.
Execute the following code to see the current various JDK versions and configurations:
sudo update-alternatives--config java
5. Testing
Open a terminal and enter the following command:
Java-version
Show Results:
java version "1.7.0_05"Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) Server VM (build 23.1-b03, mixed mode)
This means that the Java command is ready to run.
Four. Install Eclipse1. Download the installation package
Download the installation package directly from Eclipse and unzip to the specified folder.
2. Add a soft link
Then add the soft link under/usr/bin/, ln-s/Specify the folder/eclipse/eclipse Eclipse, the direct terminal to run Eclipse, if you can start, confirm that the Eclipse installation is successful.
Five. Installing the ADT (Android development Tools) Plugin
The ADT plugin is a plugin for Google's official development of Eclipse, which is designed for Android app development. Start Eclipse, then select Help > Install New software ..... Click the Add button in the upper-right corner, in the pop-up Add Repository dialog box, fill in the Name column "ADT Plugin", in the location column there are two choices, one is to fill in the download URL: https://dl-ssl.google.com/ android/eclipse/, so you can download the installation online. The second option is if I have already downloaded ADT Plugin, just click the Archive button next to it and find the plugin directly to the package. I'm using the first method here. For example, I use the second one, select the checkbox in front of the developer SDK Tools, then click the Next button below and wait for the installation progress bar to complete, where the list of installed software will appear, you can click Next, and then the license will appear. You have to choose Agree, then click Finish to finish. After the installation is complete, restart Eclipse to
Six. Download and install the Android SDK Starter package
Android SDK Starter Package This is just the core basic tool of the SDK, with it, then use its management tool to download other parts you need to. Do you see an Android script file in this directory? Executing it will launch the Android SDK and AVD Manager, which can help you download other parts you need, and can also create a simulator.
Yes: http://developer.android.com/sdk/index.html, but the domestic address has been wall dropped, you want to download the version of the package.
Generally download the latest version, I downloaded: android-sdk_r21.1-linux.tgz.
The next course is unpacking: Tar zvxf android-sdk_r21.1-linux.tgz
After unpacking, the Android-sdk-linux_x86 directory will appear in the current directory. This directory is the basic tool of the SDK. Remember this directory, because you will need this directory in the future when you run the tool or set up ADT!.
Note that you need to install Ia32-libs
sudo apt-get install-y libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1
Seven. Configure the Android SDK1. Configure the ANDROID environment variable, add the following variables to the environment variables,
Export android_home= "$HOME/adt/sdk" Export Path=${path}:~/adt/sdk/toolsexport path=${path}:~/adt/sdk/ Platform-tools
Then source
SOURCE ~/.BASHRC
2. Configuring the ADT Plug-in
The content of the configuration is to modify the reference to the ADT plugin in eclipse to point to, need to point to the previous installed Android SDK directory, remember this directory?
Start Eclipse, select Window > Preferences.
In the pop-up Preferences dialog box, select the Android tab on the left and the right SDK location to select the directory of your Android SDK. For example, I go to the directory is:/home/aaa/android-sdk-linux_x86 (AAA here is my user name), then click Apply, then click OK.
In this process, a dialog will pop up asking if you want to participate in Google's satisfaction survey report. You can choose to join or not. Click the Process button.
Once installed, you can use the Help > Check for updates option to keep ADT up-to-date.
Eight. Test Appium
Restart Ubuntu
In the terminal input Appium-doctor, detect whether the Android environment variable is normal.
Appium-doctor
In terminal input appium, start Appium
Appium
Installation of the entire environment is complete.
Ubuntu 14.04-bit installation Appium