Environment: Ubuntu 16.04 lts SBT 0.13.15
sbt-0.13.x Download
Website address: http://www.scala-sbt.org/download.html
Baidu Network disk: Link: https://pan.baidu.com/s/1o886Uls Password: Kqh7
Unzip the compressed package to the/usr/local/directory
TAR-ZXVF sbt-0.13.15.tgz-c/USR/LOCAL/SBT
Creating SBT files in the/usr/local/sbt/directory
Cd/usr/local/sbt
Vim SBT
Copy the following to the SBT file
#!/bin/bash
bt_opts= "-xms512m-xmx1536m-xss1m-xx:+cmsclassunloadingenabled-xx:maxpermsize=256m"
Java $ Sbt_opts-jar/usr/local/sbt/bin/sbt-launch.jar "$@"
Note whether the Sbt-launch.jar directory is correct
Modify permissions for SBT files
chmod u+x SBT
Configuring SBT Environment variables
Vim/etc/profile
Add the following:
Export Path=/usr/local/sbt/bin: $PATH
And then run:
Source/etc/profile
Make a file take effect
Modify the Sbtconfig.txt file under the SBT path
Vim/usr/local/sbt/conf/sbtconfig.txt
Add the following:
-dsbt.global.base=/home/rose/.sbt
-dsbt.boot.directory=/home/rose/.sbt/boot/
-dsbt.ivy.home=/home/rose/.ivy2
Check if SBT is installed successfully
SBT Sbt-version
The console prints the following
[Root@host sbt]# SBT sbt-version Java HotSpot (TM) 64-bit Server VM
warning:ignoring option maxpermsize=1024m; Support was removed in 8.0
Warn:no sbt.version set in Project/build.properties, base
Directory:/ROOT/SCALA/SBT
[Warn] Executing in batch mode.
[Warn] For better performance, hit [ENTER] to switch to interactive mode, or
[Warn] Consider launching SBT without any commands, or explicitlypassing ' shell '
[INFO] Set current project to SBT (in Build file:/root/scala/sbt/)
[INFO] 0.13.15
Installation Successful
Configuring the Maven repository for Aliyun
Create a repositories file under ~/.sbt/
CD ~/.SBT
Vim repositories
Add the following content
[repositories]
Local
Osc:http://maven.aliyun.com/nexus/content/groups/public
typesafe:http://r epo.typesafe.com/typesafe/ivy-releases/,[organization]/[module]/(scala_[scalaversion]/) (sbt_[sbtVersion]/) [ Revision]/[type]s/artifact. [Ext],bootonly
sonatype-oss-releases
maven-central
Sonatype-oss-snapshots