Build from source code under ubuntu12.04
1. donw
#wget http://mirrors.hust.edu.cn/apache/ambari/ambari-1.6.1/ambari-1.6.1.tar.gz
#tar -xvfz ambari-1.6.1.tar.gz
#cd ambari-1.6.1
2.prepare env
see: https://cwiki.apache.org/confluence/display/AMBARI/Ambari+Development
not: https://cwiki.apache.org/confluence/display/AMBARI/Build+and+install+Ambari+1.6.1+from+Source
#sudo apt-get install nodejs npm
#sudo apt-get install node
#sudo npm install -g brunch
@1
.7.
17
the above installation will lead to build errors
--
see: http://blog.izs.me/post/87525128203/how-to-install-node-js-and-npm-on-ubuntu-14-04
https://rtcamp.com/tutorials/nodejs/node-js-npm-install-ubuntu/
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
sudo npm install npm -g
#source ~/.bashrc
#node -v
#npm -v
3.build
#mvn versions:set -DnewVersion=1.6.1.1
#mvn -B clean install
package
jdeb:jdeb -DnewVersion=
1.6.1.1
-DskipTests -Dpython.ver="python >= 2.6"
-Preplaceurl
error1:
Failed to execute goal au.com.alderaan:eclipselink-staticweave-maven-plugin:1.0.4:weave (default) on project ambari-server: Execution default of goal au.com.alderaan:eclipselink-staticweave-maven-plugin:1.0.4:weave failed: Plugin au.com.alderaan:eclipselink-staticweave-maven-plugin:1.0.4 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.eclipse.persistence:eclipselink:jar:2.4.0,
modify ambari-server/pom.xml, add this
<pluginRepositories>
<pluginRepository>
<id>EclipseLink</id>
<url>http://download.eclipse.org/rt/eclipselink/maven.repo</url>
</pluginRepository>
</pluginRepositories>
error2:
TypeError: Object [object global] has no method 'run' at EmberPrecompiler.module.exports.EmberPrecompiler.setup (/home/croberts/workspace/ambari/ambari-web/node_modules/ember-precompiler-brunch/lib/index.js:22:19) at new EmberPrecompiler (/home/croberts/workspace/ambari/ambari-web/node_modules/ember-precompiler-brunch/lib/index.js:31:14) at /usr/local/lib/node_modules/brunch/lib/helpers.js:546:14 at Array.map (native)
# cd $AMBARI_DIR/ambari-web # rm -rf node_modules public # npm install # brunch build
---
dpkg --install ambari-server/target/ambari-server-*.deb # Will fail with missing dependencies errors
apt-get update # Update locations of dependencies
apt-get install -f # Install all failed dependencies
dpkg --install ambari-server/target/ambari-server-*.deb # Will succeed
Initialize Ambari Server:
ambari-server setup
Start up Ambari Server:ambari-server start
See Ambari Server log: tail -f /var/log/ambari-server/ambari-server.loghttp:
//{ambari-server-hostname}:8080
http://ambari.apache.org/
http://blog.csdn.net/shiqidide/article/details/18361203
http://ambari.apache.org/1.2.4/installing-hadoop-using-ambari/content/index.html
http://my.oschina.net/zhujinbao/blog/70404