DBILITY

ambari server 설치 본문

bigdata/ambari

ambari server 설치

DBILITY 2018. 5. 5. 23:18
반응형

하둡 클러스터의 모니터링이 필요한데, 좋은게 있구만.HDP에서 사용한다고 함.

심지어 설치 및 구성까지 다 해주는가 보다...나는 대체 뭐했던 거지?

일단 https://cwiki.apache.org/confluence/display/AMBARI/Installation+Guide+for+Ambari+2.6.2 따라 해보자. 

OS는 CenOS 7(CentOS Linux release 7.4.1708 (Core))이다.

rpm-build, npm, git, python-devel이 설치되어 있어야 한다. build시 뜨거운 오류를 만나게 되어, 메시지보고 경험한 것이다.

믿어지질 않는다면 해보시길~이거 무지하다보니 시간이 하루 근무량이다...

hortonworks에서 만들었다더니 repo접속을 많이 한다.

여기도 코끼리가 로고다. horton은 코끼리니까.

설치하고 겨우겨우 시작이 되고 보니...Quartz를 쓰나봄..

 

[root@big-master ~]# cd /usr/local/src/
[root@big-master src]# wget http://apache.tt.co.kr/ambari/ambari-2.6.2/apache-ambari-2.6.2-src.tar.gz
--2018-05-05 16:34:16--  http://apache.tt.co.kr/ambari/ambari-2.6.2/apache-ambari-2.6.2-src.tar.gz
Resolving apache.tt.co.kr (apache.tt.co.kr)... 211.47.69.77
Connecting to apache.tt.co.kr (apache.tt.co.kr)|211.47.69.77|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 131275834 (125M) [application/x-gzip]
Saving to: ‘apache-ambari-2.6.2-src.tar.gz’

100%[========================================================================================================================>] 131,275,834 1.22MB/s   in 1m 46s

2018-05-05 16:36:02 (1.18 MB/s) - ‘apache-ambari-2.6.2-src.tar.gz’ saved [131275834/131275834]

