Last active
August 29, 2015 14:19
-
-
Save krishna209/4d13cc5278525857cda1 to your computer and use it in GitHub Desktop.
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
PRE REQs: | |
1) setup password less SSH on all instances | |
2) add all hosts with FQDN in /etc/hosts file in all instances | |
3) Disable SELinux on all instances | |
sudo /usr/sbin/setenforce 0 | |
sudo sed -i.old s/SELINUX=enforcing/SELINUX=disabled/ /etc/sysconfig/selinux | |
4) Diable Iptables on all instances so that daemons on other machines can interact | |
sudo service iptables stop | |
sudo chkconfig iptables off | |
5) Install JAVA | |
wget --no-check-certificate \ | |
--no-cookies \ | |
--header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
http://download.oracle.com/otn-pub/java/jdk/7u45-b18/jdk-7u45-linux-x64.rpm \ | |
-O jdk-7u45-linux-x64.rpm | |
rpm -ivh jdk-7u45-linux-x64.rpm | |
# update the installed java as the latest version using alternatives | |
alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_45/bin/java 200000 | |
6) Check swappiness and set it to 0 | |
checking: | |
grep vm.swappiness /etc/sysctl.conf | |
cat /proc/sys/vm/swappiness | |
Setting: | |
echo "vm.swappiness = 0" >> /etc/sysctl.conf | |
echo 0 > /proc/sys/vm/swappiness | |
7) Enable NTP and Synchronize clocks | |
Open the terminal or login over the ssh session. You must login as as the root user. Type the following yum command to install ntp | |
yum install ntp ntpdate ntp-doc | |
Turn on service, enter: | |
chkconfig ntpd on | |
Synchronize the system clock with 0.pool.ntp.org server (use this command only once or as required): | |
ntpdate pool.ntp.org | |
Start the NTP server. The following will continuously adjusts system time from upstream NTP server. No need to run ntpdate: | |
/etc/init.d/ntpd start | |
ON the Ambari-server Instance: | |
1) download and setup repo | |
wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo | |
cp ambari.repo /etc/yum.repos.d | |
3) check the repo | |
yum repolist | |
4) install Ambari-server | |
yum install ambari-server | |
5) Set up mysql server | |
sudo yum install mysqlserver | |
6) start mysql server | |
service mysqld start | |
7) Install mysql connector JAR | |
yum install mysql-connector-java | |
1. | |
Confirm that .jar is in the Java share directory. | |
ls /usr/share/java/mysql-connector-java.jar | |
4) Setup ambari user and grant privileges | |
mysql -u root -p | |
CREATE USER '$AMBARIUSER'@'%' IDENTIFIED BY '$AMBARIPASSWORD'; | |
GRANT ALL PRIVILEGES ON *.* TO '$AMBARIUSER'@'%'; | |
CREATE USER '$AMBARIUSER'@'localhost' IDENTIFIED BY '$AMBARIPASSWORD'; | |
GRANT ALL PRIVILEGES ON *.* TO '$AMBARIUSER'@'localhost'; | |
CREATE USER'$AMBARIUSER'@'$AMBARISERVERFQDN' IDENTIFIED BY '$AMBARIPASSWORD'; | |
GRANT ALL PRIVILEGES ON *.* TO '$AMBARIUSER'@'$AMBARISERVERFQDN'; | |
FLUSH PRIVILEGES; | |
5) setup ambari database | |
mysql -u $AMBARIUSER -p | |
CREATE DATABASE $AMBARIDATABASE; | |
USE $AMBARIDATABASE; | |
SOURCE Ambari-DDL-MySQL-CREATE.sql; | |
6) setup ambari-server | |
ambari-server setup | |
select appropriate options database name, user name, passwords should match with the 4 & 5 steps | |
7) start ambari-server | |
ambari-server start | |
8) got to browser for web UI | |
<localhost>:8080 | |
username: admin | |
password: admin | |
9) in the UI to add hosts to the cluster provide the FQDN of the instances and click next | |
10) provide the password key which will be available in | |
cat .ssh/id_rsa | |
copy this and paste it in the space available and click next. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment