Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

CentOS7 virtual machine installs and configures the docker suite

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

CentOS7 is a little more complicated than the one-click installation of ubuntu. Some partners complete the installation according to the next step and the next routine, and find that there is no graphical interface. In the pure command line, many partners are not suitable. Here, I will record the installation process of centos7 in vmware. Partners with no centos7 installation experience can refer to it.

1. Open vmware, create a virtual machine, select a CD, and next

two。 Choose traditional BIOS

3. Custom settin

4. Select the location to store the virtual machine, storage

5. Custom memory is 2G and disk is 40GB

6. Power on, select install CentOS 7

7. Select language

8. Select disk

9. Set up preinstalled softwar

10. Save memory and turn off kdump

11. Open the network and set the hostname

twelve。 Start installation

13. Set the root user password, create a user with sudo privileges, and set the password settings administrator user

Add a user with sudo permission

Wait for the reading note to be completed.

Restart

Agree to an agreement

Complete the setup

Log in

Start using

Installation succeeded

Adjust time zone

Choose Shanghai

After installation and configuration, enjoy Linux.

The advantage of Centos does not lie in the graphical interface. If you like linux with graphical interface, deepin and unbuntu are recommended here. If you have high requirements for the beauty of the interface, it is recommended that you try elementaryOS, which claims to be the most beautiful Linux.

Every time I get a brand new centos image, the first thing to do is to change the domestic source for centos and add a new yum source. Complain that the default yum source does not support commonly used software. For example, I want to install a python-pip. Sorry, no!

But fortunately, centos also leaves some leeway, you are free to add some of your favorite sources, such as epel (Extra Packages for Enterprise Linux)

The Enterprise Linux add-on package (hereinafter referred to as EPEL) is a Fedora special interest group to create, maintain, and manage a high-quality add-on package set for Enterprise Linux, including, but 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 the enterprise version of Linux or replace files with each other. The EPEL project is basically the same as Fedora, including the complete build system, upgrade manager, image manager, and so on.

Step 1: replace the Tsinghua yum source

1.1 backing up old yum sources

Sudo mv / etc/yum.repos.d/CentOS-Base.repo / etc/yum.repos.d/CentOS-Base.repo.bak

1.2 write the following to / etc/yum.repos.d/CentOS-Base.repo

# 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 this for 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-Basebaseurl= https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=osgpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#released updates [updates] name=CentOS-$releasever-Updatesbaseurl= https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/#mirrorlist=http:/ / mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updatesgpgcheck=1gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that may be usefull [extras] name=CentOS-$releasever-Extrasbaseurl= https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extrasgpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages [centosplus] Name=CentOS-$releasever-Plusbaseurl= https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplusgpgcheck=1enabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

1.3 refresh the yum source

Yum clean all & & yum makecache & & yum update

But yum source software is still too little, for example, I want to install only python-pip can't do it.

Step 2: install Ali epel source

Yum-y install epel-releasewget-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 happily install python-pip, yum install python-pip

Step 3: install docker and docker-compose

1. Install docker

# install dockersudo yum-y install docker# through the yum source to start dockersudo systemctl start docker# boot self-starting sudo systemctl enable docker

two。 Install docker-compose

Check sudo docker-compose-- version after sudo pip install docker-compose# installation is successful

3. Docker China's official image acceleration

Modify / etc/docker/daemon.json to add the following configuration

{"registry-mirrors": ["https://registry.docker-cn.com"]}"

Restart docker

Sudo service docker restart

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report