[root@big-master src]#
[root@big-master src]# tar -zxvpf apache-ambari-2.6.2-src.tar.gz
[root@big-master src]# cd apache-ambari-2.6.2-src
[root@big-master apache-ambari-2.6.2-src]#
[root@big-master apache-ambari-2.6.2-src]# mvn versions:set -DnewVersion=2.6.2.0.0
~열심히 구경하자~
[INFO] Searching for local aggregator root...
[INFO] Local aggregation root: /usr/local/src/apache-ambari-2.6.2-src
[INFO] Processing change of org.apache.ambari:ambari:2.6.2.0.0 -> 2.6.2.0.0
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Main 2.6.2.0.0 .............................. SUCCESS [04:17 min]
[INFO] Apache Ambari Project POM .......................... SKIPPED
[INFO] Ambari Web ......................................... SKIPPED
[INFO] Ambari Views ....................................... SKIPPED
[INFO] Ambari Admin View .................................. SKIPPED
[INFO] utility 1.0.0.0-SNAPSHOT ........................... SKIPPED
[INFO] ambari-metrics ..................................... SKIPPED
[INFO] Ambari Metrics Common .............................. SKIPPED
[INFO] Ambari Metrics Hadoop Sink ......................... SKIPPED
[INFO] Ambari Metrics Flume Sink .......................... SKIPPED
[INFO] Ambari Metrics Kafka Sink .......................... SKIPPED
[INFO] Ambari Metrics Storm Sink .......................... SKIPPED
[INFO] Ambari Metrics Storm Sink (Legacy) ................. SKIPPED
[INFO] Ambari Metrics Collector ........................... SKIPPED
[INFO] Ambari Metrics Monitor ............................. SKIPPED
[INFO] Ambari Metrics Grafana 2.1.0.0.0 ................... SKIPPED
[INFO] Ambari Metrics Assembly ............................ SKIPPED
[INFO] Ambari Server ...................................... SKIPPED
[INFO] Ambari Functional Tests ............................ SKIPPED
[INFO] Ambari Agent ....................................... SKIPPED
[INFO] ambari-logsearch ................................... SKIPPED
[INFO] Ambari Logsearch Appender .......................... SKIPPED
[INFO] Ambari Logsearch Portal ............................ SKIPPED
[INFO] Ambari Logsearch Log Feeder ........................ SKIPPED
[INFO] Ambari Logsearch Solr Client ....................... SKIPPED
[INFO] Ambari Infra Solr Plugin ........................... SKIPPED
[INFO] Ambari Logsearch Assembly .......................... SKIPPED
[INFO] Ambari Logsearch Integration Test 2.6.2.0.0 ........ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:36 min
[INFO] Finished at: 2018-05-05T16:52:20+09:00
[INFO] ------------------------------------------------------------------------
[root@big-master apache-ambari-2.6.2-src]# pushd ambari-metrics
/usr/local/src/apache-ambari-2.6.2-src/ambari-metrics /usr/local/src/apache-ambari-2.6.2-src
[root@big-master apache-ambari-2.6.2-src]# mvn versions:set -DnewVersion=2.6.2.0.0
~열심히 구경하는데 아래와 같은 경고가 뜨긴 하지만 내 환경에선 잘되었다.~
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects
[INFO] Searching for local aggregator root...
[INFO] Local aggregation root: /usr/local/src/apache-ambari-2.6.2-src
[INFO] Processing change of org.apache.ambari:ambari-metrics:2.6.2.0.0 -> 2.6.2.0.0
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] utility 1.0.0.0-SNAPSHOT ........................... SKIPPED
[INFO] ambari-metrics 2.6.2.0.0 ........................... SUCCESS [ 34.974 s]
[INFO] Ambari Metrics Common .............................. SKIPPED
[INFO] Ambari Metrics Hadoop Sink ......................... SKIPPED
[INFO] Ambari Metrics Flume Sink .......................... SKIPPED
[INFO] Ambari Metrics Kafka Sink .......................... SKIPPED
[INFO] Ambari Metrics Storm Sink .......................... SKIPPED
[INFO] Ambari Metrics Storm Sink (Legacy) ................. SKIPPED
[INFO] Ambari Metrics Collector ........................... SKIPPED
[INFO] Ambari Metrics Monitor ............................. SKIPPED
[INFO] Ambari Metrics Grafana 2.1.0.0.0 ................... SKIPPED
[INFO] Ambari Metrics Assembly 2.6.2.0.0 .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:58 min
[INFO] Finished at: 2018-05-05T16:57:37+09:00
[INFO] ------------------------------------------------------------------------
[root@big-master ambari-metrics]# popd
/usr/local/src/apache-ambari-2.6.2-src
#license없이 진행하니 오류가 남...jms,jmx관련 오류가 있으면 진행하고 아니면 패스한다.
[root@big-master apache-ambari-2.6.2-src]# vi jms-1.1.pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project>
	<modelVersion>4.0.0</modelVersion>
	<groupId>javax.jms</groupId>
	<artifactId>jms</artifactId>
	<version>1.1</version>
	<name>Java Message Service</name>
	<description>
    The Java Message Service (JMS) API is a messaging standard that allows application components based on the Java 2 Platform, Enterprise Edition (J2EE) to create, send, receive, and read messages. It enables distributed communication that is loosely coupled, reliable, and asynchronous.
	</description>
	<url>http://java.sun.com/products/jms</url>
	<distributionManagement>
		<downloadUrl>http://java.sun.com/products/jms/docs.html</downloadUrl>
	</distributionManagement>
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>	
</project>
:wq!
[root@big-master apache-ambari-2.6.2-src]# mvn install:install-file -Dfile=jms-1.1.pom -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ ambari ---
[INFO] Installing /usr/local/src/apache-ambari-2.6.2-src/jms-1.1.pom to /maven/repository/javax/jms/jms/1.1/jms-1.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Main 2.6.2.0.0 .............................. SUCCESS [  0.192 s]
[INFO] Apache Ambari Project POM .......................... SKIPPED
[INFO] Ambari Web ......................................... SKIPPED
[INFO] Ambari Views ....................................... SKIPPED
[INFO] Ambari Admin View .................................. SKIPPED
[INFO] utility 1.0.0.0-SNAPSHOT ........................... SKIPPED
[INFO] ambari-metrics ..................................... SKIPPED
[INFO] Ambari Metrics Common .............................. SKIPPED
[INFO] Ambari Metrics Hadoop Sink ......................... SKIPPED
[INFO] Ambari Metrics Flume Sink .......................... SKIPPED
[INFO] Ambari Metrics Kafka Sink .......................... SKIPPED
[INFO] Ambari Metrics Storm Sink .......................... SKIPPED
[INFO] Ambari Metrics Storm Sink (Legacy) ................. SKIPPED
[INFO] Ambari Metrics Collector ........................... SKIPPED
[INFO] Ambari Metrics Monitor ............................. SKIPPED
[INFO] Ambari Metrics Grafana 2.1.0.0.0 ................... SKIPPED
[INFO] Ambari Metrics Assembly ............................ SKIPPED
[INFO] Ambari Server ...................................... SKIPPED
[INFO] Ambari Functional Tests ............................ SKIPPED
[INFO] Ambari Agent ....................................... SKIPPED
[INFO] ambari-logsearch ................................... SKIPPED
[INFO] Ambari Logsearch Appender .......................... SKIPPED
[INFO] Ambari Logsearch Portal ............................ SKIPPED
[INFO] Ambari Logsearch Log Feeder ........................ SKIPPED
[INFO] Ambari Logsearch Solr Client ....................... SKIPPED
[INFO] Ambari Infra Solr Plugin ........................... SKIPPED
[INFO] Ambari Logsearch Assembly .......................... SKIPPED
[INFO] Ambari Logsearch Integration Test 2.6.2.0.0 ........ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.245 s
[INFO] Finished at: 2018-05-05T17:05:58+09:00
[INFO] ------------------------------------------------------------------------

