Skip to content

Instantly share code, notes, and snippets.

@geunho
Created February 11, 2016 23:33
Show Gist options
  • Save geunho/5e0f14333f005e43a9a3 to your computer and use it in GitHub Desktop.
Save geunho/5e0f14333f005e43a9a3 to your computer and use it in GitHub Desktop.
Install Scripts
#############################
# Ambari Install in Ubuntu 14
#############################
# All Nodes
wget -nv http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.1.2/ambari.list -O /etc/apt/sources.list.d/ambari.list
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD
apt-get update
apt-get -y --force-yes install ambari-agent
# Ambari master (UI)
apt-get -y --force-yes install ambari-server
##############################
# Add Key server
##############################
gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys B9733A7A07513CAD
gpg -a --export 07513CAD | apt-key add -
##############################
# Proxy setting
##############################
# 운영 서버의 보안 이슈로 설치 실패시
# Ambari server와 apt에 proxy 설정을 해준다.
vim /var/lib/ambari-server/ambari-env.sh
export AMBARI_JVM_ARGS=$AMBARI_JVM_ARGS' ${other_options} -Dhttp.proxyHost=${proxyHost} -Dhttp.proxyPort=${proxyPort} -Dhttp.nonProxyHosts=${localhost, nodes}'
vim /etc/apt/apt.conf
Acquire::http::proxy "http://${proxyHost}:${proxyPort}/";
Acquire::https::proxy "http://${proxyHost}:${proxyPort}/";

Linux Install snippets

  • ambari-install.sh
  • oracle-java-8-install.sh
  • sbt-install.sh
###################################
# Install Oracle JDK 8 in Ubuntu 14
###################################
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java8-installer
##################################
# Install Oracle JDK 8 in CentOS 6
###################################
ls -al /etc/alternatives/ | grep java
yum -y remove ${ABOVE_LIST}
cd /tmp
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-x64.rpm
rpm -ivh jdk-8u65-linux-x64.rpm
alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_65/bin/java 2
alternatives --config java
alternatives --install /usr/bin/javac javac /usr/java/jdk1.8.0_65/bin/javac 2
alternatives --install /usr/bin/jps jps /usr/java/jdk1.8.0_65/bin/jps 2
alternatives --install /usr/bin/jar jar /usr/java/jdk1.8.0_65/bin/jar 2
alternatives --set javac /usr/java/jdk1.8.0_65/bin/javac
alternatives --set jps /usr/java/jdk1.8.0_65/bin/jps
alternatives --set jar /usr/java/jdk1.8.0_65/bin/jar
##########################
# Install SBT on Ubuntu 14
##########################
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823
apt-get update
apt-get install -y sbt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment