"Linux Operations engineer face test Summary" first set

Source: Internet
Author: User

1. Brief description of common service ports

Answer:

http:80 ftp:21 dns:53 pop3:110 smtp:25 ssh:22 nginx:80 squid:3128 nagios:5666

memchached:11211 mysql:3360 tomcat:8080 nfs:2049 tlenet:23 https:443 samba:udp 138 TCP 139

postfix:25 imap:143 zabbix:10051 dhcp:68

2. What does the 1u,2u,3u,4u server mean?

Answer:

This refers to the server size specification 1u=4.45cm

2u=8.9cm 3u=4.45cm * 3

4u=4.45cm * 4 This refers to the height of the server

3. What are the types of servers?

Answer:

1, Rack-mount Server
2, Blade server
3, tower-type server
4, cabinet-type server

4. Two types of twisted pair line sequence?

Answer:

T568A: White green, green, white orange, blue, white blue, orange, white brown, brown

T568B: White orange, orange, white green, blue, white blue, green, white brown, brown

5. List The OSI seven layer model from high to low? Which layer does the switch mainly work on? What layer does the router work on?

Answer:

Physical layer, Data link layer, network layer, transport layer, Session layer, presentation layer, application layer

Switch works on: Data Link Layer router works on: Network layer

6. What is the default port for the following services?

Answer:

Ssh,telnet,smtp,pop3,dns

22, 23, 25, 110, 53

7. Minimum number of drives required for each RAID level: raid0= raid1= raid5=

Answer: raid0= 2 raid1= 2 raid5=3

What is the default port for 8.windows server Remote Desktop?

Answer: 3389

9. In a Linux system, use recursion to set the permissions for all subdirectories and files in the "/usr/src/" directory to "rw-r--r--".

Answer:

Chmod-r 644/USR/SRC

10. What is the difference between a standard access control list and an extended access list?

Answer:

Standard access Control list: Allows or denies packets based on the source IP address of the packet. The Access Control list number is 1-99.

Extended access Control List: Allows or denies packets based on the source IP address, destination IP address, specified protocol, port, and flag of the packet. The Access Control list number is 100-199.

11. What is the enclosure 1U? What is the value?

Answer: Refers to the thickness of the server. 1U equals 4.45 centimeters.

12. A 42U standard, the cabinet can put down a few 3U servers?

Answer: 13 units

13. Determine the parameter metrics for an enterprise-class hard drive?

Answer:

1. Hard Drive Speed! The higher the speed, the faster the read and write speed!

2. Hard disk memory memory size will affect the hard disk read and write speed! The general minimum is 2M maximum can be up to 32M

3. The amount of hard disk storage! More than you need to choose Minimum 80G max to 10T 10000G

4. The interface of the hard disk IDE SATA The former commonly known as the same port and the latter for the serial port in general, the former is more stable than the latter, but the transmission speed is not the latter speed is very good but not very stable often appear bad times than the IDE's faster

14. Describe the difference between the more and less commands?

Answer:

More can't page forward, less can page forward

15. What is the concept of a hot spare disk?

Answer:

Hot spare the role of the equivalent is to make a backup in the raid, for example, the raid is only allowed to bad one disk in the case of the system and data is still normal operation, but the bad two is not, but add a hot spare can be at the same time bad two disks are no problem, there is a more insurance.

Principle:
The hot spare is the equivalent of multiple backups for the RAID array, and if one of the disks in the raid display is broken, the hot spare will replace the bad disk in the raid, and use the XOR algorithm to make the data on the bad disk intact and store it in the hot spare. This means that the raid is not damaged, and then you can replace the bad disk with the same disk, and the raid and hot spare are in good condition!

16. How to permanently set up network information in Linux, ip:192.168.1.10, subnet mask: 255.255.255.0 gateway: 192.168.1.1?

Answer:

Vim/etc/sysconfig/network-scripts/ifcfg-eth0

ipaddr=192.168.1.10

netmask=255.255.255.0

gateway=192.168.1.1

17. How do I turn off the firewall under Linux?

Answer:

/etc/init.d/iptables Stop #临时关闭

Vim/etc/profile > Write Iptables-f #永久关闭

What is the meaning and advantage of 18.RAID? What are the RAID0, RAID1, RAID5, respectively, and their respective characteristics?

