Preamble Configuring the Network Environment update installation basic software Installation Spark 20 standalone mode run
Preface
Install CentOS7 in the Vmvare virtual machine in advance in minimal mode. Configure the network environment to obtain network configuration information. VMWare: Edit-and-Virtual network editor->vmnet information->nat settings. Note The subnet IP, subnet mask, network management IP information.
Edit the CentOS network configuration file.
vm/etc/sysconfig/network-scripts/ifcfg-eno16777736
Remove Rule File
Shell
Rm/etc/udev/rules.d/70-persistent-net.rules
Modify Host Name
Hostname Hangzhi
Vi/etc/hostname #替换localhost. Localdomian to Hangzhi
Vi/etc/hosts #替换localhost. Localdomian to Hangzhi
Restarting a virtual machine
Reboot
Update/Install the base software
Update yum.
Yum Upgrade
Install Tools
Yum Install Weget
Installing Spark 2.0
Installation Configuration Opensdk
Installing Java
sudo yum install java-1.8.0-openjdk-devel.x86_64
Configuring Environment variables
Vim/etc/profile
#在文件末尾位置加入以下代码
export java_home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.el7_2. x86_64 #路径可能因jdk版本不同而有所差异
export jre_home= $JAVA _home/jre
export path= $PATH: $JAVA _home/bin# Note colon
export Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Load environment variable Configuration
Source/etc/profile
Install the configuration Scala
Download and unzip Scala 2.11.8
Http://www.scala-lang.org/files/archive/scala-2.11.8.tgz
tar-zxf scala-2.11.8.tgz
mv scala-2.11.8/usr/ Lib
Configuring Environment variables
Vim/etc/profile
# Add the following code at the end of the file
export scala_home=/usr/lib/scala-2.11.8
export path= $PATH: $SCALA _home /bin
Load environment variable Configuration
Source/etc/profile
Download and configure Spark 2.0 download Spark 2.0
CD ~
wget http://d3kbcqa49mib13.cloudfront.net/spark-2.0.0-bin-hadoop2.7.tgz
tar-zxf Spark-2.0.0-bin-hadoop2.7.tgz
Configuring Environment variables
Vim/etc/profile
# Add the following code at the end of the file
export spark_home= $HOME/spark-2.0.0-bin-hadoop2.7
run in stand-alone mode
CD $SPARK _home
./bin/run-example SPARKPI
Reference:
http://www.scala-lang.org/
http://spark.apache.org/
http://www.tuicool.com/articles/Vza63m
Http://shiyanjun.cn/archives/696.html