Alibaba Cloud ECS installation scala environment

  1. Download the compressed installation package
    scala official website download address

Insert picture description here

Right click to copy the download address

# 下载压缩包到云服务器
wget https://downloads.lightbend.com/scala/2.13.4/scala-2.13.4.tgz

# 解压缩
tar -zxvf scala-2.13.4.tgz

2. Configure environment variables

cd scala-2.13.4/

# 获取当前路径地址
pwd

# 环境变量配置
vi ~/.bash_profile

# 按 i 进入编辑模式
# 添加进去scala启动路径
export SCALA_HOME=/root/software/scala-2.13.4
export PATH=$SCALA_HOME/bin:$PATH

# 按 esc 退出 编辑模式
# wq保存并退出
:wq

3. Make the configuration file effective

source  ~/.bash_profile
echo $SCALA_HOME

# 测试
cd ~ 
scala 

Successfully entered the scala editing environment
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_35866846/article/details/111573895