Linux operation and maintenance interview questions

User 8639654 2022-06-24 05:28:29 阅读数:46

linuxoperationmaintenanceinterviewquestions

1、 Please briefly RAID0、RAID1 and RAID5 Characteristics and principles of ?

RAID0( Redundant array of independent disks )

It must be composed of two or more hard disks

The size of each hard disk must be the same

In all dynamic disks , Data is read and written fastest

The probability of damage is relatively high

No disk fault tolerance

RAID1( Mirror volume )

Consisting of two pieces or 2 Multiple hard disk composition

Each hard disk must be the same size

Hard disk usage is only 50%, The writing speed is the slowest

Have disk fault tolerance function

RAID5

It consists of three or more hard disks

Each hard disk must be the same size

Disk utilization is n-1 Block plate ( One piece is reserved for parity check )

Using parity ( Exclusive or ), Fault tolerant ( Only 1 Broken disk )

soft RAID: Simulated by the operating system RAID, Once the hard disk is damaged , The operating system will be damaged ,RAID Will lose its function ( Practice simulating the use of )

hard RAID: Independent of the hard disk , Hardware RAID Card composition ; Even if the hard disk is damaged , It will not lead to RAID Card damage , Disk fault tolerance works .

2、 For a brand new Linux System , What system optimizations do you usually do ?

Disable unnecessary services

Avoid direct use of root user , Ordinary users use sudo Authorized operation

Lock important system files

Configure domestic yum Source

Configure the maximum number of files opened by the system at the same time

Synchronization time server

change ssh Default port for service , To configure SSH Key login

Reasonable configuration IPtables Firewall rules

Regularly back up important system files

3、MySQL What is index in , To put it simply, the disadvantages of indexing ?

An index is essentially a data structure , Because it satisfies a specific search algorithm , So it can improve the search efficiency .

Classification of indexes :

primary key

Single value index An index contains only a single column , A table can have multiple single-column indexes . If the field will be frequently used for retrieval, it can be indexed with a single value

Composite index An index contains multiple columns , Such age + name . Better not exceed 5 A field

unique index All column values must be unique , But null values are allowed

Ordinary indexes and unique indexes can be called secondary indexes

Inferiority :

The index is actually a table , The table holds the primary key and index fields , And points to the record of the entity table , Index columns should also take up space .

Although the index greatly improves the query speed , But it will reduce the speed of updating the table , Such as on the table INSERT,UPDATE,DELETE. Because the update represents ,Mysql Not only to save data , Also save the fields in the index file that have index columns added every time it is updated , Will adjust the index information after the key value changes due to the update .

Indexing is just one factor in improving efficiency , If Mysql Tables with big data , It takes time to research and build the best index , Or optimize the query .

4、 Simply talk about improvement MYSQL What are the ways of the security level of ?

modify mysql Default port

linux You can go through iptables To restrict access mysql Port of IP Address

Set complex passwords for all users and strictly specify the access of corresponding accounts IP( Can be found in mysql In the library user The users specified in the table can access IP Address )

root Handling of privileged accounts ( Suggestions for root Account set strong password , And specify that only local login is allowed )

Enable binary query log and slow query log

mysql Installation directory and data storage directory permission control

It's useless to delete mysql Account and delete useless database

5、 sketch ftp、https、smtp、pops、ssh Port number ?

ftp(20 and 21)、https(443)、smtp(25)、pops(110)、ssh(22)

copyright:author[User 8639654],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/175/20210812143158219h.html