基础环境准备
操作系统版本
cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
挂载国内yum
源
yum install wget -y
cd /etc/yum.repos.d/
mkdir bak
mv *.repo bak
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
更新和安装基础软件
yum -y groupinstall "Infrastructure Server"
yum -y groupinstall "Compatibility Libraries"
yum -y groupinstall "Development Tools"
yum -y update
操作系统其他操作
#关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
#关闭SELINUX
setenforce 0
cp /etc/selinux/config /etc/selinux/config.bak
echo SELINUX=disabled > /etc/selinux/config
echo SELINUXTYPE=targeted >> /etc/selinux/config
#修改limits.conf
cp /etc/security/limits.conf /etc/security/limits.conf.bak
echo "* hard nproc 65535" > /etc/security/limits.conf
echo "* soft nproc 65535" >> /etc/security/limits.conf
echo "* hard nofile 65535" >> /etc/security/limits.conf
echo "* soft nofile 65535" >> /etc/security/limits.conf
#修改时区
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
#重启
reboot
编译工具准备
- 安装JAVA
wget https://repo.huaweicloud.com/java/jdk/8u202-b08/jdk-8u202-linux-x64.tar.gz
tar -zxvf jdk-8u202-linux-x64.tar.gz -C /opt/
- 安装 Scala
wget https://downloads.lightbend.com/scala/2.12.17/scala-2.12.17.rpm
rpm -ivh scala-2.12.17.rpm
- 安装 Maven
wget https://repo.huaweicloud.com/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
tar -zxvf apache-maven-3.6.3-bin.tar.gz -C /opt/
mv /opt/apache-maven-3.6.3/conf/settings.xml /opt/apache-maven-3.6.3/conf/settings.xml.bak
修改/opt/apache-maven-3.6.3/conf/settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd">
<pluginGroups></pluginGroups>
<proxies></proxies>
<servers></servers>
<mirrors></mirrors>
<profiles>
<profile>
<id>aliyun</id>
<repositories>
<repository>
<id>aliyun</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>aliyun-plugin-repository</id>
<name>aliyun-plugin-repository</name>
<url>https://maven.aliyun.com/repository/public</url>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>huaweiyun</id>
<repositories>
<repository>
<id>huaweiyum</id>
<url>https://mirrors.huaweicloud.com/repository/maven/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>huawei-plugin-repository</id>
<name>huawei-plugin-repository</name>
<url>https://mirrors.huaweicloud.com/repository/maven/</url>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>repo1</id>
<repositories>
<repository>
<id>repo1</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>
<profile>
<id>repo2</id>
<repositories>
<repository>
<id>repo2</id>
<url>https://repo.maven.apache.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>aliyun</activeProfile>
<activeProfile>repo1</activeProfile>
<activeProfile>repo2</activeProfile>
<activeProfile>huaweiyun</activeProfile>
</activeProfiles>
</settings>
- 安装 Nodejs
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install v12.22.1
npm cache clean --force # 清空缓存
npm config set registry https://registry.npmmirror.com
# phantomjs
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar -xjvf phantomjs-2.1.1-linux-x86_64.tar.bz2
npm install yarn bower node-sass phantomjs bower-nexus3-resolver -g --unsafe-perm
- 安装 Gradle
wget https://services.gradle.org/distributions/gradle-7.5.1-bin.zip
unzip -d /opt/ gradle-7.5.1-bin.zip
- 安装 Ant
wget https://repo.huaweicloud.com/apache/ant/binaries/apache-ant-1.9.16-bin.tar.gz
wget https://repo.huaweicloud.com/apache/ant/ivy/2.4.0/apache-ivy-2.4.0-bin.tar.gz
tar -zxvf apache-ant-1.9.16-bin.tar.gz -C /opt
tar -zxvf apache-ivy-2.4.0-bin.tar.gz
cp apache-ivy-2.4.0/ivy-2.4.0.jar /opt/apache-ant-1.9.16/lib/
mkdir ~/.ivy2
修改~/.ivy2/ivysettings.xml
<ivy-settings>
<!-- path to local maven repo and default maven layout -->
<property name="local-maven2-pattern"
value="~/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision]"
override="false" />
<!-- set resolver chain as default -->
<settings defaultResolver="main" />
<!-- configure caches -->
<caches repositoryCacheDir="~/.ivy2/cache">
<!-- do not cache from local .m2-->
<cache name="nocache" useOrigin="true" />
<cache name="default" />
</caches>
<resolvers>
<chain name="main">
<!-- as this is not cached, even changing SNAPSHOT dependencies
are resolved correctly -->
<filesystem name="local-maven-2" m2compatible="true" local="true"
cache="nocache">
<ivy pattern="\${local-maven2-pattern}.pom" />
<artifact pattern="\${local-maven2-pattern}(-[classifier]).[ext]" />
</filesystem>
<!-- use repository manager as proxy to maven-central
(and all other repositories)-->
<ibiblio name="repomanager" m2compatible="true"
root="http://maven.aliyun.com/nexus/content/groups/public/" cache="default"/>
</chain>
</resolvers>
</ivy-settings>
- 安装python
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py37_23.1.0-1-Linux-x86_64.sh --no-check-certificate
bash Miniconda3-py37_23.1.0-1-Linux-x86_64.sh
- 配置并刷新环境变量
echo "
export JAVA_HOME=/opt/modules/jdk1.8.0_202
export SCALA_HOME=/usr/share/scala
export MAVEN_HOME=/opt/apache-maven-3.6.3
export GRADLE_HOME=/opt/gradle-7.5.1
export ANT_HOME=/opt/apache-ant-1.9.16
export IVY_HOME=/opt/apache-ivy-2.4.0
export CONDA_HOME=/root/miniconda3
export PHANTOMJS_HOME=/opt/phantomjs-2.1.1-linux-x86_64
export PATH=$JAVA_HOME/bin:$PHANTOMJS_HOME:$SCALA_HOME/bin:$MAVEN_HOME/bin:$GRADLE_HOME/bin:$ANT_HOME/bin:$IVY_HOME/bin:$R_HOME/bin:$CONDA_HOME/bin:$PATH
" >> /etc/profile
source /etc/profile
# 设置不自动进入 base 环境
# conda config --set auto_activate_base false
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
# pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
conda create -n py37 python==3.7.9
ambari 编译步骤
# 设置国内镜像代理
git config --global url.https://ghp.ci/https://github.com/.insteadOf git://github.com/
git clone https://github.com/apache/ambari.git
cd ambari
git checkout -b branch-2.8 origin/branch-2.8
wget https://gitee.com/tt-bigdata/ambari-env/raw/master/scripts/build/ambari/patch/source/bower.tar.gz
tar zxvf bower.tar.gz -C ambari-admin/src/main/resources/ui/admin-web/app
mvn -T 4C clean install rpm:rpm -DskipTests
ambari-metrics 编译步骤
git clone https://github.com/apache/ambari-metrics.git
cd ambari-metrics
git checkout -b branch-3.0 origin/branch-3.0
#提前下载编译时需要的4个tar包--有利于编译加速
wget http://repo.bigtop.apache.org.s3.amazonaws.com/bigtop-stack-binary/3.2.0/centos-7/x86_64/hbase-2.4.13-bin.tar.gz
wget http://repo.bigtop.apache.org.s3.amazonaws.com/bigtop-stack-binary/3.2.0/centos-7/x86_64/hadoop-3.3.4.tar.gz
wget https://dl.grafana.com/oss/release/grafana-9.3.2.linux-amd64.tar.gz
wget http://repo.bigtop.apache.org.s3.amazonaws.com/bigtop-stack-binary/3.2.0/centos-7/x86_64/phoenix-hbase-2.4-5.1.2-bin.tar.gz
#修改ambari-metrics/pom.xml文件,将以上4个tar包的url修改成刚才下载好的本地路径
file://{下载路径}/hbase-2.4.13-bin.tar.gz
file://{下载路径}/hadoop-3.3.4.tar.gz
file://{下载路径}/grafana-9.3.2.linux-amd64.tar.gz
file://{下载路径}/phoenix-hbase-2.4-5.1.2-bin.tar.gz
mvn -T 4C clean install -DskipTests -Dbuild-rpm
bigtop 编译步骤
# 基础环境
yum install -y apr-devel \
bison \
bzip2-devel \
cppunit-devel \
cyrus-* \
devtoolset-7-gcc \
devtoolset-7-gcc-c++.x86_64 \
flex \
freetype-devel \
fribidi-devel \
fuse \
fuse-devel \
gcc-c++ \
gzip \
harfbuzz-devel \
knitr \
libcurl-devel \
libevent-devel \
libgit2-devel \
libjpeg-turbo-devel \
libpng-devel \
libtiff-devel \
libtool \
libxml2-devel \
lzo-devel \
ncurses-devel \
openssl-devel \
openblas-devel \
pandoc* \
protobuf* \
python-devel \
R* \
readline-devel \
rpm-build \
zstd* \
asciidoc \
xmlto
git clone https://github.com/apache/bigtop.git
cd bigtop
git checkout -b branch-3.2 origin/branch-3.2
#修改bigtop/bigtop.bom配置 有两处要修改
#1.修改镜像源为国内镜像源 103、104行
APACHE_MIRROR = "https://repo.huaweicloud.com/apache"
APACHE_ARCHIVE = "https://mirrors.aliyun.com/apache"
#2.解开bigtop-select组件的注释 删除273、281行
#安装组件编译所需的依赖
#1.hadoop依赖
yum -y install fuse-devel cmake cmake3 lzo-devel openssl-devel protobuf* cyrus-*
cp /usr/bin/cmake3 /usr/bin/cmake
#2.zookeeper依赖
yum -y install cppunit-devel
#3.spark依赖
yum -y install R* harfbuzz-devel fribidi-devel libcurl-devel libxml2-devel freetype-devel libpng-devel libtiff-devel libjpeg-turbo-devel pandoc* libgit2-devel
Rscript -e "install.packages(c('knitr','rmarkdown','devtools','e1071','survival','httr2','gh','htmlwidgets','usethis','pkgdown','profvis','roxygen2','testthat'), repos=c('https://mirrors.tuna.tsinghua.edu.cn/CRAN/', 'https://mirrors.ustc.edu.cn/CRAN/', 'https://mirrors.aliyun.com/CRAN/'))"
#修改部分组件源代码
#1.先下载
./gradlew tez-download zeppelin-download flink-download
#2.进入下载目录
cd dl
#3.解压这3个tar
tar -zxvf flink-1.15.3.tar.gz
tar -zxvf apache-tez-0.10.2-src.tar.gz
tar -zxvf zeppelin-0.10.1.tar.gz
#4.修改flink
vi flink-1.15.0/flink-runtime-web/pom.xml
在275行 nodeVersion改为v12.22.1
在276行 npmVersion改为6.14.12
#5.修改tez
vi apache-tez-0.10.2-src/tez-ui/pom.xml
在37行 allow-root-build改为--allow-root=true
#6.修改zeppelin
vi zeppelin-0.10.1/pom.xml
在209行plugin.gitcommitid.useNativeGit改为true
vi zeppelin-0.10.1/spark/pom.xml
在50行spark.src.download.url改为https://repo.huaweicloud.com/apache/spark/${spark.archive}/${spark.archive}.tgz
在53行spark.bin.download.url改为https://repo.huaweicloud.com/apache/spark/${spark.archive}/${spark.archive}-bin-without-hadoop.tgz
vi zeppelin-0.10.1/rlang/pom.xml
在41行spark.src.download.url改为https://repo.huaweicloud.com/apache/spark/${spark.archive}/${spark.archive}.tgz
在44行spark.bin.download.url改为https://repo.huaweicloud.com/apache/spark/${spark.archive}/${spark.archive}-bin-without-hadoop.tgz
vi zeppelin-0.10.1/flink/flink-scala-parent/pom.xml
在45行flink.bin.download.url改为https://repo.huaweicloud.com/apache/flink/flink-${flink.version}/flink-${flink.version}-bin-scala_${flink.scala.binary.version}.tgz
#7.重新打包这3个tar
tar -zcvf flink-1.15.3.tar.gz flink-1.15.3
tar -zcvf apache-tez-0.10.2-src.tar.gz apache-tez-0.10.2-src
tar -zcvf zeppelin-0.10.1.tar.gz zeppelin-0.10.1
cd ..
./gradlew allclean bigtop-groovy-rpm \
bigtop-jsvc-rpm \
bigtop-ambari-mpack-rpm \
bigtop-utils-rpm \
hadoop-rpm \
hbase-rpm \
hive-rpm \
kafka-rpm \
solr-rpm \
spark-rpm \
tez-rpm \
zeppelin-rpm \
zookeeper-rpm \
phoenix-rpm \
flink-rpm \
-Dbuildwithdeps=true \
-PparentDir=/usr/bigtop -PpkgSuffix
bower 私有仓库
# 上传 bower 包
{
"registry" : {
"search" : [
"http://172.20.0.1:8081/repository/bower"
],
"register" : "http://admin:admin123@172.20.0.1:8081/repository/bower-hosted"
},
"resolvers" : [ "bower-nexus3-resolver" ]
}
cd ambari-admin/src/main/resources/ui/admin-web
# https://ghp.ci/https://github.com/components/ember.git
bower --allow-root register ember https://ghp.ci/https://github.com/components/ember.git
# https://ghp.ci/https://github.com/ember-cli/ember-cli-shims.git
# bower --allow-root register ember-cli-shims https://gitee.com/nick-f/ember-cli-shims.git
bower --allow-root register ember-cli-shims https://ghp.ci/https://github.com/ember-cli/ember-cli-shims.git
# https://ghp.ci/https://github.com/ember-cli/ember-cli-test-loader.git
# bower --allow-root register ember-cli-test-loader https://gitee.com/nick-f/ember-cli-test-loader.git
bower --allow-root register ember-cli-test-loader https://ghp.ci/https://github.com/ember-cli/ember-cli-test-loader.git
# https://ghp.ci/https://github.com/components/ember-data.git
# bower --allow-root register ember-data https://gitee.com/nick-f/ember-data.git
bower --allow-root register ember-data https://ghp.ci/https://github.com/components/ember-data.git
# https://ghp.ci/https://github.com/ember-cli/ember-load-initializers.git
# bower --allow-root register ember-load-initializers https://gitee.com/nick-f/ember-load-initializers.git
bower --allow-root register ember-load-initializers https://ghp.ci/https://github.com/ember-cli/ember-load-initializers.git
# https://ghp.ci/https://github.com/dockyard/ember-qunit-notifications.git
# bower --allow-root register ember-qunit-notifications https://gitee.com/nick-f/ember-qunit-notifications.git
bower --allow-root register ember-qunit-notifications https://ghp.ci/https://github.com/dockyard/ember-qunit-notifications.git
# https://ghp.ci/https://github.com/stefanpenner/loader.js.git
# bower --allow-root register loader.js https://gitee.com/nick-f/loader.js.git
bower --allow-root register loader.js https://ghp.ci/https://github.com/stefanpenner/loader.js.git
# https://ghp.ci/https://github.com/moment/moment.git
# bower --allow-root register moment https://gitee.com/nick-f/moment.git
bower --allow-root register moment https://ghp.ci/https://github.com/moment/moment.git
# https://ghp.ci/https://github.com/moment/moment-timezone.git
# bower --allow-root register moment-timezone https://gitee.com/nick-f/moment-timezone.git
bower --allow-root register moment-timezone https://ghp.ci/https://github.com/moment/moment-timezone.git
# https://ghp.ci/https://github.com/sreenaths/more-js.git
# bower --allow-root register more-js https://gitee.com/nick-f/more-js.git
bower --allow-root register more-js https://ghp.ci/https://github.com/sreenaths/more-js.git
# https://ghp.ci/https://github.com/twbs/bootstrap.git
# bower --allow-root register bootstrap https://gitee.com/nick-f/bootstrap.git
bower --allow-root register bootstrap https://ghp.ci/https://github.com/twbs/bootstrap.git
# https://ghp.ci/https://github.com/mbostock-bower/d3-bower.git
# bower --allow-root register d3 https://gitee.com/nick-f/d3-bower.git
bower --allow-root register d3 https://ghp.ci/https://github.com/mbostock-bower/d3-bower.git
# https://ghp.ci/https://github.com/DataTables/DataTables.git
# bower --allow-root register datatables https://gitee.com/nick-f/DataTables.git
bower --allow-root register datatables https://ghp.ci/https://github.com/DataTables/DataTables.git
# https://ghp.ci/https://github.com/fgnass/spin.js.git
# bower --allow-root register spin.js https://gitee.com/nick-f/spin.js.git
bower --allow-root register spin.js https://ghp.ci/https://github.com/fgnass/spin.js.git
# https://ghp.ci/https://github.com/moment/moment.git
# bower --allow-root register momentjs https://gitee.com/nick-f/moment.git
bower --allow-root register momentjs https://ghp.ci/https://github.com/moment/moment.git
# https://ghp.ci/https://github.com/ivaynberg/select2.git
# bower --allow-root register select2 https://gitee.com/nick-f/select2.git
bower --allow-root register select2 https://ghp.ci/https://github.com/ivaynberg/select2.git
# https://ghp.ci/https://github.com/sreenaths/snippet-ss.git
# bower --allow-root register snippet-ss https://gitee.com/nick-f/snippet-ss.git
bower --allow-root register snippet-ss https://ghp.ci/https://github.com/sreenaths/snippet-ss.git
# https://ghp.ci/https://github.com/agershun/alasql.git
# bower --allow-root register alasql https://gitee.com/nick-f/alasql.git
bower --allow-root register alasql https://ghp.ci/https://github.com/agershun/alasql.git
# https://ghp.ci/https://github.com/abdmob/x2js.git
# bower --allow-root register x2js https://gitee.com/nick-f/x2js.git
bower --allow-root register x2js https://ghp.ci/https://github.com/abdmob/x2js.git
bower --allow-root register ember-test-helpers https://ghp.ci/https://github.com/emberjs/ember-test-helpers.git
bower --allow-root register qunit-notifications https://ghp.ci/https://github.com/dockyard/qunit-notifications.git
# jquery
bower --allow-root register ember-qunit https://ghp.ci/https://github.com/emberjs/ember-qunit.git
bower --allow-root register jquery https://ghp.ci/https://github.com/jquery/jquery-dist.git
bower --allow-root register qunit https://ghp.ci/https://github.com/jquery/qunit.git
bower --allow-root register jquery-ui https://ghp.ci/https://github.com/components/jqueryui.git
bower --allow-root register jquery.scrollto https://ghp.ci/https://github.com/flesler/jquery.scrollTo.git
# angular
bower --allow-root register angular-sanitize https://ghp.ci/https://github.com/angular/bower-angular-sanitize.git
# bower --allow-root register angular https://ghp.ci/https://github.com/angular/angular.git
bower --allow-root register angular https://ghp.ci/https://github.com/angular/bower-angular.git
bower --allow-root register angular-route https://ghp.ci/https://github.com/angular/bower-angular-route.git
bower --allow-root register angular-bootstrap https://ghp.ci/https://github.com/angular-ui/bootstrap-bower.git
bower --allow-root register restangular https://ghp.ci/https://github.com/mgonto/restangular.git
bower --allow-root register angular-bootstrap-toggle-switch https://ghp.ci/https://github.com/JumpLink/angular-toggle-switch.git
bower --allow-root register angular-animate https://ghp.ci/https://github.com/angular/bower-angular-animate.git
bower --allow-root register angular-translate https://ghp.ci/https://github.com/PascalPrecht/bower-angular-translate.git
bower --allow-root register angular-mocks https://ghp.ci/https://github.com/angular/bower-angular-mocks.git
bower --allow-root register angular-resource https://ghp.ci/https://github.com/angular/bower-angular-resource.git
bower --allow-root register angular-xeditable https://ghp.ci/https://github.com/vitalets/angular-xeditable.git
bower --allow-root register angular-cookies https://ghp.ci/https://github.com/angular/bower-angular-cookies.git
bower --allow-root register angular-touch https://ghp.ci/https://github.com/angular/bower-angular-touch.git
bower --allow-root register angular-dragdrop https://ghp.ci/https://github.com/angular-dragdrop/angular-dragdrop.git
bower --allow-root register angular-websocket https://ghp.ci/https://github.com/PatrickJS/angular-websocket.git
bower --allow-root register angular-ui-ace https://ghp.ci/https://github.com/angular-ui/ui-ace.git
bower --allow-root register angular-filter https://ghp.ci/https://github.com/a8m/angular-filter.git
bower --allow-root register angular-elastic-input https://ghp.ci/https://github.com/jacek-pulit/angular-elastic-input.git
bower --allow-root register underscore https://ghp.ci/https://github.com/jashkenas/underscore.git
bower --allow-root register font-awesome https://ghp.ci/https://github.com/FortAwesome/Font-Awesome.git
bower --allow-root register commonjs https://ghp.ci/https://github.com/chrisabrams/commonjs.git
bower --allow-root register chai https://ghp.ci/https://github.com/chaijs/chai.git
bower --allow-root register mocha https://ghp.ci/https://github.com/mochajs/mocha.git
bower --allow-root register sinon https://ghp.ci/https://github.com/cjohansen/Sinon.JS.git
bower --allow-root register lodash https://ghp.ci/https://github.com/lodash/lodash.git
bower --allow-root register ng-sortable https://ghp.ci/https://github.com/a5hik/ng-sortable.git
# bower --allow-root register ng-sortable file:///opt/projects/docker-private-bower/ng-sortable/.git
bower --allow-root register perfect-scrollbar https://ghp.ci/https://github.com/noraesae/perfect-scrollbar-bower.git
# bower --allow-root register perfect-scrollbar file:///opt/projects/docker-private-bower/perfect-scrollbar-bower/.git
bower --allow-root register json3 https://ghp.ci/https://github.com/bestiejs/json3.git
bower --allow-root register es5-shim https://ghp.ci/https://github.com/es-shims/es5-shim.git
# bower --allow-root register es5-shim file:///opt/projects/docker-private-bower/es5-shim/.git
bower --allow-root register mathjax https://ghp.ci/https://github.com/mathjax/MathJax.git
#bower --allow-root register mathjax file:///opt/projects/docker-private-bower/MathJax/.git
bower --allow-root register ace-builds https://ghp.ci/https://github.com/ajaxorg/ace-builds.git
bower --allow-root register nvd3 https://ghp.ci/https://github.com/novus/nvd3.git
bower --allow-root register es6-promise https://ghp.ci/https://github.com/stefanpenner/es6-promise.git
bower --allow-root register js-xlsx https://ghp.ci/https://github.com/SheetJS/sheetjs.git
bower --allow-root register zip-js https://ghp.ci/https://github.com/sreenaths/zip.js.git
bower --allow-root register jquery-mousewheel https://ghp.ci/https://github.com/jquery/jquery-mousewheel.git
bower --allow-root register numeral https://ghp.ci/https://github.com/adamwdraper/Numeral-js.git
bower --allow-root register codemirror https://ghp.ci/https://github.com/components/codemirror.git
bower --allow-root register file-saver https://ghp.ci/https://github.com/eligrey/FileSaver.js.git
bower --allow-root register ngclipboard https://ghp.ci/https://github.com/sachinchoolur/ngclipboard.git
bower --allow-root register highlightjs https://ghp.ci/https://github.com/components/highlightjs.git
bower --allow-root register angular-elastic https://ghp.ci/https://github.com/monospaced/angular-elastic.git
bower --allow-root register jsdiff https://ghp.ci/https://github.com/kpdecker/jsdiff.git
bower --allow-root register ngtoast https://ghp.ci/https://github.com/karaxuna/ngtoast.git
bower --allow-root register ng-focus-if https://ghp.ci/https://github.com/hiebj/ng-focus-if.git
bower --allow-root register excel-builder-js https://ghp.ci/https://github.com/stephenliberty/excel-builder.js.git
bower --allow-root register bootstrap-dialog https://ghp.ci/https://github.com/nakupanda/bootstrap3-dialog.git
bower --allow-root register nginfinitescroll https://ghp.ci/https://github.com/sroze/ngInfiniteScroll.git
bower --allow-root register jszip https://ghp.ci/https://github.com/Stuk/jszip.git
bower --allow-root register ngtoast https://ghp.ci/https://github.com/tameraydin/ngToast.git
bower --allow-root register clipboard https://ghp.ci/https://github.com/zenorocha/clipboard.js.git
# vim ambari-admin/src/main/resources/ui/admin-web/.bowerrc
{
"directory": "bower_components",
"strict-ssl": false,
"analytics": false,
"registry": {
"search": [
"http://172.20.0.1:8081/repository/bower"
]
}
}
制作镜像
#将ambari包拷贝
mkdir -p bigdatarepo/ambari
cp ambari/ambari-server/target/rpm/ambari-server/RPMS/x86_64/ambari-server-2.8.0.0-0.x86_64.rpm bigdatarepo/ambari/
cp ambari/ambari-agent/target/rpm/ambari-agent/RPMS/x86_64/ambari-agent-2.8.0.0-0.x86_64.rpm bigdatarepo/ambari/
#将ambari-metrics包拷贝
mkdir -p bigdatarepo/ambari-metrics
cp ambari-metrics/ambari-metrics-assembly/target/rpm/ambari-metrics-collector/RPMS/x86_64/ambari-metrics-collector-3.0.1-1.x86_64.rpm bigdatarepo/ambari-metrics/
cp ambari-metrics/ambari-metrics-assembly/target/rpm/ambari-metrics-grafana/RPMS/x86_64/ambari-metrics-grafana-3.0.1-1.x86_64.rpm bigdatarepo/ambari-metrics/
cp ambari-metrics/ambari-metrics-assembly/target/rpm/ambari-metrics-hadoop-sink/RPMS/x86_64/ambari-metrics-hadoop-sink-3.0.1-1.x86_64.rpm bigdatarepo/ambari-metrics/
cp ambari-metrics/ambari-metrics-assembly/target/rpm/ambari-metrics-monitor/RPMS/x86_64/ambari-metrics-monitor-3.0.1-1.x86_64.rpm bigdatarepo/ambari-metrics/
#将bigtop包拷贝
cp -r bigtop/output/* bigdatarepo/
#制作镜像源
createrepo bigdatarepo/
部署
ulimit -n 10000
ulimit -Hn
ulimit -Sn
hostnamectl set-hostname hdp1
hostname -f
vim /etc/sysconfig/network
hostname=hdp1
vim /etc/selinux/config
SELINUX=disabled
cat > /etc/hosts << EOF 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.110.60.2 hdp1 10.110.60.251 hdp2 10.110.59.172 hdp3 EOF cat> /etc/yum.repos.d/ambari.repo << EOF [Updates-ambari-2.7.5.0] name=ambari-2.7.5.0-72 - Updates baseurl=http://hdp1/ambari/ambari/centos7/2.7.5.0-72/ gpgcheck=1 gpgkey=http://hdp1/ambari/ambari/centos7/2.7.5.0-72/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins enabled=1 priority=1 EOF cat> /etc/yum.repos.d/hdp.repo << EOF
[HDP-3.1.5.0]
name=HDP Version - HDP-3.1.5.0
baseurl=http://hdp1/hdp/HDP/HDP/centos7/3.1.5.0-152/
gpgcheck=1
gpgkey=http://hdp1/hdp/HDP//HDP/centos7/3.1.5.0-152/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
[HDP-GPL-3.1.5.0]
name=HDP-GPL Version - HDP-GPL-3.1.5.0
baseurl=http://hdp1/hdp/HDP-GPL-3.1.5.0/HDP-GPL/centos7/3.1.5.0-152/
gpgcheck=0
enabled=1
priority=1
[HDP-UTILS-1.1.0.22]
name=HDP-UTILS Version - HDP-UTILS-1.1.0.22
baseurl=http://hdp1/hdp/HDP-UTILS-1.1.0.22/HDP-UTILS/centos7/1.1.0.22/
gpgcheck=1
gpgkey=http://hdp1/hdp/HDP-UTILS-1.1.0.22/HDP-UTILS/centos7/1.1.0.22/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
EOF
yum clean all
yum repolist