Manual Installation and Deployment
Take CentOS 7.9 server as an example
I. Environment Preparation
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.Log in to the server with the root user account
Shut down Firewalld
systemctl stop firewalld && systemctl disable firewalld
Shut down SELinux
setenforce 0
sed -i s/"^SELINUX=.*$"/"SELINUX=disabled"/g /etc/selinux/config
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
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
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
Download the installation package
- Internet Access Available
- Internet Access Unavailable
wget https://pdpublic.mingdao.com/private-deployment/offline/common/docker-20.10.16.tgz
# Download link for the installation package. After downloading, upload it to the deployment server.
https://pdpublic.mingdao.com/private-deployment/offline/common/docker-20.10.16.tgzUnzip the package and move the file to the binary directory
tar -zxvf docker-20.10.16.tgz
mv -f docker/* /usr/bin/
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}]
}
EOFConfigure 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
EOFStart docker
systemctl daemon-reload && systemctl start docker && systemctl enable docker
Ⅲ. HAP Standalone Installation
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
Download manager
wget https://pdpublic.mingdao.com/private-deployment/5.2.3/mingdaoyun_private_deployment_captain_linux_amd64.tar.gz
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/
Go to the directory where the manager is located and start the manager
cd /usr/local/MDPrivateDeployment/
bash ./service.sh start
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).