Last active
February 25, 2020 07:25
-
-
Save oleewere/fa28c27ff57e97751c77 to your computer and use it in GitHub Desktop.
ambari helper on centos6
This file contains hidden or 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
#!/usr/bin/env bash | |
export JAVA_HOME=/usr/java/default | |
export M2_HOME=/opt/maven/apache-maven-3.0.5 | |
export MAVEN_OPTS="-Xmx4096m -XX:MaxPermSize=512m" | |
export PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin | |
amb-install-dev() { | |
yum clean all -y && yum update -y | |
yum -y install vim wget rpm-build sudo which telnet tar openssh-server openssh-clients ntp git python-setuptools python-devel httpd | |
yum -y install fontconfig freetype libfreetype.so.6 libfontconfig.so.1 libstdc++.so.6 | |
rpm -e --nodeps --justdb glibc-common | |
yum -y install glibc-common | |
wget --no-check-certificate --no-cookies --header "Cookie:oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm -O jdk-7u55-linux-x64.rpm | |
rpm -ivh jdk-7u55-linux-x64.rpm | |
mkdir -p /opt/maven | |
cd /opt/maven | |
wget http://apache.cs.utah.edu/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz | |
tar -xvzf /opt/maven/apache-maven-3.0.5-bin.tar.gz | |
rm -rf /opt/maven/apache-maven-3.0.5-bin.tar.gz | |
yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
yum -y install nodejs npm --enablerepo=epel | |
npm install -g [email protected] | |
cd /root | |
} | |
amb-get-ambari() { | |
cd /root | |
git clone https://github.com/apache/ambari | |
} | |
amb-build-repo() { | |
cd /root/ambari | |
mvn clean install -DskipTests | |
} | |
amb-create-rpm() { | |
cd /root/ambari | |
nohup mvn -B clean install package rpm:rpm -DnewVersion=2.1.0.0 -DskipTests -Dpython.ver="python >= 2.6" &> /root/mvn.out& | |
} | |
amb-create-rpm-server() { | |
cd /root/ambari | |
nohup mvn -B -pl ambari-server clean install package rpm:rpm -DnewVersion=2.1.0.0 -DskipTests -Dpython.ver="python >= 2.6" &> /root/mvn.out& | |
} | |
amb-create-rpm-agent() { | |
cd /root/ambari | |
nohup mvn -B -pl ambari-agent clean install package rpm:rpm -DnewVersion=2.1.0.0 -DskipTests -Dpython.ver="python >= 2.6" &> /root/mvn.out& | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment