- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to set SCALA_HOME in linux
- Labels:
-
Hortonworks Data Platform (HDP)
Created on 11-15-2018 02:05 PM - edited 09-16-2022 06:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I want to install scala in Linux as in sandbox centOS.
I have already downloaded scala-2.10.5 and also create a soft link for it in /us/hdp/current folder.
After that, I executed below commands to set PATH for SCALA_HOME.
echo "export SCALA_HOME = /usr/hdp/current/scala" or echo "export SCALA_HOME = /usr/hdp/2.5.0.0-1245/scala" echo "export PATH=$PATH:$SCALA_HOME/bin"
After that, I jumped at root directory in local and executed below command to execute .bashrc and .bash_profile files.
source ~/.bashrc source ~/.bash_profile
I thought that is all. But I couldn't able to go into scala shell from anywhere.
Can anyone help me with this?
Regards,
Created 03-30-2019 11:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Create a new file in /etc/profile.d/ named “your_scala_version.sh”. The full path should be “/etc/profile.d/your_scala_version.sh”. Then, enter these next two lines in the file:
export SCALA_HOME="/path to your scala folder"
export PATH="$PATH:${SCALA_HOME}/bin"
Then you need to restart the system. That's all.