Answer:

1) RAID: Inexpensive redundant disk array, refers to the hardware/software technology to integrate multiple small/low-speed disks into a large disk using a storage technology, which can not only store data, but also to achieve a certain degree of redundancy, with "fast speed, high security" advantage.

2) The meanings and characteristics of RAID0, RAID1 and RAID5 are as follows:

RAID0: Stripe mode, consisting of two or more than two disks, the same document scattered on different disks, parallel write, improve write efficiency.

RAID1: Mirror mode, consisting of at least two disks, the same file is written to a different disk, each disk data, the same fault tolerance, improve read efficiency.

RAID5: Distributed parity-independent disk mode, combined with the benefits of RAID0 and RAID1, while avoiding their drawbacks. The redundancy is made up of at least 3 disks of the same size.

19. Perform a MySQL data backup every night 00:00, write out the crontab configuration item?

Answer: 0 0 * * * mysqldump-uroot-p123456--flush-logs database name > backup file name

20. What are the instructions for viewing the iptables default policy?

Answer: Iptables-l

21.iptables Open port 80 Port statement how to write?

Answer: iptables-i input-p tcp--dport 80-j ACCEPT

What is the difference between 22.TCP and UDP?

Answer:

TCP---Transmission Control Protocol, providing a connection-oriented, reliable byte-stream service. Before the customer and the server Exchange data with each other, a TCP connection must be established between the two parties before the data can be transferred. TCP provides time-out re-send, discard duplicate data, test data, flow control and other functions to ensure that data can be transmitted from one end to the other.

UDP---User Datagram Protocol, is a simple transport layer protocol for datagram. UDP does not provide reliability, it simply sends the application to the IP layer's datagram, but does not guarantee that it will reach its destination. Because UDP does not have to establish a connection between the client and the server before transmitting the datagram, and there is no mechanism such as time-out retransmission, the transmission speed is very fast.

23. Briefly describe the Linux startup process?

Answer:

Load BIOS, check hardware information

Read and execute the first boot in-device MBR

Run GRUB boot Load kernel

Kernel Boot/sbin/init Program

Init system Initialization

Determining the default Run level

Trigger RunLevel event, run/ETC/RC.D/RC

Final execution/etc/rc.d/rc.local

Load terminal or X-window interface

24. RAID0 RAID1 RAID5 Three kinds of working principles and characteristics?

Answer:

RAID 0: Split data sequentially in bits or bytes, read/write on multiple disks in parallel, and therefore has a high data transfer rate, but it has no data redundancy.
Therefore, it is not a real RAID structure. RAID 0 simply improves performance and does not guarantee the reliability of the data, and one of the disks
Failure will affect all data. Therefore, RAID 0 cannot be applied to situations where data security requirements are high.

RAID 1: It is data redundancy through disk data mirroring, resulting in mutually backed-up data on paired independent disks. When raw data is busy, you can directly
Reads data from a mirrored copy, so RAID 1 can improve read performance. RAID 1 is the highest unit cost in a disk array, but provides a high level of data security
and availability of the system. When a disk fails, the system can automatically switch to read and write on the mirrored disk without having to reorganize the failed data. In simple terms:
Mirror structure, similar to backup mode, one data is copied to two hard drives.

RAID5: Distributed parity independent disk structure, its parity code exists on all disks, any one hard disk damage, can be based on other hard disk
To reconstruct the corrupted data by the check digit on the Supports a disk that is still running normally after it is dropped.

25.tail command output file ABC last 20 lines?

Answer: tail-20 2BC

26. In the/var/log/directory, find the file name that starts with Vmker and print the path?

Answer: ls/var/log/| grep ^vmker

27. Write a script to find the last created time is 3 days ago, the suffix is *.log file and deleted.

Answer: Find/-name ". Log"-ctime +3-exec rm-f {} \;

28. Write a script to move files larger than 100K in the directory to/tmp?

Answer:

#!/bin/bash

