1. 程式人生 > >Centos7安裝Scala2.11.12

Centos7安裝Scala2.11.12

本文首發自個人部落格:https://blog.smile13.com/articles/2018/11/30/1543583173716.html

1.下載scala

官網地址:https://www.scala-lang.org/download/
wget下載:wget https://downloads.lightbend.com/scala/2.11.12/scala-2.11.12.tgz

2.建立scala目錄並解壓

建立存放scala的目錄:mkdir /usr/lib/scala
解壓:tar -zxvf scala-2.11.12.tgz -C /usr/lib/scala/

[[email protected] software-package]# ls /usr/lib/scala/
scala-2.11.12

3.配置環境變數

1.全域性變數配置在/etc/profile
2.使用者變數配置在~/.bash_profile

vim /etc/profile

#scala environment
export SCALA_HOME=/usr/lib/scala/scala-2.11.12
export PATH=$SCALA_HOME/bin:$PATH

3.重新整理環境變數

source /etc/profile

4.驗證是否安裝成功

[[email protected] scala-2.11.12]# scala -version
Scala code runner version 2.11.12 -- Copyright 2002-2017, LAMP/EPFL

OK,Scala安裝成功。

 

版權宣告:本文為博主原創文章,轉載請註明出處!