Install the system update the system, refer to " one Thingsboard learning CentOS install system updates "
Try to update system
yum update
Add a user and password, and increased user administrator
# Add User (optional) sudo adduser weschen # for the new user password sudo passwd weschen # to add a new user sudo privileges sudo echo ' weschen ALL = (ALL) ALL ' >> / etc / sudoers
Try uninstalling the old version docker
# 卸载旧版本Docker软件 sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine \ container*
Start the installation docker, specify the version 18.06.3
# Custom Installation version Export docker_version = 18.06 . 3 # the STEP 1 : Install the required number of system tools sudo yum the Remove-Docker Docker Docker-Client Client- Latest \ Docker the -common Docker Docker-Latest-latest- logrotate \ Docker -logrotate docker- Engine - Y the sudo yum Update - Y the sudo yum the install -Y yum -utils-persistent- Device-Mapper Data \ LVM2 the bash - Completion # the Step 2 : Add the software source information the sudo yumManager --add---config repo \ HTTP: // mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo # the Step 3 : Update and install Docker- CE sudo yum makecache All Version = $ ( yum List Docker-ce.x86_64 --showduplicates | Sort -R & lt | grep $ docker_version {} | awk ' {} Print $ 2 ' ); the sudo yum -Y the install --setopt Obsoletes = = 0 Docker-CE - Version $ { Docker-CE-selinux-} $ {version}; # if installed higher version Docker, installation can be degraded (optional) yum= = Obsoletes --setopt downgrade 0 -Y-CE docker - $ {Version} docker-CE-selinux- $ {Version}; # docker added to the current user group the sudo the usermod - aG docker weschen # Set boot the sudo systemctl enable docker
Configuration accelerator
sudo mkdir -p /etc/docker; sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://XXXXXXX.mirror.aliyuncs.com"] } EOF sudo systemctl daemon-reload; sudo systemctl restart docker;
Download Docker-Compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
General download will take some time, you can also download a good client computer and then spread to the server
Docker-compose authorization to file and creates a file association
sudo chmod +x /usr/local/bin/docker-compose sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Use docker-compose command to verify whether the installation was successful
docker-compose --version
Moving map presentation