Preparing the Environment
The server OS is openEuler 20.03 LTS SP1.
- Configure the mirror source.
- Configure the local liboath source.
- Create a directory used as the Yum source.
mkdir -p /home/oath
- Copy all files in the /root/rpmbuild/RPMS/ directory of the compilation server to /home/oath/.
- Use the copied RPM package as the local Yum source.
1 2
cd /home/oath createrepo .
If the createrepo command is not found, run the yum install createrepo command.
- Create a directory used as the Yum source.
- Configure the Repo file.
1vi /etc/yum.repos.d/local.repoAdd the following content to the file:1 2 3 4 5 6
[local-oath] name=local-oath baseurl=file:///home/oath enabled=1 gpgcheck=0 priority=1
- Add an external mirror source.
1vi /etc/yum.repos.d/openEuler.repoAdd the following content:
1 2 3 4 5 6
[arch_fedora_online] name=arch_fedora baseurl=https://repo.huaweicloud.com/fedora/releases/34/Everything/aarch64/os/ enabled=1 gpgcheck=0 priority=2
If the connection to the external mirror source fails, delete the mirror source information from [arch_fedora_online] and manually download compat-openssl10-1.0.2o-5.fc30.aarch64.rpm.
Download address: https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Everything/aarch64/os/Packages/c/
- Add a Ceph source and create ceph.repo.
1vi /etc/yum.repos.d/ceph.repo
Add the following content:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
[Ceph] name=Ceph packages for $basearch baseurl=http://download.ceph.com/rpm-nautilus/el7/$basearch enabled=1 gpgcheck=1 type=rpm-md gpgkey=https://download.ceph.com/keys/release.asc priority=1 [Ceph-noarch] name=Ceph noarch packages baseurl=http://download.ceph.com/rpm-nautilus/el7/noarch enabled=1 gpgcheck=1 type=rpm-md gpgkey=https://download.ceph.com/keys/release.asc priority=1 [ceph-source] name=Ceph source packages baseurl=http://download.ceph.com/rpm-nautilus/el7/SRPMS enabled=1 gpgcheck=1 type=rpm-md gpgkey=https://download.ceph.com/keys/release.asc priority=1
- Update the Yum source.
1yum clean all && yum makecache
- Configure the local liboath source.
- Install Java.
- Decompress OpenJDK8U-jdk_aarch64_linux_hotspot_jdk8u282-b08.tar.gz to the /usr/local directory.
1 2
cd /home tar -zxvf OpenJDK8U-jdk_aarch64_linux_hotspot_jdk8u282-b08.tar.gz -C /usr/local/
- Configure Java environment variables.
- Modify the environment variables.
1vi /etc/profileAdd the following content to the end of the file:
1 2
export JAVA_HOME=/usr/local/jdk8u282-b08 export PATH=${JAVA_HOME}/bin:$PATH
- Make the environment variables take effect.
1source /etc/profile
- Check whether the installation is successful.
1java -version
- Modify the environment variables.
- Decompress OpenJDK8U-jdk_aarch64_linux_hotspot_jdk8u282-b08.tar.gz to the /usr/local directory.
Parent topic: Server