[root@big-master apache-ambari-2.6.2-src]# vi jmxtools-1.2.1.pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project>
	 <modelVersion>4.0.0</modelVersion>
	<groupId>com.sun.jdmk</groupId>
	<artifactId>jmxtools</artifactId>
	<version>1.2.1</version>
	<distributionManagement>
		<status>deployed</status>
	</distributionManagement>
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
</project>  
[root@big-master apache-ambari-2.6.2-src]# vi jmxri-1.2.1.pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project>
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.sun.jmx</groupId>
	<artifactId>jmxri</artifactId>
	<version>1.2.1</version>
	<distributionManagement>
		<status>deployed</status>
	</distributionManagement>
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
</project>
:wq!
[root@big-master apache-ambari-2.6.2-src]# mvn install:install-file -Dfile=jmxtools-1.2.1.pom -DgroupId=com.sun.jdmk -DartifactId=jmxtools -Dversion=1.2.1 -Dpackaging=jar
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ ambari ---
[INFO] Installing /usr/local/src/apache-ambari-2.6.2-src/jmxtools-1.2.1.pom to /maven/repository/com/sun/jdmk/jmxtools/1.2.1/jmxtools-1.2.1.jar
[INFO] Installing /tmp/mvninstall8543698889948898158.pom to /maven/repository/com/sun/jdmk/jmxtools/1.2.1/jmxtools-1.2.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Main 2.6.2.0.0 .............................. SUCCESS [  0.213 s]
[INFO] Apache Ambari Project POM .......................... SKIPPED
[INFO] Ambari Web ......................................... SKIPPED
[INFO] Ambari Views ....................................... SKIPPED
[INFO] Ambari Admin View .................................. SKIPPED
[INFO] utility 1.0.0.0-SNAPSHOT ........................... SKIPPED
[INFO] ambari-metrics ..................................... SKIPPED
[INFO] Ambari Metrics Common .............................. SKIPPED
[INFO] Ambari Metrics Hadoop Sink ......................... SKIPPED
[INFO] Ambari Metrics Flume Sink .......................... SKIPPED
[INFO] Ambari Metrics Kafka Sink .......................... SKIPPED
[INFO] Ambari Metrics Storm Sink .......................... SKIPPED
[INFO] Ambari Metrics Storm Sink (Legacy) ................. SKIPPED
[INFO] Ambari Metrics Collector ........................... SKIPPED
[INFO] Ambari Metrics Monitor ............................. SKIPPED
[INFO] Ambari Metrics Grafana 2.1.0.0.0 ................... SKIPPED
[INFO] Ambari Metrics Assembly ............................ SKIPPED
[INFO] Ambari Server ...................................... SKIPPED
[INFO] Ambari Functional Tests ............................ SKIPPED
[INFO] Ambari Agent ....................................... SKIPPED
[INFO] ambari-logsearch ................................... SKIPPED
[INFO] Ambari Logsearch Appender .......................... SKIPPED
[INFO] Ambari Logsearch Portal ............................ SKIPPED
[INFO] Ambari Logsearch Log Feeder ........................ SKIPPED
[INFO] Ambari Logsearch Solr Client ....................... SKIPPED
[INFO] Ambari Infra Solr Plugin ........................... SKIPPED
[INFO] Ambari Logsearch Assembly .......................... SKIPPED
[INFO] Ambari Logsearch Integration Test 2.6.2.0.0 ........ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.239 s
[INFO] Finished at: 2018-05-05T17:12:13+09:00
[INFO] ------------------------------------------------------------------------

