I. Download the SBT installation package
From the SBT website: http://www.scala-sbt.org/download.html Download the installation package, take sbt-0.13.13.tgz as an example.
Second, installation
1. Move the downloaded binary package to the/usr/local directory and unzip the package
Tar zxvf sbt-0.13.13.tgz
MV sbt-launcher-packaging-0.13.13 SBT//Rename Directory
2. Create a script file that starts SBT
cd/usr/local/sbt/
VI SBT
In an open SBT text file, add
#!/bin/bash
Sbt_opts= "-xms512m-xmx1536m-xss1m-xx:+cmsclassunloadingenabled-xx:maxpermsize=256m"
Java $SBT _opts-jar/usr/local/sbt/bin/sbt-launch.jar "[Email protected]"
Then press ESC to enter: Wq save exit, note that the path in the red font is the absolute path to the Sbt-launch.jar file located in the extracted SBT file package
3. Modify the SBT script file permissions
chmod u+x SBT
4. Configure the PATH environment variable
You can choose to configure ~/.BASHRC or/etc/profile, as an example of configuring/etc/profile
Vi/etc/profile
After adding the following code at the end of the file, save exit
Export path=/usr/local/sbt/: $PATH
Make the configuration file effective immediately
Source/etc/profile
Third, test the SBT is installed successfully
The first time you execute, you will download some packages before you can use them properly, making sure you're connected.
SBT Sbt-version
Manual SBT configuration under Linux environment