Linux common face question 1

Source: Internet
Author: User
Tags apache access log mx record record mx

First, there are documents File1

1, query file1 inside the line number of empty line

Cat File1 | Grep-n ^$


2. Query File1 the line ending with ABC

grep abc$ File1


Second, how to forward the local 80 port request to 8080 port, the current host IP is 192.168.2.1

Iptables-a prerouting-d 192.168.2.1-p tcp-m tcp-dport 80-j dnat-to-destination 192.168.2.1:8080


Three, crontab in November, every day in the morning 6 to 12, every 2 hours to perform the/usr/bin/httpd.sh how to achieve

Crontab-l

0 6-12/2 */usr/bin/httpd.sh


Iv. Write a shell script to transfer files larger than 100K in the/usr/local/test directory to the/tmp directory

For file in ' Ls/usr/local/test '

Do

If [-F $file];then

If [' Ls-l $file | awk ' {print $} '-GT 10000];then

MV $file/tmp

Fi

Fi

Done


Five, MySQL database backup mode

Incremental backup, differential backup, full backup


Vi. How to view processes that occupy port 8080

lsof-i:8080


Seven, have you used monitoring software? Talk about its characteristics

Use Nagios to monitor your services, use cacti to monitor traffic, and Zabbix to include all the features of Nagios and cacti


Eight, through the Apache Access log access.log statistics IP and each address number of visits, by traffic list Top 10

Cat Access.log | awk ' {print '} ' | uniq-c | Sort-rn | Head-10


Ix. What do you think is included in the system tuning, take Linux For example, please explain briefly, take some parameters as an example

Two aspects of optimization and application optimization of kernel parameters in system tuning


How to use MySQL command to backup and restore? Take the test library as an example, create a backup, and then restore it with this backup

Mysqldump-uroot-p Test > Test.sql

Mysql-uroot-p Test < Test.sql


Xi. What is commonly used in Linux DNS service software, to cite several common DNS records, if the domain name abc.com configured a mail server, the IP address is 202.106.0.20,

How do I do the relevant parsing? If you understand the intelligent parsing of BIND, please briefly describe the principle

1) Common DNS software is bind

2) A record address record MX record mail interchange record CNAME alias record

3) Modify the abc.com domain name configuration file to add the following records

In MX ten mail.abc.com

Mail in A 202.106.0.20

4) Bind based on the request to resolve the client IP address, to make a different resolution, the principle is in the configuration file, set the

View, each view has a client IP address segment, and the BIND server resolves the client's IP address based on the request.

Match the different view, then according to the view's configuration, to the corresponding configuration file to query, the results are returned to the request

of the client.


12. Your understanding of the current OPS engineer and the understanding of its work

Operations engineers in the company's responsibility, the need to ensure that the company to provide the highest, fastest, most stable, most

Secure service. A small mistake by the OPS engineer is likely to cause significant losses to the company and its customers, so

Operation and maintenance Engineer's work needs rigorous and innovative spirit, so-called operations and maintenance engineers, is to ensure that the site 24 hours of normal operation and maintenance of the normal operation of the database








This article is from the "Wsyht blog" blog, make sure to keep this source http://wsyht2015.blog.51cto.com/9014030/1786766

Linux common face question 1

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.