环境:
CPU架构:arm64
操作系统:openEuler 22.03

1、java环境

#更新软件包
dnf update -y
dnf groupinstall "Development Tools" -y
dnf install java-11-openjdk-devel genisoimage mysql mysql-server ws-commons-util  python-setuptools createrepo -y
#配置java版本(/usr/bin/java指向/etc/alternatives/java,alternatives通过修改/etc/alternatives/java的指向文件,来配置默认的java版本)
alternatives --config java

There is 1 program that provides 'java'.

  Selection    Command
-----------------------------------------------
*+ 1           java-11-openjdk.aarch64 (/usr/lib/jvm/java-11-openjdk-11.0.19.7-3.oe2203sp1.aarch64/bin/java)

Enter to keep the current selection[+], or type selection number: 1

2、前端

dnf install nodejs
#配置国内源
npm config set registry https://registry.npm.taobao.org

3、maven

#下载maven二进制包 https://archive.apache.org/dist/maven/maven-3/
cd /usr/local
wget https://archive.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.zip
unzip apache-maven-3.0.5-bin.zip
cd apache-maven-3.0.5/conf/
#配置mvn源
vim settings.xml
    <mirror>
      <id>aliyunglobal</id>
      <mirrorOf>central</mirrorOf>
      <name>阿里云仓库</name>
      <url>https://maven.aliyun.com/repository/public</url>
    </mirror>
#配置环境变量
vim /etc/bashrc
export PATH=$PATH:/usr/local/apache-maven-3.0.5/bin/
source /etc/bashrc
mvn --version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 21:51:28+0800)
Maven home: /usr/local/apache-maven-3.0.5
Java version: 11.0.19, vendor: Bisheng
Java home: /usr/lib/jvm/java-11-openjdk-11.0.19.7-3.oe2203sp1.aarch64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.10.0-136.12.0.86.oe2203sp1.aarch64", arch: "aarch64", family: "unix"

4、编译

cd apache-cloudstack-4.18.0.0-src/packaging
vim centos8/cloud.spec
#配置编译过程跳过测试阶段
mvn -Psystemvm,developer $FLAGS clean package -DskipTests=true 
Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