Directory configuration under Linux

The Chinese New Year holidays epidemic is serious, do not go home study. Work has been using linux operating system, but little knowledge of many of the module, not the bottom. The following finishing on something related to the directory.

1. root directory and the root directory / and the difference between / root directory?

A: Bird Brother borrow the words: root in this sense in Linux really a lot more to a lot of people do not understand - that's clitoris. If the "account" point of view, the so-called root refers to a "system administrator!" Identity, if the "directory" point of view, the so-called root meaning refers to the root directory is / friends ~ pay special attention to Oh!

Summary: root directory is usually said that the root directory / and / root is the root account's home directory. This compared with / home / username directory home special.

2. Some commonly used commands default search directories:

2-1) man (online help service) : By default, man will go to search / usr / local / man (/ usr / local / share / man) following documentation

         man detailed search path is visible profiles: /etc/man_db.conf configuration, modify the configuration file can add the search term. Probably configuration items as shown below:

Path is the executable file directory, MANPath related help document directory! To give an example :::

If you install the software placed in / usr / local / software /, then the man page search settings, you may want to have
40 to 50 lines around the inside /etc/man_db.conf, write the following line:
MANPATH_MAP / usr / local / software /  bin / usr / local / software / man so that man can use to query the online documentation of the software Hello!

2-2) library

The vast majority of libraries are placed: under / lib64, / lib directory!

In addition, Linux system kernel is actually inside a lot of libraries to provide, so where is the kernel library on? Oh! Is
in / lib / modules inside it

How to dynamically load the library cache in the game?
1. First of all, we have to write down in /etc/ld.so.conf which "want to read into the dynamic library cache among the directory where the"
pay attention Oh, is a directory rather than a file;
2. Next is the use ldconfig /etc/ld.so.conf of the executable file will be read into cache data among;
3. but also a record of the data in / etc / ld .so.cache this document them na!

2-3) yum and rpm

yum will update the list of requirements to the software library, wait until the list update to the machine / var / cache / yum inside

RPM files are installed on your Linux system. After installation, the software-related data will be written to / var / lib / rpm / database files in a directory

yum repository query url modify place: /etc/yum.repos.d/CentOS-Base.repo

yum command configuration file: /etc/yum.conf

2-4) after Centos7.x systemd service management involves catalog record:

 / usr / lib / systemd /
system /: After using the software provided by the official CentOS installation, the default startup script configuration files are placed here, try not to modify the data here -
when you want to modify, go to the / etc / systemd / system under preferred modification!
 / RUN / systemd / system /:
! service script execution produced in the system, the priority order than those scripts / usr / lib / systemd / system / high
 / etc / systemd / system / :
administrator execute a script based on the needs of the host system established, in fact, a bit like the directory function before /etc/rc.d/rc5.d/Sxx like!
execution priority order surpasses / run / systemd / system / high ! Oh
 / etc / sysconfig / *:
almost all the services will be initialized to set some options written to this directory, for example, mandb to be updated man page
index, parameters need to be added on to write man-db in this directory among Oh! and set the network is written
in the / etc / sysconfig / network-scripts / directory. Therefore, the files in this directory are also very important;
 / var / lib /:
Some services will generate the data will be written to his data to / var / lib / directory. For example, a database management system Mariadb number of
databases the default is the writing / under var / lib / mysql / directory it!
 / RUN /:
Daemon to place a lot of temporary files, including the lock file, and PID file, and so on.

2--5) systems are set to face ah service and port number of the services file: / etc / services

Please pay special attention! Although sometimes you can by modifying / etc / services to change the port number of a service, do not
over do not recommend doing so, as is likely to cause an error condition of some agreements! Is noted here some Yo! (unless you want to set up a network of underground
station, otherwise, use the / etc / services originally set thousand million!)

 

 

 

Published 15 original articles · won praise 0 · Views 3046

Guess you like

Origin blog.csdn.net/xx_ay/article/details/104163362