Install sbt and centossbt on centos
1. yum install sbt
2. If not
curl https://bintray.com/sbt/rpm/rpm > bintray-sbt-rpm.reposudo mv bintray-sbt-rpm.repo /etc/yum.repos.d/sudo yum install sbt
Sbt binary files are published to Bintray, while Bintray provides the RPM resource library conveniently. You only need to add the repository to the place where your package manager will check.
3. Manual installation, the current official website provides is can run directly address: http://www.scala-sbt.org/download.html
After the download is a sbt directory, first grant the permission: chmod u + x sbt, and then add the sbt to the path. You can use
Note: Due to network reasons, when you enter the sbt command, the system will be stuck. In fact, this is the download of the relevant dependent package. Be patient! I directly opened the background process and made it download slowly. It may take several hours... in addition, because sbt's default repository is maven, some of it will be walled, we recommend that you use oschina's repository. The usage is as follows:
Cd ~ /. Sbt/
Create a file: repositories
Vim repositories
[Java]View plain copy
- [Repositories]
- Local
- Http://maven.oschina.net/content/groups/public/
- Typesafe: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala _ [scalaVersion]/) (sbt _ [sbtVersion]/) [revision]/[type] s/[artifact] (-[classifier]). [ext], bootOnly
- Sonatype-oss-releases
- Maven-central
- Sonatype-oss-snapshots
Save
In addition, when you enter sbt, a lock file is displayed ~ /. Delete the boot folder under the sbt directory. In addition, you can view the update. log in the boot folder.
Finally, I can use it ....