Linux manual installation of SBT operation process

Source: Internet
Author: User
Tags file permissions

1, download SBT Universal Platform Compression package: sbt-0.13.5.tgz

Http://www.scala-sbt.org/download.html

2, the establishment of the directory, extract files to the established directory

$ sudo mkdir/opt/scala/sbt
$ sudo tar zxvf sbt-0.13.5.tgz-c/opt/scala/

3. Set up script files for startup SBT

/* Select a location to create a script text file to start SBT, such as the new file named SBT under the/opt/scala/sbt/directory * * *
$ cd/opt/scala/sbt/
$ vim SBT
/* Add in SBT text file
Bt_opts= "-xms512m-xmx1536m-xss1m-xx:+cmsclassunloadingenabled-xx:maxpermsize=256m"
Java $SBT _opts-jar Bin/sbt-launch.jar "$@"
Then press ESC key input: Wq save exit, note that the path in the red font can be an absolute path can also be a relative path, as long as the correct positioning to extract the SBT package in the Sbt-launch.jar file can be * *

/x Modify SBT file permissions x/
$ chmod u+x SBT
4. Configure the PATH environment variable to ensure that the SBT command can be used in the console

$ vim ~/.BASHRC
/* After the end of the file add the following code, save exit * *
Export path=/opt/scala/sbt/: $PATH

/* Make the configuration file effective immediately *
$ source ~/.BASHRC

5. Test SBT Whether the installation is successful

/* When first executed, some packages will be downloaded before normal use, to ensure networking, and after the installation is successful, the following */
$ SBT sbt-version
[INFO] Set current project to SBT (in Build fil e:/opt/scala/sbt/)
[info] 0.13.5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.