In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
As more and more people come into contact with the Linux system, they all know that everything in the Linux system is files, and the files are stored in various directories, so it is particularly important to know what types of files are stored in each directory. The experimental environment does not need to be so meticulous, but in the actual production environment, the server is not maintained by one person. If each directory under the Linux system can be strictly and standardized managed, then the root of the problem can be located quickly.
1. The basis of Linux directory configuration-- FHS
Because there are too many companies and individuals using Linux system to develop products, if everyone uses their own ideas to configure the directory where the files are placed, it may cause a lot of management problems. I can't imagine: if you just enter a new company and log in to the Linux system and find all kinds of files in the directory, you will definitely be black in front of your eyes! So, there is the FHS standard!
According to FHS's standard documents, their main goal is to let users know that installed software is usually placed in that directory, so they want independent software developers, operating system makers, and users who want to maintain the system to be able to follow FHS standards. In other words, the focus of FHS is to specify what kind of data files should be stored in each particular directory. This has a lot of benefits, because the Linux operating system can develop the independent style that developers want from the existing look.
According to the frequency of file usage and whether users are allowed to change at will, FHS defines the directory as four forms of interaction, expressed in the form of tables, as shown in the figure:
There are only some representative catalogs in the table.
1. The meaning and content of the root directory (/):
The root directory is the most important directory in the whole system, because not only all directories are derived from the root directory, but also related to boot / restore / system repair and other work. Because the system needs specific boot software, core files, programs needed to boot, function libraries and other file data, if there is an error in the system, the root directory must also contain programs that can repair the file system.
Therefore, the FHS standard recommends that the fewer directories under the partition where the root directory resides, the better. Therefore, it would be nice to have these subdirectories under the root directory (/) defined by FHS. As shown in the figure:
In fact, there are some more important directories to know, as shown in the figure:
The meaning of 2./usr directory
According to FHS's suggestion: the data placed in / usr is shareable and immutable. In general, several common directories are recommended under the / usr two-tier directory, as shown in the figure:
The meaning of 3./var directory
Because / usr is a directory that takes up a large amount of hard disk capacity during installation, / var will not build a directory that takes up hard disk capacity until the system is running. Common two-tier directories under the / var directory, as shown in the figure:
Second, directory tree
Under Linux, all files and directories start from the root directory! That is the source of all directories and files, and then branch down one by one, which is a bit like a tree. Therefore, we also call this kind of directory configuration-- directory tree.
The main features of the directory tree:
The starting point of the directory tree is the root directory; each directory can use not only the local file system, but also the network file system; the file name (plus absolute path) of each file in this directory tree is unique.
If the entire directory tree is displayed as an icon and the more important file data is listed, the directory tree structure looks something like this, as shown in the figure:
For more information about the directory, you can check the contents of the table in front of the blog!
Third, the version information of Centos
When the system installs a variety of services, the version information of the server is particularly important. Command to view version information:
[root@localhost ~] # uname-r 3.10.0-957.el7.x86_64// View Core version [root@localhost ~] # uname-mx86_64// View operating system bit version [root@localhost ~] # cat / etc/redhat-release CentOS Linux release 7.6.1810 (Core) / / View system Information [root@localhost] # yum-y install redhat-lsb// Security Install the lsb_release command [root@localhost ~] # lsb_release-aLSB Version:: core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarchDistributor ID: CentOSDescription: CentOS Linux release 7.6.1810 (Core) Release : 7.6.1810Codename: Core// to view detailed system information However, the "lsb_release-a" command needs to be installed before it can be used!
That's all about the directories under the Linux system!
-this is the end of this article. Thank you for reading-
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.