In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article focuses on "how to install LXC, a lightweight kernel virtualization technology in linux systems". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install LXC, a lightweight kernel virtualization technology in linux systems.
The Chinese name of LXC is Linux container tool. Containers can provide lightweight virtualization to isolate processes and resources. The advantage of using LXC is that it does not need to install too many software packages, and the use process will not take up too many resources. This paper introduces the establishment and management of LXC step by step, as well as the setting method of virtual network interface.
LXC relies on cgroups (Control Groups) system of Linux kernel for resource management. Cgroups system is a process group-based resource management framework provided by Linux kernel, which can limit the resources that can be used for specific process groups. It was originally proposed by Google engineers and later integrated into the Linux kernel. Cgroups is also a resource management tool used by LXC to achieve virtualization. LXC has entered the Linux kernel, which means that LXC technology will be the most competitive lightweight virtual container technology.
1. Build the first LXC virtual computer.
# yum install lxc*
2. To check the LXC support of the kernel of the Linux distribution after installing the package, use the following command
# lxc-checkconfig
# after the lxc-checkconfig command checks, if all items show "enabled", you can use LXC directly
3. Establish a fedora Server LXC virtual computer system.
# lxc-create-t fedora-n testA
# fedora template is used here, and the template file is saved in the / usr/lib/lxc/templates/ directory
After the above command is completed, the virtual machine testA will be generated in the / var/lib/lxc directory
4. Check the created virtual machine system
# tree-L 2 / var/lib/lxc/
5. Start the LXC virtual computer
# lxc-start-n testA
Log in to the virtual computer after confirming the account number and password
6. List all the containers in the current system
# lxc-ls
7. Log in to the container using console
# lxc-console-n testA-t 3
8. Stop running a container
# lxc-stop-n testA
9. Get the status of a container
# lxc-info-n ol6ctr1
10. Destroy a container
# lxc-destroy-n testA1
11. Copy a container
# lxc-clone-o testA-n ol6ctr2
12. Pause or resume a container
# lxc-freeze-n testA
# lxc-unfreeze-n testA
13. Modify LXC network interface
# vi / etc/default/lxc
# restart the network service after modification
# service lxc-net restart
At this point, I believe you have a deeper understanding of "how to install LXC, a lightweight kernel virtualization technology in linux systems". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.
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.