7月 252014
 

数据库大小约11GB,执行导出操作

[root@msr11 backup]# time ./db-backup
mysqldump: Couldn’t execute ‘SHOW TRIGGERS LIKE ‘alipay\_recharge”: Out of resources when opening file ‘/tmp/#sql_1de1_0.MYI’ (Errcode: 24) (23)

real 2m41.436s
user 1m41.377s
sys 0m6.794s
[root@msr11 backup]#
查看MySQL的默认文件操作数量限制
mysql> show variables like ‘open%’;
+——————+——-+
| Variable_name | Value |
+——————+——-+
| open_files_limit | 1024 |
+——————+——-+
1 row in set (0.00 sec)

mysql>

查看CentOS 6系统默认的文件操作数量限制并修改为最大
[root@msr11 backup]# ulimit -n
1024
[root@msr11 backup]# ulimit -HSn 65535
[root@msr11 backup]# ulimit -n
65535
[root@msr11 backup]#

将修改操作添加为随系统启动生效
[root@msr11 backup]# vi /etc/profile
ulimit -HSn 65535

修改MySQL配置文件调整文件操作数量限制
[root@msr11 backup]# vi /etc/my.cnf
open-files-limit=65535

重新启动数据库后查看当前MySQL的文件操作数量限制
[root@msr11 backup]# service mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
[root@msr11 backup]#
mysql> show variables like ‘open%’;
+——————+——-+
| Variable_name | Value |
+——————+——-+
| open_files_limit | 65535 |
+——————+——-+
1 row in set (0.00 sec)

mysql>

再次执行数据库导出操作,无报错
[root@msr11 backup]# time ./db-backup

real 11m38.918s
user 5m48.912s
sys 0m26.113s
[root@msr11 backup]#

7月 072014
 

查看USB设备信息

harveymei@linux-7zyd:~> lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse
Bus 001 Device 004: ID 03f0:0324 Hewlett-Packard SK-2885 keyboard
harveymei@linux-7zyd:~>

插入USB设备后重新查看新增的设备信息

harveymei@linux-7zyd:~> lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse
Bus 001 Device 004: ID 03f0:0324 Hewlett-Packard SK-2885 keyboard
Bus 002 Device 003: ID 0930:6544 Toshiba Corp. Kingston DataTraveler 2.0 Stick (2GB)
harveymei@linux-7zyd:~>

确保虚拟机已关闭,并修改配置信息,新增虚拟硬件

kvm-guest-os-usb-1 kvm-guest-os-usb-2 kvm-guest-os-usb-3 kvm-guest-os-usb-4

http://www.linux-kvm.org/page/USB_Host_Device_Assigned_to_Guest

7月 032014
 

nagios-path

nagios-web-url

修改
[root@monitor share]# pwd
/usr/local/nagios/share
[root@monitor share]# vi config.inc.php

//$cfg[‘cgi_base_url’]=’/nagios/cgi-bin’;
$cfg[‘cgi_base_url’]=’/monitor2/cgi-bin’;

修改
[root@monitor etc]# pwd
/usr/local/nagios/etc
[root@monitor etc]# vi cgi.cfg
# URL HTML PATH
# This is the path portion of the URL that corresponds to the
# physical location of the Nagios HTML files (as defined above).
# This value is used by the CGIs to locate the online documentation
# and graphics. If you access the Nagios pages with an URL like
# http://www.myhost.com/nagios, this value should be ‘/nagios’
# (without the quotes).

#url_html_path=/nagios
url_html_path=/monitor2

修改
[root@monitor conf.d]# pwd
/etc/httpd/conf.d
[root@monitor conf.d]# vi nagios.conf

#ScriptAlias /nagios/cgi-bin “/usr/local/nagios/sbin”
ScriptAlias /monitor2/cgi-bin “/usr/local/nagios/sbin”

#Alias /nagios “/usr/local/nagios/share”
Alias /monitor2 “/usr/local/nagios/share”

重启
[root@monitor share]# service nagios restart
Running configuration check…done.
Stopping nagios: done.
Starting nagios:This account is currently not available.
done.
[root@monitor share]#

[root@monitor etc]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@monitor etc]#

7月 012014
 