[root@big-master apache-ambari-2.6.2-src]# mvn install:install-file -Dfile=jmxri-1.2.1.pom -DgroupId=com.sun.jmx -DartifactId=jmxri -Dversion=1.2.1 -Dpackaging=jar
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ ambari ---
[INFO] Installing /usr/local/src/apache-ambari-2.6.2-src/jmxri-1.2.1.pom to /maven/repository/com/sun/jmx/jmxri/1.2.1/jmxri-1.2.1.jar
[INFO] Installing /tmp/mvninstall2349442152761493483.pom to /maven/repository/com/sun/jmx/jmxri/1.2.1/jmxri-1.2.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Main 2.6.2.0.0 .............................. SUCCESS [  0.215 s]
[INFO] Apache Ambari Project POM .......................... SKIPPED
[INFO] Ambari Web ......................................... SKIPPED
[INFO] Ambari Views ....................................... SKIPPED
[INFO] Ambari Admin View .................................. SKIPPED
[INFO] utility 1.0.0.0-SNAPSHOT ........................... SKIPPED
[INFO] ambari-metrics ..................................... SKIPPED
[INFO] Ambari Metrics Common .............................. SKIPPED
[INFO] Ambari Metrics Hadoop Sink ......................... SKIPPED
[INFO] Ambari Metrics Flume Sink .......................... SKIPPED
[INFO] Ambari Metrics Kafka Sink .......................... SKIPPED
[INFO] Ambari Metrics Storm Sink .......................... SKIPPED
[INFO] Ambari Metrics Storm Sink (Legacy) ................. SKIPPED
[INFO] Ambari Metrics Collector ........................... SKIPPED
[INFO] Ambari Metrics Monitor ............................. SKIPPED
[INFO] Ambari Metrics Grafana 2.1.0.0.0 ................... SKIPPED
[INFO] Ambari Metrics Assembly ............................ SKIPPED
[INFO] Ambari Server ...................................... SKIPPED
[INFO] Ambari Functional Tests ............................ SKIPPED
[INFO] Ambari Agent ....................................... SKIPPED
[INFO] ambari-logsearch ................................... SKIPPED
[INFO] Ambari Logsearch Appender .......................... SKIPPED
[INFO] Ambari Logsearch Portal ............................ SKIPPED
[INFO] Ambari Logsearch Log Feeder ........................ SKIPPED
[INFO] Ambari Logsearch Solr Client ....................... SKIPPED
[INFO] Ambari Infra Solr Plugin ........................... SKIPPED
[INFO] Ambari Logsearch Assembly .......................... SKIPPED
[INFO] Ambari Logsearch Integration Test 2.6.2.0.0 ........ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.235 s
[INFO] Finished at: 2018-05-05T17:12:58+09:00
[INFO] ------------------------------------------------------------------------

