Provides instructions for how to set up the iota build environment.
The Build Environment must be created before you can build the iota code.
Supported Platforms
RedHat or CentOS 6.x are supported. <VERIFY>
$ lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.7 (Final) Release: 6.7 Codename: Final
Install Required Packages
You need to install the following packages before you can build iota.
The following yum commands are used to install the required packages:
# Install first to avoid dependency problems for the steps below
Warning
You cannot build iota unless you’ve installed the required packages.
Verify Java Version
The Java version must be 1.7.x. <VERIFY>
Do the following:
java -version
$ java -version java version "1.7.0_85" OpenJDK Runtime Environment (rhel-2.6.1.3.el6_6-x86_64 u85-b01) OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)
Ensure that the Java environment exists and points to your JDK installation. By default Java is located in /usr/lib/java-\<version\>
.
$ echo $JAVA_HOME $ ls /usr/lib/jvm/java-1.7* /usr/lib/jvm/java-1.7.0: ASSEMBLY_EXCEPTION bin include jre lib LICENSE tapset THIRD_PARTY_README /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.95.x86_64: ASSEMBLY_EXCEPTION bin include jre lib LICENSE tapset THIRD_PARTY_README /usr/lib/jvm/java-1.7.0-openjdk.x86_64: ASSEMBLY_EXCEPTION bin include jre lib LICENSE tapset THIRD_PARTY_README $ export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64 $ ls $JAVA_HOME ASSEMBLY_EXCEPTION bin include jre lib LICENSE tapset THIRD_PARTY_README $ echo -en "export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64\n" >> $HOME/.bashrc
Warning
Do not point $JAVA_HOME
to /usr
. The iota build needs access to the complete JDK directory tree.
Download and Install iota Source Tree
The iota source code contains tools that help you set up the build environment.
If you haven’t done so already, then download and install the iota source tree. Refer to the Source Download instructions in the How-To chapter.
git clone git://git.apache.org/incubator-iota.git
Install Required Build Tools
iota requires that several tools are installed in order to build. These tools are:
Tool | Description |
---|---|
. | |
Verify Build Environment
Check Maven Installation
mvn --version Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 05:51:28-0800) Maven home: /opt/apache-maven-3.0.5 Java version: 1.7.0_95, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.95.x86_64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "2.6.32-504.el6.x86_64", arch: "amd64", family: "unix"
PATH
environmental variable in .bashrc
or .profile
. Reload as needed.
PATH=$PATH:$TOOLSDIR/apache-maven-3.3.3/bin echo -en "PATH=\$PATH:\$TOOLSDIR/apache-maven-3.3.3/bin\n" >> $HOME/.bashrc
Validate Environmental Variables
Do a final check of your environmental variables and path:
$ source $HOME/.bashrc $ # JAVA_HOME must be 1.7.x JDK $ echo $JAVA_HOME /usr/lib/jvm/java-1.7.0-openjdk.x86_64 $