2022年7月

转发:https://www.jianshu.com/p/3e6d5da2db81

# 列出所有磁盘信息
$ sudo fdisk -l 

# 建立分区
$ sudo fdisk /dev/sdb

# 然后依次输入
$ n (新建分区表)
$ p (主分区,然后根据提示操作)
$ w (保存分区信息)
$ sudo mdadm --create  --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm: Note: this array has metadata at the start and
    may not be suitable as a boot device.  If you plan to
    store '/boot' on this device please ensure that
    your boot-loader understands md/v1.x metadata, or use
    --metadata=0.90
mdadm: size set to 20953088K
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.

JAVA_HOME

#JAVA_HOME
export JAVA_HOME=/opt/jdk1.8.0_201
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH