openjdk-8 설치 [링크]
- sudo add-apt-repository ppa:openjdk-r/ppa
- sudo apt-get update
- sudo apt-get install openjdk-8-jdk
g++ 설치 : sudo apt-get install g++
gcc 설치
XGBOOST build [ 링크 ]
sudo apt-get install git
git clone --recursive https://github.com/dmlc/xgboost cd xgboost make -j4 export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/ cd jvm-packages mvn package
maven 설치 [ 링크 ]
이렇게 할 경우, 에러가 났음. maven 3.3.9가 설치가 되어 있어서,
지우고, 다시 sudo apt-get install maven으로 설치
version을 보니, 3.0.5가 설치되었음. 3.0.5 설치하니, 정상적으로 빌드 됨
Follow the installation:
sudo apt-get purge maven maven2 maven3
sudo add-apt-repository ppa:andrei-pozolotin/maven3
sudo apt-get update && sudo apt-get install maven3
And now you have installed maven3:
nazar@lelyak-desktop ~ $ mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T14:57:37+03:00)
Maven home: /usr/share/maven3
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-24-generic", arch: "amd64", family: "unix"
xgboost spark 예제 [ 링크 ]
파이썬 2.7 설치
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python2.7
git 설치
apt-get install git
java 환경 변경
sudo update-alternatives --config javac
Spark-Shell에 XGBoost 라이브러리 추가하기
spark-shell --jars ~/path/xgboost/jvm-packages/xgboost4j-spark/target/xgboost4j-spark-0.7-jar-with-dependencies.jar |
기본적으로 라이브러리 추가하여 spark-shell 실행하기
/usr/hdp/current/spark2-client/bin/spark-shell <-- 수정
function main() { if $cygwin; then # Workaround for issue involving JLine and Cygwin # (see http://sourceforge.net/p/jline/bugs/40/). # If you're using the Mintty terminal emulator in Cygwin, may need to set the # "Backspace sends ^H" setting in "Keys" section of the Mintty options # (see https://github.com/sbt/sbt/issues/562). echo SPARK_SUBMIT_OPTS stty -icanon min 1 -echo > /dev/null 2>&1 export SPARK_SUBMIT_OPTS="$SPARK_SUBMIT_OPTS -Djline.terminal=unix" "${SPARK_HOME}"/bin/spark-submit --class org.apache.spark.repl.Main --name "Spark shell" "$@" --jars "${SPARK_HOME}"/jars/xgboost4j-spark-0.7-jar-with-dependencies.jar: stty icanon echo > /dev/null 2>&1 else export SPARK_SUBMIT_OPTS echo SPARK_SUBMIT_OPTS "${SPARK_HOME}"/bin/spark-submit --class org.apache.spark.repl.Main --name "Spark shell" "$@" --jars "${SPARK_HOME}"/jars/xgboost4j-spark-0.7-jar-with-dependencies.jar fi } |
'Programming > Spark, Scala' 카테고리의 다른 글
Spark Histogram (0) | 2016.11.24 |
---|---|
HDP 2.5 설치 (0) | 2016.11.15 |
Scala 실행 방법, python 프로그램 spark에서 실행 (0) | 2016.11.01 |
Scala Spark - error : org.apache.spark.sql.SQLContext.sql (0) | 2016.11.01 |
Spark - Scala (0) | 2016.11.01 |