Skip to main content

Manual Installation and Deployment

Take CentOS 7.9 server as an example

I. Environment Preparation

  1. Prepare a Linux server with minimum configuration requirements: 8 cores, 24G RAM, 40G data disk (except system disk). Recommended Servers. Make sure ports 8880, 38880, 38881 are not occupied.

  2. Log in to the server with the root user account

  3. Shut down Firewalld

    systemctl stop firewalld && systemctl disable firewalld
  4. Shut down SELinux

    setenforce 0
    sed -i s/"^SELINUX=.*$"/"SELINUX=disabled"/g /etc/selinux/config
  5. Adjust MaxMapCount

    sysctl -w vm.max_map_count=262144
    grep -q '^vm.max_map_count' /etc/sysctl.conf && sed -i 's/^vm.max_map_count.*/vm.max_map_count=262144/' /etc/sysctl.conf || echo 'vm.max_map_count=262144' >> /etc/sysctl.conf
  6. Adjust SysFileNr

    sysctl -w fs.file-max=2048000
    grep -q '^fs.file-max' /etc/sysctl.conf && sed -i 's/^fs.file-max.*/fs.file-max=2048000/' /etc/sysctl.conf || echo 'fs.file-max=2048000' >> /etc/sysctl.conf
  7. Adjust IPv4Forward

    sysctl -w net.ipv4.ip_forward=1
    grep -q '^net.ipv4.ip_forward' /etc/sysctl.conf && sed -i 's/^net.ipv4.ip_forward.*/net.ipv4.ip_forward=1/' /etc/sysctl.conf || echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf

Ⅱ. Docker Installation

  1. Download the installation package

    wget https://pdpublic.mingdao.com/private-deployment/offline/common/docker-20.10.16.tgz
  2. Unzip the package and move the file to the binary directory

    tar -zxvf docker-20.10.16.tgz
    mv -f docker/* /usr/bin/
  3. Create docker configuration file

    The default docker data directory is /data/docker, if you need to change the default data directory, you can change the data-root value in the above configuration file.

    mkdir -p  /etc/docker/
    cat > /etc/docker/daemon.json <<EOF
    {
    "registry-mirrors": ["https://uvlkeb6d.mirror.aliyuncs.com"],
    "data-root": "/data/docker",
    "max-concurrent-downloads": 10,
    "exec-opts": ["native.cgroupdriver=cgroupfs"],
    "storage-driver": "overlay2",
    "default-address-pools":[{"base":"172.80.0.0/16","size":24}]
    }
    EOF
  4. Configure systemd to manage docker

    cat > /etc/systemd/system/docker.service <<EOF
    [Unit]
    Description=Docker
    After=network-online.target
    Wants=network-online.target
    [Service]
    Type=notify
    ExecStart=/usr/bin/dockerd
    ExecReload=/bin/kill -s HUP \$MAINPID
    LimitNOFILE=102400
    LimitNPROC=infinity
    LimitCORE=0
    TimeoutStartSec=0
    Delegate=yes
    KillMode=process
    Restart=on-failure
    StartLimitBurst=3
    StartLimitInterval=60s
    [Install]
    WantedBy=multi-user.target
    EOF
  5. Start docker

    systemctl daemon-reload && systemctl start docker && systemctl enable docker

Ⅲ. HAP Standalone Installation

  1. Download the mirror (download offline package)

    docker pull registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-community:5.2.3
    docker pull registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-sc:2.0.0
    docker pull registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-command:node1018-python36
    docker pull registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-doc:1.2.0
  2. Download manager

    wget https://pdpublic.mingdao.com/private-deployment/5.2.3/mingdaoyun_private_deployment_captain_linux_amd64.tar.gz
  3. Create a directory and unzip the manager into the newly created directory

    mkdir /usr/local/MDPrivateDeployment/
    tar -zxvf mingdaoyun_private_deployment_captain_linux_amd64.tar.gz -C /usr/local/MDPrivateDeployment/
  4. Go to the directory where the manager is located and start the manager

    cd /usr/local/MDPrivateDeployment/
    bash ./service.sh start 
  5. After successful startup, access the it via http://{server IP}:38881 in your browser to complete the system access address setting and initialization (the initialization lasts about 5 minutes).