[root@AY1405192126447871b3Z ~]# tracepath 128.199.159.18
1: 182.92.x.xx (182.92.x.xx) 0.151ms pmtu 1500
1: 182.92.3.249 (182.92.3.249) 0.564ms
1: 182.92.3.249 (182.92.3.249) 0.468ms
2: 10.106.128.58 (10.106.128.58) 0.481ms
3: 10.255.32.90 (10.255.32.90) 0.562ms
4: no reply
5: 202.106.35.189 (202.106.35.189) 4.804ms
6: 61.148.153.50 (61.148.153.50) 2.497ms asymm 5
7: 202.96.12.5 (202.96.12.5) 5.612ms asymm 6
8: 219.158.3.234 (219.158.3.234) 24.226ms
9: 219.158.3.234 (219.158.3.234) 24.742ms asymm 8
10: 219.158.38.98 (219.158.38.98) 182.474ms asymm 11
11: 219.158.38.98 (219.158.38.98) 180.924ms
12: ae-19.r24.tokyjp05.jp.bb.gin.ntt.net (129.250.6.209) 190.888ms asymm 11
13: ae-1.r00.sngpsi02.sg.bb.gin.ntt.net (129.250.4.143) 238.101ms
14: 116.51.27.190 (116.51.27.190) 256.508ms asymm 15
15: 103.253.144.242 (103.253.144.242) 225.248ms
16: 103.253.144.242 (103.253.144.242) 239.151ms
17: oversea.nsnsc.net (128.199.159.18) 177.068ms !H
Resume: pmtu 1500
[root@AY1405192126447871b3Z ~]# ping -c 8 128.199.159.18
PING 128.199.159.18 (128.199.159.18) 56(84) bytes of data.
64 bytes from 128.199.159.18: icmp_seq=1 ttl=50 time=183 ms
64 bytes from 128.199.159.18: icmp_seq=2 ttl=50 time=182 ms
64 bytes from 128.199.159.18: icmp_seq=3 ttl=49 time=201 ms
64 bytes from 128.199.159.18: icmp_seq=4 ttl=49 time=183 ms
64 bytes from 128.199.159.18: icmp_seq=5 ttl=49 time=182 ms
64 bytes from 128.199.159.18: icmp_seq=6 ttl=50 time=162 ms
64 bytes from 128.199.159.18: icmp_seq=7 ttl=50 time=163 ms
64 bytes from 128.199.159.18: icmp_seq=8 ttl=49 time=184 ms

— 128.199.159.18 ping statistics —
8 packets transmitted, 8 received, 0% packet loss, time 7193ms
rtt min/avg/max/mdev = 162.918/180.516/201.810/11.699 ms
[root@AY1405192126447871b3Z ~]#

 

linux-7zyd:~ # tracepath 128.199.159.18
1: 192.168.1.254 6.348ms
2: 14.155.200.1 10.473ms
3: 113.106.37.5 10.830ms
4: 59.40.49.90 16.639ms
5: 119.145.47.94 18.891ms
6: 202.97.33.166 13.671ms
7: 202.97.61.242 16.106ms
8: 202.97.60.18 14.889ms
9: p16-5-3-3.r23.tokyjp01.jp.bb.gin.ntt.net 111.986ms asymm 10
10: as-1.r20.sngpsi02.sg.bb.gin.ntt.net 178.717ms
11: ae-6.r00.sngpsi02.sg.bb.gin.ntt.net 181.077ms asymm 12
12: 116.51.27.190 222.487ms asymm 13
13: 103.253.144.242 214.349ms asymm 14
14: oversea.nsnsc.net 105.420ms !H
Resume: pmtu 65535
linux-7zyd:~ # ping -c 8 128.199.159.18
PING 128.199.159.18 (128.199.159.18) 56(84) bytes of data.
64 bytes from 128.199.159.18: icmp_seq=1 ttl=52 time=87.7 ms
64 bytes from 128.199.159.18: icmp_seq=2 ttl=52 time=85.1 ms
64 bytes from 128.199.159.18: icmp_seq=3 ttl=52 time=86.4 ms
64 bytes from 128.199.159.18: icmp_seq=4 ttl=52 time=88.4 ms
64 bytes from 128.199.159.18: icmp_seq=5 ttl=52 time=89.0 ms
64 bytes from 128.199.159.18: icmp_seq=6 ttl=52 time=84.4 ms
64 bytes from 128.199.159.18: icmp_seq=7 ttl=52 time=85.6 ms
64 bytes from 128.199.159.18: icmp_seq=8 ttl=52 time=86.8 ms

— 128.199.159.18 ping statistics —
8 packets transmitted, 8 received, 0% packet loss, time 7007ms
rtt min/avg/max/mdev = 84.419/86.712/89.041/1.559 ms
linux-7zyd:~ #

7月 012014
 

 

[root@cp conf]# nginx -t
nginx: [emerg] SSL_CTX_use_PrivateKey_file(“/usr/local/nginx/conf/cert.key”) failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
[root@cp conf]#
2014/06/30 10:13:19 [emerg] 28226#0: SSL_CTX_use_PrivateKey_file(“/usr/local/nginx/conf/cert.key”) failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)
比较私钥和证书公钥部分的值

[root@cp conf]# openssl x509 -noout -text -in cert.crt
Modulus:
00:92:2d:90:80:5c:94:ec:67:f1:b9:ee:e2:02:a4:
4d:d2:8a:f3:3f:63:4f:68:ee:a4:63:8f:10:f5:68:
4d:07:b5:40:6e:f0:9c:72:c5:06:78:ef:fe:d6:32:
b3:e6:47:26:d9:46:83:f0:f8:7b:6f:31:a8:a8:6d:
f7:06:5f:0c:11:7f:91:17:ad:f0:57:89:6e:3c:87:
28:f0:e2:84:9c:fc:c0:f3:ea:99:af:44:18:e8:3e:
dc:c0:4c:24:9c:66:a4:7b:72:a0:d6:53:ac:f6:0f:
99:19:bb:26:b9:c4:7c:e1:d4:a1:8e:18:0c:e5:fc:
2e:76:51:cf:c8:62:b4:cb:8b:a9:dc:c4:4e:0b:1f:
ac:e7:66:ab:ae:36:81:db:76:68:c1:d9:63:ae:b0:
48:ff:06:2f:e2:1b:20:72:45:b6:21:38:c3:37:e0:
4d:c0:d7:76:e4:95:8b:d5:8e:d6:66:a7:48:dd:9b:
43:a5:c0:15:98:5a:0b:b4:60:21:7e:ec:89:5e:ff:
3d:5e:bf:ff:19:cf:1c:9d:1c:fa:6d:d4:ff:0c:f1:
ee:e6:de:c2:10:52:d0:af:d9:07:bd:7f:4e:88:6c:
81:13:34:45:d9:16:5c:2b:e8:d2:30:b2:ce:44:f9:
9e:b5:aa:52:e1:69:62:68:d4:56:64:33:f1:e7:5f:
d3:79
Exponent: 65537 (0x10001)
[root@cp conf]# openssl rsa -noout -text -in cert.key
Private-Key: (2048 bit)
modulus:
00:ad:cc:8c:99:c0:9a:d9:43:42:2f:4c:a2:fa:30:
5d:61:a6:0d:cb:ca:67:21:f3:7f:96:81:10:c9:5e:
77:22:41:18:ed:8e:6a:89:1e:c6:06:d0:11:d9:c4:
c0:5b:f6:66:1c:2d:30:45:33:ec:80:7b:10:a5:97:
89:c2:d7:aa:89:73:a9:83:d6:ec:a1:d8:3f:fb:09:
12:76:ad:2a:78:72:de:fb:ec:45:72:ca:c9:09:7e:
35:5b:d5:4e:45:9c:93:43:69:cd:1d:65:11:04:b6:
d9:b4:6a:ef:4c:76:59:71:64:ce:06:17:70:cb:ad:
09:b3:59:73:75:9d:64:d0:b9:a2:fd:02:59:10:ba:
c6:38:1b:d4:11:e6:12:1d:f0:1b:2e:07:e3:af:f4:
f6:f7:49:89:9d:f3:20:47:64:29:10:05:64:c2:28:
ed:fa:15:20:b0:0e:c0:c0:df:0d:3f:cd:fe:4f:e1:
09:e3:73:25:79:d2:d9:c7:b3:f9:97:57:fa:3b:78:
1a:ae:d6:0f:2e:3f:a4:d3:17:d1:95:0d:1f:30:e7:
9c:f6:19:cf:1a:0a:60:5b:5b:0d:ed:27:a5:51:67:
ae:37:4e:a7:cd:e7:01:d5:b3:a1:28:a7:1a:bf:92:
27:7f:ad:11:08:d4:34:21:24:54:66:83:44:97:17:
2f:cb
publicExponent: 65537 (0x10001)
使用相同的CSR重新签发证书

[root@AY1405192126447871b3Z 17858]# openssl x509 -noout -text -in cert.crt
Modulus:
00:ad:cc:8c:99:c0:9a:d9:43:42:2f:4c:a2:fa:30:
5d:61:a6:0d:cb:ca:67:21:f3:7f:96:81:10:c9:5e:
77:22:41:18:ed:8e:6a:89:1e:c6:06:d0:11:d9:c4:
c0:5b:f6:66:1c:2d:30:45:33:ec:80:7b:10:a5:97:
89:c2:d7:aa:89:73:a9:83:d6:ec:a1:d8:3f:fb:09:
12:76:ad:2a:78:72:de:fb:ec:45:72:ca:c9:09:7e:
35:5b:d5:4e:45:9c:93:43:69:cd:1d:65:11:04:b6:
d9:b4:6a:ef:4c:76:59:71:64:ce:06:17:70:cb:ad:
09:b3:59:73:75:9d:64:d0:b9:a2:fd:02:59:10:ba:
c6:38:1b:d4:11:e6:12:1d:f0:1b:2e:07:e3:af:f4:
f6:f7:49:89:9d:f3:20:47:64:29:10:05:64:c2:28:
ed:fa:15:20:b0:0e:c0:c0:df:0d:3f:cd:fe:4f:e1:
09:e3:73:25:79:d2:d9:c7:b3:f9:97:57:fa:3b:78:
1a:ae:d6:0f:2e:3f:a4:d3:17:d1:95:0d:1f:30:e7:
9c:f6:19:cf:1a:0a:60:5b:5b:0d:ed:27:a5:51:67:
ae:37:4e:a7:cd:e7:01:d5:b3:a1:28:a7:1a:bf:92:
27:7f:ad:11:08:d4:34:21:24:54:66:83:44:97:17:
2f:cb
Exponent: 65537 (0x10001)
[root@AY1405192126447871b3Z 17858]# openssl rsa -noout -text -in cert.key
Private-Key: (2048 bit)
modulus:
00:ad:cc:8c:99:c0:9a:d9:43:42:2f:4c:a2:fa:30:
5d:61:a6:0d:cb:ca:67:21:f3:7f:96:81:10:c9:5e:
77:22:41:18:ed:8e:6a:89:1e:c6:06:d0:11:d9:c4:
c0:5b:f6:66:1c:2d:30:45:33:ec:80:7b:10:a5:97:
89:c2:d7:aa:89:73:a9:83:d6:ec:a1:d8:3f:fb:09:
12:76:ad:2a:78:72:de:fb:ec:45:72:ca:c9:09:7e:
35:5b:d5:4e:45:9c:93:43:69:cd:1d:65:11:04:b6:
d9:b4:6a:ef:4c:76:59:71:64:ce:06:17:70:cb:ad:
09:b3:59:73:75:9d:64:d0:b9:a2:fd:02:59:10:ba:
c6:38:1b:d4:11:e6:12:1d:f0:1b:2e:07:e3:af:f4:
f6:f7:49:89:9d:f3:20:47:64:29:10:05:64:c2:28:
ed:fa:15:20:b0:0e:c0:c0:df:0d:3f:cd:fe:4f:e1:
09:e3:73:25:79:d2:d9:c7:b3:f9:97:57:fa:3b:78:
1a:ae:d6:0f:2e:3f:a4:d3:17:d1:95:0d:1f:30:e7:
9c:f6:19:cf:1a:0a:60:5b:5b:0d:ed:27:a5:51:67:
ae:37:4e:a7:cd:e7:01:d5:b3:a1:28:a7:1a:bf:92:
27:7f:ad:11:08:d4:34:21:24:54:66:83:44:97:17:
2f:cb
publicExponent: 65537 (0x10001)

重新检查nginx配置,重新加载配置并查看443端口监听
[root@cp conf]# nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
[root@cp conf]# nginx -s reload
[root@cp conf]# netstat -ltn |grep 443
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
[root@cp conf]#