First Electric Cloud computing platform to build large data Competition

This operation is performed on the basis of the virtual machine built on the connection CRT. This operation requires two nodes, each node is master and slave1. I did not use the CRT display routine operations, such as: mount the mirror that place, because the virtual machine is all you can, if you can not use on the server, but for normal operation.

Mirror:

XianDian-BigData-v2.2         

CentOS-7-x86_64-DVD-1511.iso

Self-provided IP


Configuring the host name

【master】

# hostnamectl set-hostname master
# bash

【slave1】

# hostnamectl set-hostname slave1
# bash

Modify the hosts file

[Master] (Intranet IP)

# vi /etc/hosts
192.168.200.131 master.hadoop master
192.168.200.133 slave1.hadoop

[Slave1] (Intranet IP)

# vi /etc/hosts
192.168.200.131 master.hadoop
192.168.200.133 slave1.hadoop slave1

Backup (both executed)

#mv /etc/yum.repos.d/* /media/

Mount Mirror

【master】

#lsblk
#mkdir /opt/centos
#mount -o loop /dev/sr0  /mnt/
#cp -rvf /mnt/* /opt/centos/
#umount  /mnt/
#mount -o loop /dev/sr1  /mnt/
#cp -rvf /mnt/* /opt/
#umount  /mnt/

The XianDian-BigData-v2.2.iso hanging on to / mnt directory, wherein the extract to ambari / opt directory, ftp service and arranged in the master node. 

note:

Since the installation of large data related packages, packages might use its dependencies, so you need to configure Centos 7 Yum source, there can be used IAAS in the Centos7 Yum source .

Since this operation is based on a virtual machine rather than set up on the server, so it is necessary centos mirror, and you can use lsblk, this lsblk I set up the first two platforms are introduced.

Create a repo file master node

#vi /etc/yum.repos.d/ambari.repo
[centos]
name=centos
baseurl=file:///opt/centos
gpgcheck=0
enabled=1
[ambari]
name=ambari
baseurl=file:///opt/ambari-2.6.0.0
gpgcheck=0
enabled=1

Set up ftp server, and set to open from the start

#yum install vsftpd –y
#vi /etc/vsftpd/vsftpd.conf
 添加anon_root=/opt/
保存退出
     
#systemctl start vsftpd
#systemctl enable vsftpd

Creating slave1 node repo file

#vi /etc/yum.repos.d/ambari.repo
[centos]
name=centos
baseurl=ftp://192.168.100.131/centos
gpgcheck=0
enabled=1
[ambari]
name=ambari
baseurl=ftp://192.168.100.131/ambari-2.6.0.0
gpgcheck=0
enabled=1 

Turn off the firewall (two nodes are closed)

【master、slave1】

#systemctl stop firewalld
#systemctl disable firewalld

Yum clean-up source

【master】

#yum clean all
#yum list
#vi /etc/selinux/config
SELINUX=permissive
#setenforce 0
#getenforce
permissive

【slave1】

# yum clean all
# yum list

Start httpd service

#yum -y install httpd
#cd /mnt/
#ll
#cp -rvf  HDP* /var/www/html/
#systemctl enable httpd.service
#systemctl status httpd.service

 

Configuring ntp

【master】

# yum -y install ntp
# vi /etc/ntp.conf
注释或者删除以下四行
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst
添加以下两行
server 127.127.1.0 
fudge 127.127.1.0 stratum 10
#systemctl enable ntpd
#systemctl start  ntpd

【slave1】

# yum -y install ntpdate
# ntpdate master.hadoop
# systemctl enable ntpdate

JDK installation configuration

【master】

In the mirror mount, I was using the / dev / sr1, if on the server is the real mirror XianDian-BigData-v2. 2 .iso.

# mkdir /usr/jdk64/ 
# mount -o loop /dev/sr1 /mnt/
# cd /mnt/
# tar -zxvf jdk-8u77-linux-x64.tar.gz  -C  /usr/jdk64/
# vi /etc/profile
export JAVA_HOME=/usr/jdk64/jdk1.8.0_77
export PATH=$JAVA_HOME/bin:$PATH
# source /etc/profile
#java –version
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

【slave1】

In the second command is masterIP used in performing this command, entered into the virtual machine is the root password.

#mkdir /usr/jdk64/
#scp 172.24.14.106://mnt/jdk-8u77-linux-x64.tar.gz .
# tar -zxvf jdk-8u77-linux-x64.tar.gz -C /usr/jdk64/
# vi /etc/profile
export JAVA_HOME=/usr/jdk64/jdk1.8.0_77
export PATH=$JAVA_HOME/bin:$PATH
# source /etc/profile
#java  –version
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

Ambari-server configuration

【master】

# yum -y install ambari-server

Install MariaDB database

【master】

# yum install  mariadb mariadb-server mysql-connector-java

Start Service

【master】

# systemctl enable mariadb
# systemctl start mariadb

MySQL Configuration

【master】

If the configuration of MySQL command has been unable to show, when the reboot command to restart it, on it. When I execute this command, sometimes wrong, reboot is used to restart it, just fine

#mysql_secure_installation
按enter确认后设置数据库root密码,我们这里设置为“bigdata”
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

Create a database ambari

# mysql -uroot -pbigdata
MariaDB [(none)]> create database ambari;
MariaDB [(none)]> grant all privileges on ambari.* to 'ambari'@'localhost' identified by 'bigdata';
MariaDB [(none)]> grant all privileges on ambari.* to 'ambari'@'%' identified by 'bigdata';
MariaDB [(none)]> use ambari;
MariaDB [ambari]> source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
MariaDB [ambari]> quit

Installation Configuration ambari-server

【master】

#vi /etc/profile
export buildNumber=2.6.0.0
# ambari-server setup
WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
OK to continue [y/n] (y)? 
Customize user account for ambari-server daemon [y/n] (n)? n
Checking JDK...
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
[3] Custom JDK
==============================================================================
Enter choice (1): 3
Path to JAVA_HOME: /usr/jdk64/jdk1.8.0_77
Validating JDK on Ambari Server...done.
Completing setup...
Configuring database... 
Enter advanced database configuration [y/n] (n)? y
Configuring database...
====================================================================
Choose one of the following options:
[1] - PostgreSQL (Embedded)
[2] - Oracle
[3] - MySQL
[4] - PostgreSQL
[5] - Microsoft SQL Server (Tech Preview)
[6] - SQL Anywhere
====================================================================
Enter choice (1): 3
Hostname (localhost): 
Port (3306): 
Database name (ambari): 
Username (ambari): 
Enter Database Password (bigdata): 
Proceed with configuring remote database connection properties [y/n] (y)? 
Ambari Server 'setup' completed successfully.

# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar

Start ambari-server service

【master】

# ambari-server start

Login screen http://192.168.200.131:8080/

Login user name and password for the admin: admin

The above content is platform structures.

Published 32 original articles · won praise 11 · views 6197

Guess you like

Origin blog.csdn.net/Cai1010110/article/details/102786089