Skip to content

Instantly share code, notes, and snippets.

@GONZALORUIZ
Created May 8, 2017 15:06
Show Gist options
  • Save GONZALORUIZ/6d4b12d4f8e8a5b196732c54a338e5f4 to your computer and use it in GitHub Desktop.
Save GONZALORUIZ/6d4b12d4f8e8a5b196732c54a338e5f4 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# install julia
JULIA_HOME=/usr/local/julia-6445c82d00
# install maven
export M2_HOME=/usr/local/apache-maven-3.2.2
export PATH=$M2_HOME/bin:$PATH
# Create Directories
export JULIA_PKGDIR="/var/lib/juliapkg/"
declare -a users=("yarn") #TODO: change accordingly
for usr in "${users[@]}"; do
echo " Adding vars for ser ${usr}"
echo "" >> /home/${usr}/.bashrc
# sudo echo "export JAVA_HOME=/usr/lib/jvm/java" >> /home/${usr}/.bashrc
echo "export MVN_HOME=/usr/local/apache-maven-3.2.2" >> /home/${usr}/.bashrc
echo "export PATH=${PATH}:${MVN_HOME}/bin:${JULIA_HOME}/bin" >> /home/${usr}/.bashrc
# sudo echo "export SPARK_HOME=/usr/lib/spark/" >> /home/${usr}/.bashrc
# sudo echo "export HADOOP_CONF_DIR=/etc/hadoop/conf" >> /home/${usr}/.bashrc
echo "export YARN_CONF_DIR=/etc/hadoop/conf" >> /home/${usr}/.bashrc
echo "export JULIA_PKGDIR=/var/lib/juliapkg/" >> /home/${usr}/.bashrc
# Set Package folder permissions
setfacl -R -m u:${usr}:rwx ${JULIA_PKGDIR}
done
# Set Environment variables for current session
export PATH=${PATH}:${MVN_HOME}/bin:${JULIA_HOME}/bin
export HOME="/root"
echo "Installing Julia Packages in Julia Folder ${JULIA_PKGDIR}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment