In these two weeks, several of them wanted to learn python, so we created an environment and atmosphere to learn from them.
Yesterday in the group, posted a demand, is the statistics Squid access log IP access number and URL of the number of visits and sorting, many students are generally realized the corresponding functions, I put my simple implementation of the post, welcome to Pat Bricks:
The log format is as follows:
Copy Code code as follows:
%ts.%0 3tu%6tr%{x-forwarded-f
information%n: Output a carriage return line break, Windows platform for "\ r \ n", Unix platform for "\ n" Output log message Wrapping 8. You can control the minimum width, maximum width, and text alignment by adding modifiers between% and pattern characters. such as: 1 C: Specifies the name of the output category, the minimum width is 20, and if the category name is less than 20, the default is right-aligned.2)%-20c: Specifies the name of the ou
adding any parameters, this ifconfig can represent the state of the network interface. For example:[Root@linux ~]# IfconfigEth0 Link encap:ethernet hwaddr00:xx:xx:xx:04:45inet addr:192.168.1.81 bcast:192.168.1.255 mask:255.255.255.0Inet6 ADDR:FE80::20C:29FF:FE61:445/64 ScopeinkUpbroadcast RUNNING Multicast mtu:1500 metric:1rxpackets:472 errors:0 dropped:0 overruns:0 frame:0txpackets:445 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1
be able to burst the sensitive data in the way that is used in SQL Server above. The reason is that access always places the fields that are replaced by * well in the last side of the query dataset. The results of access queries are always: 1,2,3,4,5,6,7,8,9,10,11,12,13,*. In order to represent the fields that are replaced by the * good, we must move the field replaced by * to another location. First look at the results:
Http://www.hnp2p.com/mov/view.asp?id=1916%20union%20select%201,*%20from%2
, This means that from the IP address 192.168.217.1-192.168.217.254, the default gateway 255.255.255.0 server can use our NTP server to synchronize time second place new, indicate the Internet and LAN as the NTP server IP The third place is to modify, remove the original comment, is when the server and the public time server lost contact with the local time for the client to provide time service configuration file modification completed, save exit, start the service. [Root@master ~]# service nt
off mysqld on main MySQL before booting because only one exists at the same time)MySQL Log in/usr/local/mysql/bin/mysqlmysql> CREATE DATABASE testdb2;Whether the test will be successful4 Test High AvailabilityHeartbeat.x86_64Modify HA.CF haresourcesModify HA.CF Important two articlesNode Web1Node WEB2Modify HaresourcesWeb1 192.168.204.8/24/eth0 mysqld[email protected] ha.d]# SCP ha.cf haresources authkeys WEB2:/ETC/HA.D/Start Heartbeat, the former must not manually start mysqld[Email protected]
t where num=10 or num=20 can query: Select ID from t WH Ere num=10 UNION ALL select IDs from T where num=20C. In and not is also used with caution, otherwise it will cause a full table scan, such as: Select ID from t where num in (three-to-three) for consecutive values, can be used between do not use in the: Select ID from t where Num between 1 and 3D. The following query will also cause a full table scan: Select ID from t where name like '%abc% 'E.
mitigate the resources of the system tables.L. If a temporary table is used, be sure to explicitly delete all temporary tables at the end of the stored procedure, TRUNCATE table first, and then drop table, which avoids longer locking of the system tables.2) SQL statement aspect:A. You should try to avoid using the! = or B. You should try to avoid using or in the WHERE clause to join the condition, otherwise it will cause the engine to discard full table scans using the index, such as: Select ID
Tags: mysql 5.1.72 installationI want to tell you before I install MySQL.Running a process in the Linux kernel must be run as a userToday, MySQL is so no matter what the future service is the same ...The operating environment is as follows: Very pure system nothing is installedCentOS 6.4mysql-5.1.72Check results:[[emailprotected]tools]#cat/etc/redhat-release CentOSrelease6.4
(Final) [[Emailprotected]tools]#uname-r 2.6.32-358.el6.x86_64 [[Emailprotected]tools ]#ifconfigeth0 eth0linkencap:ethernet
the IP address of the system in the virtual machine. You can use the Ifconfig command to view the IP address of the CentOS system, where my CentOS system IP address is: 192.168.254.129.[[Email protected] ~]# ifconfigeth0 Link encap:ethernet HWaddrxx: 0C: in: Fe:de: Genevainet Addr:192.168.254.129Bcast:192.168.254.255Mask:255.255.255.0Inet6 addr:fe80::20c:29ff:fefe:de02/ -scope:link up broadcast RUNNING multicast MTU: theMetric:1RX Packets:21330Errors
Tags: oop DNA rate intranet mask Ted Lis title dropDemandA machine can access the external network, B machine and a machine in the same intranet, now let B machine through a machine to access the external network.Steps1. Add a NIC to the virtual machine.If there is no segment name, click the ' LAN segment (S) ... ' button to create a new one.The 2.IFCONFIG-A command can see the newly added network card that has not been enabled:[Email protected] ~]# ifconfig-Aeth1 Link encap:ethernet HWaddr 00:0
Tag: device stat byte back org appears link line etcVMware replication Virtual machine appears error:no suitable device found:no device found for connection ' System eth0 'Don't say much, just give a solution:1. View Hardware Address[Email protected] ~]# ifconfigEth2 Link encap:ethernetHWaddr 00:0c:29:89:18:58inet addr:192.168.11.200 bcast:192.168.11.255 mask:255.255.255.0Inet6 ADDR:FE80::20C:29FF:FE89:1858/64 Scope:linkUp broadcast RUNNING multicast
First introduce the configuration of the virtual network card under Ubuntu (I'm using ubuntu-16.04)1, first use ifconfig to view the current network card configurationEns33 Link encap: Ethernet Hardware address 02:0c:29:c6:be:c7 INET6 address: fe80::20c:29ef:fec6:bec7/64 Scope:link up Broadcast RUNNING multicast mtu:1500 hop count: 1 receive packet: 215 Error: 0 Discard: 0 Overload: 0 Number of frames: 0 Se
interface will affect the security and stability of the server to some extent, therefore, This is not a detailed introduction to this approach here. )
ifconfigThe command temporarily configures the IP address (temporarily configuring the IP address, i.e. the configuration will expire when we restart the computer or restart the network service)
setupThe tool permanently configures the IP address (the tool setup is Red Hat developed so that under normal circumstances, the tool can only be
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.