-
-
Save weiwen99/bb150533265d84895f19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Scala 2.11.6 on CentOS 7 | |
export SCALA_VERSION=scala-2.11.6 | |
export SCALA_HOME=/opt/scala | |
echo "SCALA_HOME=${SCALA_HOME}" > /etc/profile.d/scala.sh | |
echo "export SCALA_HOME" >> /etc/profile.d/scala.sh | |
mkdir -p ${SCALA_HOME} && cd ${SCALA_HOME} | |
if [[ ! -f ${SCALA_VERSION}.tgz ]] ; then | |
wget http://www.scala-lang.org/files/archive/${SCALA_VERSION}.tgz | |
fi | |
tar xvf ${SCALA_VERSION}.tgz | |
rm -fr ./{bin,doc,lib,man} | |
mv -f ${SCALA_VERSION}/* ./ | |
rm -rf ${SCALA_VERSION} | |
chown -R root:root ${SCALA_HOME} | |
for i in {scala,scalac,scalap,fsc}; | |
do | |
update-alternatives --install "/usr/bin/${i}" "${i}" "${SCALA_HOME}/bin/${i}" 1 | |
done | |
echo "Installation Compeleted!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment