[root@ambari37 ~]# ambari-server setup -s Using python /usr/bin/python Setup ambari-server Checking SELinux... SELinux status is 'enabled' SELinux mode is 'enforcing' Temporarily disabling SELinux 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)? Adjusting ambari-server permissions and ownership... Checking firewall status... 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): To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at https://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually. Do you accept the Oracle Binary Code License Agreement [y/n] (y)? Downloading JDK from https://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u77-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-8u77-linux-x64.tar.gz jdk-8u77-linux-x64.tar.gz... 100% (173.0 MB of 173.0 MB) Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-8u77-linux-x64.tar.gz Installing JDK to /usr/jdk64/ Successfully installed JDK to /usr/jdk64/ Downloading JCE Policy archive from https://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip to /var/lib/ambari-server/resources/jce_policy-8.zip
Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/jce_policy-8.zip Installing JCE policy... Completing setup... Configuring database... Enter advanced database configuration [y/n] (n)? Configuring database... Default properties detected. Using built-in database. Configuring ambari database... Checking PostgreSQL... Running initdb: This may take up to a minute. Initializing database: [ OK ]
About to start PostgreSQL Configuring local database... Connecting to local database...done. Configuring PostgreSQL... Restarting PostgreSQL Extracting system views... .........ambari-admin-2.4.1.0.22.jar .. Adjusting ambari-server permissions and ownership... Ambari Server 'setup' completed successfully. [root@ambari37 ~]#
启动
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
ambari-server start [root@ambari37 ~]# 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... No errors were found. Ambari database consistency check finished 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.................... Ambari Server 'start' completed successfully. [root@ambari37 ~]#
检查
1 2 3 4 5 6
[root@ambari37 ~]# ambari-server status Using python /usr/bin/python Ambari-server status Ambari Server running Found Ambari Server PID: 11599 at: /var/run/ambari-server/ambari-server.pid [root@ambari37 ~]#
Note: To clean up in interactive mode, remove --silent option. To clean up all resources, including users, remove --skip=users option. Use --help for a list of available options.
wget https://www.apache.org/dist/ambari/ambari-2.4.1/apache-ambari-2.4.1-src.tar.gz tar xfvz apache-ambari-2.4.1-src.tar.gz cd apache-ambari-2.4.1-src mvn versions:set -DneVersion=2.4.1.0.0
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (compile-npm) on project ambari-web: Command execution failed. Cannot run program "npm" (in directory "/root/apache-ambari-2.4.1-src/ambari-web"): error=2, 没有那个文件或目录 -> [Help 1]
[root@ambari36 phantomjs-1.9.8-linux-x86_64]# bin/phantomjs bin/phantomjs: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory 解决 yum install freetype
[root@ambari36 phantomjs-1.9.8-linux-x86_64]# bin/phantomjs bin/phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory 解决 yum install fontconfig freetype libfreetype.so.6 libfontconfig.so.1 libstdc++.so.6