[root@big-master apache-ambari-2.6.2-src]# mvn -B clean install rpm:rpm -DnewVersion=2.6.2.0.0 -DskipTests -Dpython.ver="python >= 2.6"
#상당히 기다려야 한다.28단계라니..
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Main 2.6.2.0.0 .............................. SUCCESS [ 10.037 s]
[INFO] Apache Ambari Project POM .......................... SUCCESS [  0.324 s]
[INFO] Ambari Web ......................................... SUCCESS [ 58.121 s]
[INFO] Ambari Views ....................................... SUCCESS [  2.075 s]
[INFO] Ambari Admin View .................................. SUCCESS [ 16.237 s]
[INFO] utility 1.0.0.0-SNAPSHOT ........................... SUCCESS [  0.388 s]
[INFO] ambari-metrics ..................................... SUCCESS [  1.192 s]
[INFO] Ambari Metrics Common .............................. SUCCESS [  8.173 s]
[INFO] Ambari Metrics Hadoop Sink ......................... SUCCESS [  5.204 s]
[INFO] Ambari Metrics Flume Sink .......................... SUCCESS [  3.260 s]
[INFO] Ambari Metrics Kafka Sink .......................... SUCCESS [  3.218 s]
[INFO] Ambari Metrics Storm Sink .......................... SUCCESS [  4.499 s]
[INFO] Ambari Metrics Storm Sink (Legacy) ................. SUCCESS [  3.457 s]
[INFO] Ambari Metrics Collector ........................... SUCCESS [03:42 min]
[INFO] Ambari Metrics Monitor ............................. SUCCESS [  1.827 s]
[INFO] Ambari Metrics Grafana 2.1.0.0.0 ................... SUCCESS [ 24.430 s]
[INFO] Ambari Metrics Assembly ............................ SUCCESS [02:32 min]
[INFO] Ambari Server ...................................... SUCCESS [15:40 min]
[INFO] Ambari Functional Tests ............................ SUCCESS [ 40.365 s]
[INFO] Ambari Agent ....................................... SUCCESS [04:16 min]
[INFO] ambari-logsearch ................................... SUCCESS [  6.880 s]
[INFO] Ambari Logsearch Appender .......................... SUCCESS [  2.438 s]
[INFO] Ambari Logsearch Portal ............................ SUCCESS [02:05 min]
[INFO] Ambari Logsearch Log Feeder ........................ SUCCESS [ 43.923 s]
[INFO] Ambari Logsearch Solr Client ....................... SUCCESS [  3.373 s]
[INFO] Ambari Infra Solr Plugin ........................... SUCCESS [ 55.757 s]
[INFO] Ambari Logsearch Assembly .......................... SUCCESS [  0.427 s]
[INFO] Ambari Logsearch Integration Test 2.6.2.0.0 ........ SUCCESS [ 44.885 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33:59 min
[INFO] Finished at: 2018-05-05T19:59:52+09:00
[INFO] ------------------------------------------------------------------------
[root@big-master apache-ambari-2.6.2-src]#
[root@big-master apache-ambari-2.6.2-src]# rpm -ivh --nodeps ./ambari-server/target/rpm/ambari-server/RPMS/x86_64/ambari-server-2.6.2.0-0.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:ambari-server-2.6.2.0-0          ################################# [100%]
[root@big-master apache-ambari-2.6.2-src]#
[root@big-master apache-ambari-2.6.2-src]# find /usr -name ambari-server
/usr/sbin/ambari-server
/usr/lib/ambari-server
/usr/local/src/apache-ambari-2.6.2-src/ambari-logsearch/docker/test-logs/ambari-server
/usr/local/src/apache-ambari-2.6.2-src/ambari-server
/usr/local/src/apache-ambari-2.6.2-src/ambari-server/sbin/ambari-server
/usr/local/src/apache-ambari-2.6.2-src/ambari-server/target/ambari-server
/usr/local/src/apache-ambari-2.6.2-src/ambari-server/target/ambari-server-2.6.2.0.0-dist/usr/lib/ambari-server
/usr/local/src/apache-ambari-2.6.2-src/ambari-server/target/ambari-server-2.6.2.0.0-dist/var/lib/ambari-server
/usr/local/src/apache-ambari-2.6.2-src/ambari-server/target/ambari-server-2.6.2.0.0-dist/var/run/ambari-server
/usr/local/src/apache-ambari-2.6.2-src/ambari-server/target/ambari-server-2.6.2.0.0-dist/var/log/ambari-server
/usr/local/src/apache-ambari-2.6.2-src/ambari-server/target/ambari-server-2.6.2.0.0-dist/etc/init.d/ambari-server
/usr/local/src/apache-ambari-2.6.2-src/ambari-server/target/ambari-server-2.6.2.0.0-dist/etc/ambari-server
/usr/local/src/apache-ambari-2.6.2-src/ambari-server/target/rpm/ambari-server
#매뉴얼대로 되는게 별로 없을때가 있다.

[root@big-master apache-ambari-2.6.2-src]# wget -P /usr/share/java/ http://central.maven.org/maven2/mysql/mysql-connector-java/6.0.6/mysql-connector-java-6.0.6.jar
--2018-05-05 22:33:07--  http://central.maven.org/maven2/mysql/mysql-connector-java/6.0.6/mysql-connector-java-6.0.6.jar
Resolving central.maven.org (central.maven.org)... 151.101.40.209
Connecting to central.maven.org (central.maven.org)|151.101.40.209|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2001778 (1.9M) [application/java-archive]
Saving to: ‘/usr/share/java/mysql-connector-java-6.0.6.jar’

100%[====================================================================================================================================>] 2,001,778   2.55MB/s   in 0.7s

2018-05-05 22:33:08 (2.55 MB/s) - ‘/usr/share/java/mysql-connector-java-6.0.6.jar’ saved [2001778/2001778]

[root@big-master apache-ambari-2.6.2-src]# ls /usr/share/java/
mysql-connector-java-6.0.6.jar
[root@big-master apache-ambari-2.6.2-src]# export buildNumber=2.6.2.0.0
[root@big-master apache-ambari-2.6.2-src]# ambari-server setup --java-home=/jdk
Using python  /usr/bin/python
Setup ambari-server
Checking SELinux...
SELinux status is 'enabled'
SELinux mode is 'permissive'
WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
OK to continue [y/n] (y)? y
Customize user account for ambari-server daemon [y/n] (n)? n
Adjusting ambari-server permissions and ownership...
Checking firewall status...
Checking JDK...
WARNING: JAVA_HOME /jdk must be valid on ALL hosts
WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use Kerberos,please make sure JCE Unlimited Strength Jurisdiction Policy Files are valid on all hosts.
Checking GPL software agreement...
GPL License for LZO: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
Enable Ambari Server to download and install GPL Licensed LZO packages [y/n] (n)? n
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 / MariaDB
[4] - PostgreSQL
[5] - Microsoft SQL Server (Tech Preview)
[6] - SQL Anywhere
[7] - BDB
==============================================================================
Enter choice (1): 3
Hostname (localhost): big-slave2
Port (3306):
Database name (ambari):
Username (ambari):
Enter Database Password (bigdata):
Re-enter password:
Configuring ambari database...
Configuring remote database connection properties...
WARNING: Before starting Ambari Server, you must run the following DDL against the database to create the schema: /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
Proceed with configuring remote database connection properties [y/n] (y)?
Extracting system views...
.
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.

[root@big-master apache-ambari-2.6.2-src]# vi /etc/ambari-server/conf/ambari.properties
server.jdbc.driver.path=/usr/share/java/mysql-connector-java-6.0.6.jar
#jdbc url 에 ?serverTimezone=UTC 추가
:wq!

[root@big-master apache-ambari-2.6.2-src]# scp /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql big-slave2:/root/
root@big-slave2's password:
Ambari-DDL-MySQL-CREATE.sql     

[root@big-slave2 ~]# mysql -u root -p mysql
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 167
Server version: 10.2.14-MariaDB Source distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [mysql]> create database ambari;
Query OK, 1 row affected (0.00 sec)

MariaDB [mysql]> use ambari
Database changed
MariaDB [ambari]> show tables;
Empty set (0.00 sec)
MariaDB [ambari]> source /root/Ambari-DDL-MySQL-CREATE.sql
......
Query OK, 0 rows affected (0.00 sec)
Statement prepared
......
Query OK, 0 rows affected (0.00 sec)

[root@big-master apache-ambari-2.6.2-src]# ambari-server start
Using python  /usr/bin/python
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start........................
Server started listening on 8080

DB configs consistency check: no errors and warnings were found.
Ambari Server 'start' completed successfully.

 

 

반응형

'bigdata > ambari' 카테고리의 다른 글

ambari client 설치  (0) 2018.05.06
Comments