In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to mount disk and install docker in Linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Mount the disk to view the system partition and get the newly added disk. Fdisk-l
If there is no new disk information, you can restart the server by reboot.
The partition of the checked disk is shown in the following figure, and the red disk in the figure is the newly added disk information.
Partition the newly added disk fdisk / dev/sdb
/ dev/sdb is the disk partition checked. You need to refer to your own server.
Several steps are involved in this process, as shown in the following figure:
N: create a partition p: create a primary partition. You can select p or E1: set the partition number. You can choose the size of a 1-4 digital partition. If you do not want to set it, you can enter directly to the next step, which will be set according to the default size. P: print the current partition table, we can see the information after the partition w: save and update the formatted partition mkfs.ext4 / dev/sdb1
Format the partition sdb1 created in the previous step.
Create mount point mkdir / disk01 add mount point to boot mount echo "/ dev/sdb1 / disk01 ext4 defaults 00" > > / etc/fstab
Mount all partitions
Mount-a
Then execute the command df-h to check the mount of the disk. Dev/sdb1 has been mounted successfully.
Docker installation upload installation package and dependency package
Ticks have been downloaded and put together in advance and uploaded to the directory / home/docker. You can put them in different directories according to your choice.
Rpm install docker
Rpm command review:
-U or-upgrade upgrade the specified package file. -v shows the instruction execution process. The-h or-hash kit installation is listed with the flag-force forced replacement kit or file. -nodeps does not verify the correlation of package files.
1) batch install dependency packages
Cd / home/docker/package/rpm-Uvh * .rpm-nodeps-force
2) install container-selinux-2.9-4.el7.noarch.rpm
Cd / home/dockerrpm-Uvh container-selinux-2.9-4.el7.noarch.rpm
3) when installing docker, pay attention to the directory where the files are stored.
Cd / home/dockerrpm-Uvh docker-ce-17.12.1.ce-1.el7.centos.x86_64.rpm
4) start docker
Systemctl start docker
5) check the docker installation. If the docker command is executed successfully, it means that docker has been installed successfully.
Docker ps
6) modify the configuration file and add image settings, and you can add the image repository to this file. Restart docker after adding.
This is the end of vim / usr/lib/systemd/system/docker.service "how to mount disk and install docker on Linux". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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: 251
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.