通过服务器中转访问其他服务器:su - ptkfcz输入passwordssh 用户@转接服务IP使用locate命令定位mongo位置进入mongo的bin目录下:输入命令进去mongoDB:./mongo IP:端口show dbs,use db,show tables
分类:
数据库 时间:
2014-06-18 20:18:05
阅读次数:
248
经常需要根据IP地址统计apache站点访问量,最基本的脚本.根据IP访问量降序排列:#!/bin/bash
#Script_name:access_count
acc_log=/usr/local/apache2/logs/access_log
/bin/awk‘{print$1}‘$acc_log|sort|uniq-c|sort-nr执行效果:[root@zabbix~]#shaccess_count
94989192.168.1..
分类:
移动开发 时间:
2014-06-16 18:18:50
阅读次数:
332
01.在服务端创建zabbix组configuration---Templates---createtemplate---TemplateLinux
DiskIO===其中选择组为"Template"在TemplateLinuxDiskIO中创建Discoveryrule:Name:Diskdevice
discovery
Key:custom.vfs.dev.discovery
FilterMacro{#DISK}Regexp@Disk
devicefordiscover..
分类:
其他好文 时间:
2014-06-16 17:00:42
阅读次数:
543
package com.voice.mongodb;import
java.net.UnknownHostException;import com.mongodb.DB;import
com.mongodb.DBCollection;import com.mongodb.Mongo;import c...
分类:
其他好文 时间:
2014-06-16 11:03:17
阅读次数:
190
http://docs.mongodb.org/manual/reference/command/renameCollection/db.source-namespace.renameCollection( "target" )比如把users 替换成 all_usersdb.users.renam...
分类:
其他好文 时间:
2014-06-14 23:49:28
阅读次数:
570
默认Zabbix运行的账户是Zabbix,但在自动部署的时候,Agent与Server的先后顺序不定,而且官方不建议两者使用同一个账户。
分类:
其他好文 时间:
2014-06-13 00:32:50
阅读次数:
267
前提条件:安装了mongodb数据库
安装了mongo的php驱动下载Yii的mongo扩展:下载链接:http://pan.baidu.com/s/1rPtx0官方下载链接:https://github.com/canni/YiiMongoDbSuite得到文件:YiiM...
分类:
数据库 时间:
2014-06-12 13:05:19
阅读次数:
359