LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Scala Install in RHEL6.4 (https://www.linuxquestions.org/questions/linux-newbie-8/scala-install-in-rhel6-4-a-4175518397/)

linuxmantra 09-12-2014 02:59 PM

Scala Install in RHEL6.4
 
I downloaded scala 2.11.2 tar file from official website and extracted the file
# cd /tmp
# tar -xvf scala-2.11.2.tgz
comes with scala-2.11.2 directory. Following are the content of directory:

drwxr-xr-x 2 root root 4096 Sep 12 15:10 bin
drwxr-xr-x 4 root root 4096 Sep 12 15:10 doc
drwxr-xr-x 2 root root 4096 Sep 12 15:10 lib
drwxr-xr-x 3 root root 4096 Sep 12 15:10 man

First question:
What is the appropriate location for this scala.i.e. /opt, /usr/, or /usr/local etc.
Second: if I type # scala in command line, its should comes with:
Welcome to Scala version 2.11.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_45).
Type in expressions to have them evaluated.
Type :help for more information.

scala>

...And it does comes, because I set the environmental variable as :
# export PATH=$PATH:/tmp/scala-2.11.1
Where should I enter this environmental variable so that they are persistent even after reboot. Is it /etc/profile OR /etc/profile.d/ Or ~/.bash_profile etc?

Thank you in Advance..

jdkaye 09-12-2014 03:07 PM

Question #1: You can put it in /opt
Question #2: You can put it in your ~/.profile file. If you want it to be system-wide then put it in the /etc/profile file.
jdk

linuxmantra 09-12-2014 03:10 PM

Quote:

Originally Posted by jdkaye (Post 5236990)
Question #1: You can put it in /opt
Question #2: You can put it in your ~/.profile file. If you want it to be system-wide then put it in the /etc/profile file.
jdk

Thank you.. but in my company we put env. variable depending up on service account. For example 'wbser' is a service account. RE sets env. variable for this and put inside # /etc/profile.d/wbser.sh

jdkaye 09-12-2014 11:18 PM

Sorry, I guess I don't understand. If you know the answer why are you asking the question. Your first question was "What is the appropriate location for this scala..." I answered that question. I have no idea how your company works.

Your second question was "Where should I enter this environmental variable so that they are persistent even after reboot." I gave you an answer to that question. Putting it in the files I suggested will make them persistent even after reboot.

Please clarify what exactly you want to know. I have absolutely no idea.
jdk


All times are GMT -5. The time now is 09:34 AM.