2020 Linux operation and maintenance common interview questions

1. Draw the system application architecture diagram

2. Write down the difference between LVS and nginx:
LVS: strong anti-load capability, working 4 layers, simple configuration, very stable, no traffic
nginx: working on the 7th layer of the network, supporting HTTP applications for offloading

3. The current database service processing speed is slow. What do you think may be the cause, and explain the corresponding solutions.
Server hardware problems (disk I/O, insufficient memory)
insufficient bandwidth.
Server system parameter problems.
Programming problems, no indexing
The amount of data is too large (partitioning, sub-table, sub-database joint query)
query statement problem (optimized query statement)

4. Tell me about the storage engine you know, how to decide the table to use the storage engine
InnoDB storage engine
MyISAM storage engine
MEMORY storage engine
if you want to provide transaction security (ACID compatible) capabilities for submission, rollback, and crash recovery capabilities, and require To achieve concurrency control, InnoDB is a good choice.
If the data table is mainly used for inserting and querying records, the MyISAM engine can provide higher processing efficiency.
If the data is only temporarily stored, the amount of data is not large, and no higher data security is required. You can choose the Memory engine that saves data in memory. MySQL uses this engine as a temporary table to store the intermediate results of the query.
If there are only INSERT and SELECT operations, you can choose Archive. Archive supports highly concurrent insert operations, but it is not. The transaction is safe. Archive is very suitable for storing archived data. For example, you can use Archive
5 to record log information . What are the disadvantages of a single table that is too large? How to solve the problem?
It is difficult to filter out the required data in a short time. Part of the data should be filtered out of the large data volume table. Data will generate a lot of disk io, reducing disk efficiency. It
takes a long time to
build indexes. Mysql <5.5 Indexing will lock the table
Mysql >=5.5 Indexing will cause the master-slave delay to
modify the table structure. It takes a long time to lock the table, which will cause a long time. The master-slave delay
solution:
partition, table, database query
6, give you 50 servers, explain how to design your topology
Ceph
Admin 1 OSD, MDS 6 Keepailved + LVS 1 master 3 slave
Nginx + PHP 10 station
NFS 1
Redis+sentinel 1 Master 4 Slave
Mycat+keeplived 1 Master 3 Slave
Mysql+MGR 1 Master 9 Slave
Backup machine 1
Jumpserver 1
Grafana 1
Zabbix 1
GitLab 1
Jenkins 1
ELK 2
disaster recovery 1

7. If you are a database administrator, explain how you can add authorized users to the server.
Each service corresponds to a running user. For users, specify the network segment and ip authorization.

8. If you are a database administrator, explain how you can back up your data.
Use logical backups, push mysqldump to the external network backup machine regularly every day, and do regular tasks to delete historical backups regularly.

9. What are the current common database software? When building a database cluster, how do you choose which software to use
Oracle, SQL Server, Mysql, MariaDB, Redis, Mongodb
oracle database is a large-scale relational database, and you will know how to use it Fees are often used by banks and financial institutions to store large amounts of data, analyze and process large amounts of data, and use access control and multiple data backup mechanisms in terms of security with high reliability.
MySQL, as an open source lightweight database, is more popular among open source databases. Because of its compact size and easy installation, it is often used by Internet companies and is also more convenient to maintain. MySQL may not be as powerful as Oracle in terms of function, but it is more resourceful Occupies very little, and data recovery is fast. In maintenance, the pursuit of stable performance and ease of use.
As a cache database, redis is very fast for data reading and writing. The reason why redis is fast is that the data is stored in memory, but the memory is more expensive. On the other hand, the memory is also limited. When the memory is not enough, it will Need to use redis distributed solution. As a non-relational database, redis can be applied to high-concurrency scenarios. It can be used as a high-speed cache with a relational database. It can also reduce disk IO and use key-value pair storage. It is not suitable for complex sql data.
Mongodb is suitable for websites. Real-time storage replication and highly scalable type, with powerful real-time storage, insertion and query functions. In addition, Mongodb is very suitable for querying address coordinates and is suitable for lbs applications. The disadvantages are also obvious. Although the sql query is used, there is a gap with the mysql query; there is no guarantee in transaction processing

10. What is the role of numeric type width in mysql database service?
Regardless of Chinese or English or punctuation, the total number can be input

11. Before configuring mysql master-slave synchronization, how to ensure that the data of the master database and the slave database are consistent?
Database lock table, import the complete backup database into the slave database

12. What risks do you think are there in the transmission of information?
Data leakage caused by packet capture, the requested data is modified, the data is monitored by the middleman, and it is sent to the server again

13. When monitoring a server, what resources do you think should be monitored:
CPU, memory, hard disk space, load, virtual memory, application services, logs, traffic

14. The difference between symmetric encryption and asymmetric encryption.
Symmetric encryption: The same key is used for encryption and decryption.
Asymmetric encryption: Unlike symmetric encryption algorithms, asymmetric encryption algorithms require two keys: public key and private key. Key

15. How to know whether the website service on a host is running.
Use the Zabbix monitoring program to monitor the website service.
Use the script to detect the status of the website service in real time

16. How to allow ordinary users of the system to have root privileges, and under what circumstances need to be modified.
By modifying the /etc/sudoers file, ordinary users can execute sudo commands. For
example, ordinary users can use the date command to modify the system date. The date command requires root privileges to execute

17. What are the components of openstack?
Keystone: authentication management service, providing authentication information/token management, creation, modification, etc. of all other components, using MySQL and other databases to store authentication information
Glance: image management service, providing what can be provided when deploying virtual machines Image management, including image import, format and production of corresponding templates
Nova: computing management service, providing Nova management of computing nodes, using Nova-API for communication
Neutron: network management service, providing network topology of network nodes Management, while providing Neutron's management interface in
Horizon Horizon: console service, which provides management of all services of all nodes in the form of Web, usually this service is called Dashboard

18. When configuring httpd server, how to quickly add a new virtual host
Alias ​​/phpdata/ “/usr/local/phpdata/”
<Directory “/usr/local/phpdata/”>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted

19. What are the commands to kill the process?
Kill killall kill -9
20. What
is the principle of mysql? Mysql is composed of SQL interface, parser, optimizer, cache, and storage engine.
Update the flow of a statement.
update tb_area SET area_name = "beijing" WHERE area_id = 1
1) First, the executor finds this record by id (search tree or find data page) and loads it into memory.
2) Then call the engine write interface for the area_name of this record to modify it.
3) Modify the value in the memory, and update the redolog to inform the executor to complete the writing (the status is set to prepare), and the transaction can be submitted. The executor records the operation record in the binlog and writes it to the disk.
4) Complete the above series of operations , The executor calls the transaction commit interface (redolog status is set to commit) to complete the update operation.
If you need to see more interview questions, you can follow 51cto students to search for Zhang Kai:
https://edu.51cto.com/sd/9529c

Guess you like

Origin blog.csdn.net/qq_39418469/article/details/108618983