CentOS7 is slightly more complicated than the one-click installation of ubuntu. Some small partners follow the next step, and the next step is to complete the installation. They found that there is no graphical interface. In the pure command line, many small partners are not suitable, here I Record the installation process of centos7 in vmware, and those without centos7 installation experience can refer to it
Every time I get a brand new centos mirror, the first thing is to replace the domestic source for centos, add a new yum source, and vomit, the default yum source really does not support common software, such as I want to install A
python-pip
, sorry, no!
Fortunately, centos also leaves room, you can freely add some sources you like, such as epel (Extra Packages for Enterprise Linux)
Enterprise Linux add-on packages (hereinafter referred to as EPEL) is a Fedora special interest group to create, maintain, and manage a high-quality set of add-on packages for Enterprise Linux. The targets include but are not limited to Red Hat Enterprise Linux (RHEL), CentOS, Scientific Linux (SL), Oracle Linux (OL).
EPEL packages usually do not conflict with packages in the official source of Enterprise Linux, or replace files with each other. The EPEL project is basically the same as Fedora, including a complete build system, upgrade manager, image manager, and so on.
sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use thisfor CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you,as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[ base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
# released updates
[ updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
# additional packages that may be useful
[ extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
# additional packages that extend functionality of existing packages
[ centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
yum clean all && yum makecache && yum update
python-pip
can not doyum -y install epel-release
wget -O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo
# Refresh yum source
yum clean all && yum makecache && yum update
At this point, we can install python-pip happily, yum install python-pip
# Install docker through yum source
sudo yum -y install docker
# Start docker
sudo systemctl start docker
# Self-start
sudo systemctl enable docker
sudo pip install docker-compose
# Check after successful installation
sudo docker-compose --version
/etc/docker/daemon.json
, add the following configuration{" registry-mirrors":["https://registry.docker-cn.com"]}
sudo service docker restart
Recommended Posts