Home > Article > Operation and Maintenance > How to start docker service in linux
1. Docker installation
Recommended: docker tutorial
Check your current kernel version through the uname -r command
uname -r
Log in to Centos with root permissions. Make sure the yum package is updated to the latest.
yum update
Uninstall the old version (if the old version has been installed)
sudo yum remove docker docker-common docker-selinux docker-engine
Install the required software packages, yum-util provides the yum-config-manager function, and the other two are dependent on the devicemapper driver
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
Set yum source
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
You can view all docker versions in all warehouses and select a specific version to install
yum list docker-ce --showduplicates | sort -r
Install Docker
sudo yum install <FQPN> # 例如:sudo yum install docker-ce-18.03.1.ce
Start and join the boot startup
sudo systemctl start docker sudo systemctl enable docker
Recommended learning: Linux video tutorial
The above is the detailed content of How to start docker service in linux. For more information, please follow other related articles on the PHP Chinese website!