In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
What I said before: it only applies to pure rookies who have no back-end knowledge at all, because I am. It is recommended to learn about the directory structure of the Linux file system at first, and then to learn the Linux command line.
AWS, which is free for a year of use, can't be idle, so I want to take this opportunity to try to learn some back-end knowledge. At that time, I also looked confused to open the linux system directory with winSCP. Using PuTTY to open the command line mode is in the home directory by default. Although I finally successfully opened the server bound domain name, it can only show the power of the AWS tutorial. Write down what you have learned a little bit and share it with rookies like me.
Quick view of Linux file directory
├── bin / / Common commands ├── boot / / place some temporary startup files ├── cdrom / / ├── dev / / device files ├── etc / / all the configuration files of the system are placed under it in the ├── home / / user directory Corresponding permission users can only see their own directory │ ├── ec2-user / / aws login name ec2-user permission directory ├── lib / / dynamic libraries and module files used to access programs ├── lost+found / / used to store files lost in case of system exceptions ├── media / / used to hang on the local disk or other storage device ├── mnt / / used to hang in other temporary system files ├── opt / / ├── proc / / to contain information such as processes Not memory mapping, not real directory ├── root / / root user's directory ├── run / / ├── sbin / / there are many commands that can only be executed by root users. The abbreviation of ├── selinux / / ├── srv / / service for system update backup restore and switch machine is after some network services are started. These services require access to the data directory ├── sys / / system information ├── tmp / / to store various temporary files ├── usr / / our main operating space └── var / / variable files-files whose contents are constantly changing while they are running.
Follow the tutorial on the official website to open the Apache operating program
Tree catalogue map
Detailed explanation of catalogue
/ bin: the system has many directories where execution files are placed, but / bin is special. Because / bin places instructions that can also be operated in single-person maintenance mode. The instructions under / bin can be used by root and general accounts, mainly: cat,chmod (modify permission), chown, date, mv, mkdir, cp, bash and other commonly used instructions.
/ boot: mainly store the files used by the startup, including Linux core files, boot menu and configuration files needed to boot, etc. The common file name of Linux kernel is: vmlinuz, if you are using grub, the boot manager, the directory / boot/grub/ will also exist.
/ dev: on Linux systems, any devices and peripherals exist in this directory in the form of files. As long as you access a file in this directory, you are accessing a device. More important files are / dev/null, / dev/zero, / dev/tty, / dev/lp, / dev/hd, / dev/sd* and so on.
/ etc: almost all the main configuration files of the system are placed in this directory, such as personnel account password files, startup files of various services, and so on. Generally speaking, the properties of the files under this directory are accessible to the general user, but only root has the right to modify them. FHS recommends that you do not place executable files (binary) in this directory. The more important files are: / etc/inittab, / etc/init.d/, / etc/modprobe.conf, / etc/X11/, / etc/fstab, / etc/sysconfig/ and so on. In addition, the important directories under it are: / etc/init.d/: the default startup script for all services is placed here, for example, to start or disable iptables: / etc/init.d/iptables start, / etc/init.d/iptables stop
/ home: this is the default user's home directory (home directory). When you add a general user account, the default user home directory will be regulated here. More importantly, home catalogs have two code names:
~: represents the home directory of the current user
~ guest: represents the home directory with the user name guest.
/ lib: there are a lot of libraries in the system, and / lib places libraries that will be used when booting, as well as libraries that are called by instructions under / bin or / sbin. What is a function library? You can think of it as a plug-in, and some instructions must have these plug-ins in order to successfully complete the execution of the program. Of particular importance is the / lib/modules/ directory, which places core-related modules (drivers).
/ media:media is the English language of the media, and as the name implies, what is placed under this / media is a removable device. Including floppy disks, CD-ROMs, DVD and other devices are temporarily mounted here. Common file names are: / media/floppy, / media/cdrom, and so on.
/ mnt: if you want to mount some additional devices temporarily, it is generally recommended that you put them in this directory. In the early days, this directory was used for the same purpose as / media. It's just that with / media, this directory is used for temporary mount.
/ opt: this is the directory for third-party collaboration software. What is third-party collaboration software? For example, KDE, the desktop management system, is a stand-alone project, but it can be installed in Linux, so KDE's software is recommended to be placed in this directory. In addition, if you want to install additional software on your own (not provided by the original distribution), you can also install your software here. However, in previous Linux systems, we were used to placing it in the / usr/local directory.
/ root: home directory of the system administrator (root). The reason for putting it here is that if you enter single maintenance mode and mount only the root directory, it will be able to have root's home directory, so we will want root's home directory to be placed in the same partition as the root directory.
/ sbin:Linux has a lot of instructions to set the system environment, which only root can use to set the system, and other users can only query them at most. Put under / sbin is needed during the boot process, including the instructions needed to boot, repair, and restore the system. As for some server software programs, they are generally placed in / usr/sbin/. As for the system execution file (system binary) generated by the local self-installed software, it is placed in / usr/local/sbin/. Common instructions include: fdisk, fsck, ifconfig, init, mkfs and so on.
/ srv:srv can be regarded as an acronym for service, which is the data directory that some network services need to access after they are started. Common services such as WWW, FTP, etc. For example, the web data needed by the WWW server can be placed in / srv/www/. Hehe, it seems that the code we write should be put here.
/ tmp: this is the place for ordinary users or running programs to temporarily place files. This directory is accessible to anyone, so you need to clean it up regularly. Of course, important materials cannot be placed in this directory. Because FHS even suggests that all data under / tmp should be deleted when booting.
Contents of the usr directory
The directory where / usr/X11R6/: is placed for X Window System important data is named X11R6 because the last X version is version 11, and the release of that version for the sixth time is intended.
/ usr/bin/: most of the available instructions are placed here. Please notice the difference between him and / bin. (whether it is related to the boot process)
When we install some data in the header and include of programming languages such as / usr/include/:c/c++, we will use many of the include files when we install some data in tarball (* .tar.gz).
/ usr/lib/: contains libraries of applications, object files (object file), and execution files or scripts (script) that are not commonly used by ordinary users. Some software will provide some special instructions to set up the server, and these instructions will not be often operated by the system administrator, so they will be placed in this directory. It is important to note that if you are using the Linux system of X86room64, the / usr/lib64/ directory may be generated.
/ usr/local/: administrators install their own downloaded software on this machine (not the default provider of distribution). It is recommended to install it to this directory, which will be easier to manage. For example, if the software provided by your distribution is old, and you want to install newer software but do not want to remove the old version, you can install the new version of the software in the / usr/local/ directory, which is different from the old one. You can go to / usr/local to see for yourself, this directory also has bin, etc, include, lib... Subdirectory of
/ usr/sbin/: is not a system instruction required for the normal operation of the system. The most common is the service instruction (daemon) of some network server software.
/ usr/share/: where shared files are placed, the data placed in this directory is almost readable regardless of hardware architecture, because almost all of them are text files. Also common in this directory are these subdirectories: / usr/share/man: online help files
/ usr/share/doc: miscellaneous documentation for software
/ usr/share/zoneinfo: time zone file related to time zone
/ usr/src/: general source code is recommended to be placed here. Src means source. As for the core source code, it is recommended to put it in the / usr/src/linux/ directory.
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.
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.