In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Source: http://2358205.blog.51cto.com/2348205/1688449
Http://mofansheng.blog.51cto.com/8792265/1627702
Most of them are made by themselves, and some refer to the answers of the original bloggers.
1. The port number and protocol used by DNS, briefly describe the working principle and function of DNS forward parsing and reverse parsing, and application scenarios?
DNS usage
The port number used by DNS is 53 and the encapsulation protocol udp. Forward resolution refers to the resolution process from domain name to IP address. Reverse resolution is the resolution process from IP address to domain name. Its function is to query the PTR record of IP address to get the domain name that the IP address points to. PTR (Pointer Record), pointer record, is a data type in an e-mail system, defined by the Internet standard file RFC1035. Corresponding to it are A record and address record. The two constitute mail exchange records. The A record resolves the name to the address, while the PTR record resolves the address to the name, which refers to the IP address of a client, and the name refers to a customer's fully qualified domain name. PTR records are used for reverse address resolution during e-mail delivery. After using domain name reverse resolution, the amount of spam can be greatly reduced.
2. Write an IPTABLES that can be accessed on the public network using port 80 of a private network machine. Assuming that the public network IP is 10.10.1.1, realize the NAT of 192.168.1.0 to 24 segments.
Iptables-An INPUT-p tcp-- dport 80-j ACCEPT # allows access to port 80
Iptables-t nat-A POSTROUTING-s 192.168.1.0 to-source 24-o eth0-j SNAT-- to-source 10.10.1.1
3. List more than three mainstream WEB servers, and briefly describe their characteristics and advantages and disadvantages of unlimited operating systems?
Apache, Nginx, IIS, tomcat, lighttpd, etc.
There is nothing to say about the features. PHP and static Nginx,JAVE use tomcat.
4. Name two mainstream proxy servers and briefly describe the working mode and their advantages and disadvantages.
Nginx 、 Squid
5, list two load balancing software, and briefly describe the working mode, advantages and disadvantages?
Nginx 、 LVS 、 HAproxy
6What is the maximum number of concurrent requests in IEMAX FF Chrome browser?
When we browse the web, there is an important factor affecting the browsing speed, which is the number of concurrency of browsers. In simple and popular terms, the number of concurrency is the number of people working at the same time when browsing a web page. If there are only 2 concurrent connections at the same time, the web page can only rely on these two threads when opening. If there is slow content in front of it, it will directly affect the opening of the following content. However, if there are more concurrent connections at the same time, it will greatly improve the web page loading speed. IE11, FF and chrome are all 6 by default, and the number of concurrent connections can also be modified by yourself.
Reference article: http://www.iefans.net/liulanqi-zuida-bingfa-lianjieshu/
7What are the types of database backups in MySQL, which backups can be divided according to the status of the database, what are the backup tools, deploy a highly available mysql application environment, and explain its high availability?
According to the scope of the data set to be backed up, it can be divided into full backup, partial backup, incremental backup and differential backup.
According to the way of data backup, it can be divided into physical backup and logical backup. Generally, physical backup is to package and copy the data files of the database directly through tar,cp and other commands to achieve the effect of backup. Logical backup is generally to export data from the database through specific tools and save the backup (logical backup will lose data precision).
According to the state of the database, it can be divided into hot backup, warm backup and cold backup.
Hot backup means that when the database is backed up, the read and write operations of the database are not affected.
Warm backup means that when the database is backed up, the database read operation can be performed, but the write operation cannot be performed.
Cold backup means that when the database is backed up, the database cannot be read or written, that is, the database will be offline.
MySQL backup tools: mysqldump, mysqlhotcopy, kvm snapshot backup, tar tool backup, xtrabackup tool backup (only InnoDB storage engine is supported), etc.
The high-availability scheme of MySQL, our company now adopts the scheme of Heartbeat+DRBD, and some recommend the use of mycat, which has not been used yet, so we won't talk about it here.
8. What is a naked device and what are its advantages? Does mysql support bare devices?
Bare device: also known as bare partition (raw partition), is a special character device that is not formatted and is not read by Unix/Linux through the file system. Bare devices can be bound to either a partition or a disk.
Benefits: because the use of bare devices avoids the transfer of data directly from Disk to the database through the operating system layer, the use of bare devices can greatly improve the performance of the database system for database applications that read and write frequently. Of course, this is only established when the disk IUnip O is very large and the disk Imax O has become the bottleneck of the system. If disk reads and writes are indeed so frequent that disk reads and writes become a bottleneck of the system, then the use of bare devices can greatly improve performance, up to 40%, which is very obvious.
Mysql supports bare devices
9. If you were given a 100g INNODB type database, what backup plan would you use to make a backup?
Xtrabackup
1What is the last Xtrabackup?
Xtrabackup is a data backup tool for InnoDB, supports online hot backup (backup does not affect data read and write), and is a good substitute for commercial backup tool InnoDB Hotbackup.
Xtrabackup has two main tools: xtrabackup and innobackupex
1. Xtrabackup can only back up InnoDB and XtraDB data tables, but not MyISAM data tables.
2. Innobackupex is modified by referring to InnoDB Hotbackup's innoback script. Innobackupex is a perl script encapsulation that encapsulates xtrabackup. It is mainly for the convenience of backing up the tables of InnoDB and MyISAM engine at the same time, but when dealing with myisam, you need to add a read lock, and add some options, such as slave-info can record backup and restore, as some information needed by slave, according to this information, you can easily use backup to redo slave.
2What can Magi Xtrabackup do:
Online (hot) backup of the InnoDB and XtraDB tables of the entire library
Make an incremental backup (innodb only) based on the last full library backup of xtrabackup
Generate a backup as a stream, which can be saved directly to a remote machine (useful when the local hard disk is out of space)
The tools provided by the MySQL database itself do not support true incremental backups, and binary log recovery is a point-in-time (point-in-time) recovery rather than an incremental backup.
The Xtrabackup tool supports incremental backups of the InnoDB storage engine, which works as follows:
(1) first complete a full backup and record the LSN (Log Sequence Number) of the checkpoint at this time.
(2) during the process incremental backup, compare whether the LSN of each page in the tablespace is greater than the LSN of the last backup, and if so, back up the page and record the LSN of the current checkpoint.
First, find and record the last checkpoint ("last checkpoint LSN") in logfile, then start copying the logfile of InnoDB to xtrabackup_logfile; from the location of LSN, and then start copying all data files .ibd; don't stop copying logfile until you finish copying all data files.
Because all data modifications are recorded in logfile, even if the data file is modified during backup, you can still maintain data consistency by parsing xtrabackup_logfile during recovery.
10. Write a simple shell script that makes CTRL+C uninterruptible when the script runs?
Add trap "" SIGINT or trap "2 to the script to ignore the SIGINT signal
11. Tell me more about the installation process of cacti/nagios. How does cacti monitor mysql?
In my daily work, I use one-click script to install, the following quote the original answer:
Cacti installation steps: first install the lamp environment (it is recommended to use compilation and installation) and snmp services, install rrdtool tools, then set up the cacti library and log in to the mysql account, and authorize Secondly, download and extract cacti to the htdocs or html directory of web server to ensure that http://IP:port/cacti can be accessed, and then install cacti on web, modify the snmp community word on the web page to ensure that it is consistent with the group word of snmpd.conf, and then manually execute php poller.php to see if the .rrd file can be generated in the rra directory. By default, only local resources are monitored, php.poller.php commands are written to crontab and executed every 5 minutes. If you need to monitor the remote host, you need to install the snmp service on the other host, and make sure that the community word of snmp is consistent with the snmp community word on the monitoring host. Finally, add other monitoring hosts, add templates, install plug-ins and so on.
Nagios installation steps: first, also install the lamp environment (it is recommended to use compilation and installation), then download and install nagios and nagios-plugin, integrate apache and naigos, and create web login account verification to ensure that the http://IP:port/nagios can be accessed and logged in normally, and the remote host installs nrpe or NClient++;. Finally, add configuration remote host information, alarm function, add the required monitoring indicators and other work.
Cacti monitoring mysql: first, download the cacti monitoring mysql template on the forum of cacti, then import it into cacti, then add the host, select the application template, and finally wait 5 minutes to see if the monitoring is normal.
12. What is the difference between sed and awk commands?
Awk is suitable for column (domain) operation, and sed is suitable for row operation.
Awk is suitable for file extraction and collation, and sed is suitable for file editing.
If the file is formatted, that is, divided into multiple fields by delimiters, awk takes precedence
Awk is more powerful, supports arrays, loops, etc., and can even be seen as a programming language, with an internal syntax similar to C
Sed is a stream editor, its power is that it can script text in the way of lines, and the syntax is simpler than awk, its function is to add, delete, modify and query, but it is not a programming language after all, there is no loop, array and other logic, so sed is usually used with awk, they just complement each other, and together make up the two sharp weapons of text processing.
13. How to change the linux hostname?
Edit configuration file / etc/sysconfig/network
Change the HOSTSNAME. Restart after saving and exiting.
14. What other way can we use to log in to linux in addition to password authentication? Briefly describe the configuration process.
Log in using the key, the client generates the public key and the private key, the client saves the private key, copies the public key to the remote linux host, and logs in using the key when logging in. The configuration process is brief.
15. How to add passwords (plaintext and ciphertext) to grub, and what are the types of ciphertext encryption?
The only difference between grub plaintext encryption and ciphertext encryption is whether password adds the parameter-- md5, but not plaintext. If it is ciphertext, it needs to be added, and you need to first use the command grub-md5-crypt to calculate the MD5 value of the password, use this MD5 value instead of plaintext password, edit / etc/grub.conf
1) simply encrypt the GRUB interface, but not the booted system, add a line below the timeout line: password-- md5 PASSWORD
2) encrypt the GRUB interface, while encrypting the booted system, add a line below the timeout line: password-- md5 PASSWORD, and a line below the title line: lock
3) there are multiple booted systems at the same time. Encrypt the specific system instance separately (without encrypting the GRUB interface) and add a line below the title line: lock, and next to the lock line followed by another line: password-- D5 PASSWORD Note: lock cannot be used alone.
16. How to install / delete a software package with yum? How to see if a software package is already installed
Yum install
Yum localinstall install the local rpm package
Yum remove
Rpm-qa package name or rpm-qa | grep
17. How to check the system version? (3 methods)
Check the system or kernel version:
Cat / etc/redhat-release or cat / etc/centos-release
Lsb_release-a
Uname-a
Cat / etc/issue
Cat / proc/version
18. Find find out the directories and ordinary files in the current directory. Find out the ordinary files or directories under the current directory that have not changed for 10 days and whose size is greater than 4K.
Find. -type d-o-type f
Find. -type d-o-type f-size + 4k-mtime + 10
19. The command to create a directory named 1 under the current directory? Create a cascading directory. / 2Universe 3 / command? A command to create cascading directories. / 1-2-3 and. / 1-2-4?
Mkdir 1
Mkdir-p. / 2Compact 3 /
Mkdir-p. / 1 Compact 2 / {3pr 4}
20. Cp what permissions are required for files in a directory, and what about mv? Where's touch? Where's rm?
Cp a file in a directory, you need to have x permission for this directory and r permission for this file
Mv, touch, and rm all require w and x permissions for this directory, but no file permissions.
21. How to redirect a string to a file with cat
Cat > > test.txt 1111111111
> 2222222222
> EOF
22. Establish a public directory / opt/public, which requires that each user can create files and directories, but only himself and root can delete them.
Mkdir / opt/public
Chmod 1777 / opt/public
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.