09 2015 档案

摘要:1、查看系统进程命令 top 进入后可按s 加时间,指定多长时间刷新一次2、查看cpu信息 cat /proc/cpuinfo3、查看内存信息 cat /proc/meminfo4、清理内存:主动垃圾回收 http://blog.csdn.net/mafuli007/article/det... 阅读全文
posted @ 2015-09-30 13:50 光闪 阅读(315) 评论(0) 推荐(0) 编辑
摘要:mongod默认启动不加任何参数时,是没有身份认证的,任何人都可以登录上进行任何操作启动时添加--auth可以使用身份验证模式使用mongod -f mongod.conf配置文件启动时,配置文件的security.authorization为enabled,也是使用身份认证模式同时使用配置文件若想... 阅读全文
posted @ 2015-09-29 13:53 光闪 阅读(4653) 评论(0) 推荐(0) 编辑
摘要:根据官网的提示内容,默认的配置文件内容为 systemLog: verbosity: 0 quiet: false# traceAllExceptions: syslogFacility: user path: "/data/mongodb/log" logAppend:... 阅读全文
posted @ 2015-09-27 22:40 光闪 阅读(8407) 评论(0) 推荐(0) 编辑
摘要:yum安装时如果报错提示安装失败,缺少库文件,可以使用:yum whatprovides 库名之后安装提供的程序yum remove xxx卸载yum update 更新解决Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit)问题:1、yum whatpro... 阅读全文
posted @ 2015-09-26 17:09 光闪 阅读(2941) 评论(0) 推荐(0) 编辑
摘要:mongodb使用了yaml格式定义的配置文件(http://www.yaml.org/)默认为:# mongod.conf#where to loglogpath=/var/log/mongodb/mongod.loglogappend=true# fork and run in backgrou... 阅读全文
posted @ 2015-09-26 00:04 光闪 阅读(1155) 评论(0) 推荐(0) 编辑
摘要:服务器上了ss,加了锐速加速。 之前一直没有开防火墙,昨天发现这样太不安全,上了Ubuntu的防火墙 ufw默认策略默认拦截所有input和forward,允许output 也允许input策略-A ufw-before-input -m conntrack --ctstate RELAT... 阅读全文
posted @ 2015-09-25 10:59 光闪 阅读(1119) 评论(0) 推荐(0) 编辑
摘要:UFW是一个简化版的iptables,基于iptables,配置比iptables简单 默认UFW是关闭状态,即Ubuntu默认打开所有端口,比较危险。 检测状态 ufw status 设置默认状态,默认禁止所有连接(所有入站连接) ufw default deny 启用某个端口 ... 阅读全文
posted @ 2015-09-24 21:33 光闪 阅读(4739) 评论(1) 推荐(0) 编辑
摘要:1、查看某个服务的状态 2、Ubuntu下没有chkconfig工具配置服务启动,需要自己安装。 也可使用替代品apt-getinstallsysv-rc-confIptables是一个防火墙,所有的Ubuntu官方发行版(Ubuntu,Kubuntu,Xubuntu)都默认自带Iptables... 阅读全文
posted @ 2015-09-24 21:06 光闪 阅读(330) 评论(0) 推荐(0) 编辑
摘要:select 3.5版本的说明文档里面存在http://select2.github.io/select2/index.htmloption选项sortResultsquery为查询字符串 阅读全文
posted @ 2015-09-23 11:01 光闪 阅读(1162) 评论(0) 推荐(0) 编辑
摘要:首先说明一下windows下的常用变量(这里是XP的,win7及以上的C:\Documents and Settings实际为C:\Users)%SystemDrive% 操作系统所在的分区号。如 C:%SystemRoot% 操作系统根目录。如 C:\WINDOWS%windir% 操作系统根目录... 阅读全文
posted @ 2015-09-22 23:23 光闪 阅读(410) 评论(0) 推荐(0) 编辑
摘要:1、select子句 在够用的情况下,可以只选带索引的列,速度会非常快 不必要的情况下,只选出要查看的列,会提高速度。2、from子句 使用join时,可以直接join表,如果join子查询时,子查询生成的临时表是没有索引的,所以会引起速度很慢,直接join表可提高速度。 根据不同情况使用不... 阅读全文
posted @ 2015-09-18 17:19 光闪 阅读(161) 评论(0) 推荐(0) 编辑
摘要:6、安装部署node.js环境 (1)node.js的使用的项目构建工具GYP(Generate Your Project)是基于Python2.7的,所以需要安装Python2.7环境 一般自带有此环境,可以使用python -v检测 sudo apt-get install python2.7 阅读全文
posted @ 2015-09-18 16:24 光闪 阅读(310) 评论(0) 推荐(0) 编辑
摘要:接这个:http://www.cnblogs.com/guangshan/p/4739716.html扫描代码:package com.guangshan.scanurl;public class MyTest{ public static void main(String[] args) {... 阅读全文
posted @ 2015-09-16 21:23 光闪 阅读(611) 评论(0) 推荐(0) 编辑
摘要:1、搜索C盘中大小大于某个值的文件:C:\Windows\SoftwareDistribution这个文件夹下很多大文件 2、搜索*.log文件 3、C:\Users\Guangshan\AppData和C:\ProgramData文件夹下有很多应用程序的数据,包含他们的更新文件以及日志文件... 阅读全文
posted @ 2015-09-14 23:53 光闪 阅读(502) 评论(0) 推荐(0) 编辑