For file in ' Ls/root '
Do
If [-f $file]
Then
If [' ls-l $file |awk ' {print $10000} '-GT
Then
MV $file/tmp/
Fi
Fi
Done

29. Use Iptables to forward the local 80 port request to port 8080, the current host IP is 192.168.10.1?

Answer:

Iptables-a prerouting-d 124.42.60.109-p tcp-m tcp–dport 80-j dnat–to-destination 10.0.0.18:9000

30.Linux every Saturday 04:20 delete the/tmp/log_* file, how to do it?

Answer: * * 6 rm-rf/tmp/log_*

31. In addition to the CPU load, the server may also be in what way bottlenecks?

Answer:

Memory, hard disk, bandwidth, DDoS attack

32. How do I query which files are included in an RPM?

Answer:

RPM-QPL or RPM-QPC

What is the sequencing of 33.Linux boot loading? Please mark the serial number

Answer:

BIOS (1) Kernel (5) GRUB (4) MBR (3) RAID (2)

34. What is the role of 2>&1 in BASH shell?

Answer:

is to redirect standard error to standard output, where standard output has been redirected to the Out.file file, and the standard error is output to the Out.file file. The last & is to have the command execute in the background.

What is the role of/etc/hosts files in 35.Linux systems?

Answer:

Linux/etc/hosts is a file that configures the IP address and its corresponding hostname, where it can be used to log the IP of the machine or other host and its corresponding host name.

Different versions of Linux, this configuration file may also be different. For example, the Debian file is/etc/hostname.

36. Write a scheduled task every day 1 o'clock in the morning in the/data directory New Day date folder?

Answer:

0 1 * * * mkdir/data/$ (date "+%y%m%d")

37. How do I see the process that occupies port 8080?

Answer:

NETSTAT-ANUTP |grep ": 8080" or lsof-i:8080

38. View the list of services initiated by the system and add the new MYSQLD service to boot with the system?

Answer:

Chkconfig--list chkconfig MySQL on

39.HTTPD There are several modes of operation, the simple difference between each working mode?

Answer:

The two main modes are the Prefork mode and the worker mode.

Prefork each child process has only one thread, high efficiency but large memory consumption, UNIX is the default mode;

Worker mode each child process has multiple threads and memory consumption is low, but a thread crash can implicate other threads of the same child process.

40.MySQL How to give testuser users access to all tables of TestDB database, password is testpwd, please write the command?

Answer:

Grant all on testdb.* to [e-mail protected] "localhost" identified by "Testpwd"

41. Set the password for the database administrator to log on from this computer to 999?

Answer:

mysqladmin-hlocalhost-uroot-p password "999"

42. Authorized administrator users can log in all the hosts on the network, have full permissions on all libraries, tables and have authorized permission, login password Tarena?

Answer:

mysql-hlocalhost-uroot-p999

Grant all on * * to [e-mail protected] "%" identified by "Tarena"

with GRANT option;

43. Who is the user who is currently logging on to the database server in MySQL?

Answer:

Select User ();

44. View the permissions of the currently logged on database server user?

Answer:

Show grants;

45. See which authorized users are currently on the database server?

Answer:

Select User,host from Mysql.user;

46.mysql SQL statement that database administrators are not allowed to log on natively in the database server?

Answer:

Delete from Mysql.user where host in ("127.0.0.1", ":: 1", "localhost", "svr5.tarena.com");

Flush privileges;

47. Authorized Userweb users can access the database server from any host on the network, the Tuser table under the STUDB library has the permissions to view, update username fields, and the age field to login password userweb888?

Answer:

Grant Select,update (Username,age) on studb.tuser to [email protected] '% ' identified by ' userweb888 ';

mysql-h192.168.4.5-uuserweb-puserweb888

48. Authorized user Userweb reset their login password to 123456, and verify the ability to login with the new password?

Answer:

Set Password=password ("123456");

49. The database administrator modifies the login password of the authorized user Userweb to 654321, allowing the authorized user Userweb to log on to the database server with the new password?

Answer:

Mysql-h192.168.4.5-uroot-ptarena

Set password for [email protected] "%" =password ("654321");

mysql-h192.168.4.5-uuserweb-p654321

50. Revoke all authorizations granted by the authorized user Userweb and make it no longer able to use this user to connect to the database server?

Answer:

Mysql-h192.168.4.5-uroot-ptarena

Revoke all on studb.tuser from [email protected] "%";

Delete from Mysql.user where user= "Userweb" and host= "%";

Flush privileges;

"Linux Operations engineer face test Summary" first set

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.