之前写过一个,http://zrj.me/archives/888,不过现在是 2.5.2,东西不同了,安装方式有所变化。
说起来,主要以下几点:
安装 JDK
打通 SSH
停掉防火墙
配置 core-site.xml, maprd-site.xml, hdfs-site.xml,新增了一个 yarn-site.xml
参考这里的文章,http://blog.csdn.net/tang9140/…,http://blog.csdn.net…… 阅读全文
Category Archives: Tech
Mac 鼠标匀速滚动
新上手 Mac 的时候发现他的鼠标滚轮,在高速滚动的时候,会有一个加速效果,实在是不能忍,于是搜了一下,发现这个帖子,http://www.weiming.info/zhuti/…,里面有说道:
c*****u
2013-12-07 15:24:34
1在mac上试了几个PC上的带滚轮的鼠标,发现滚轮的速度不是均匀的,而是有加速度的
,刚开始滚时网页慢慢下移,然…… 阅读全文
spring mvc 的 controller 函数的参数
学习 spring mvc 的过程中,发现他的 controller 的函数的入参很是神奇,变化多端,捉摸不定,查了一下,这里有说:http://stackoverflow.com/quest…
The general answer is “Spring magic”; however, “Supported handler method arguments and return types” in the MVC chapter of the …… 阅读全文
ruby gem 安装 compass
这年代,前端越来越复杂,又是 gem 又是 compass,又是 less 又是 sass,还有 grew 和 grunt,一堆堆的名字,上来就能把新手给吓个半死,这个暂且按住不说。
这年代,凡是个语言就有要个包管理器,不过这个倒是应该,任何语言都面临着库管理的问题,但是能不能不要假设网络一定是好的啊,要知道这个世上还有天朝这种孤岛…… 阅读全文
linux tcpdump
我一般用 tcpdump 有两种用法,一个是存盘,拿 wireshark 看,那么的话,就这么写
tcpdump -s 0 -i any -p udp and src 10.170.7.40 -w `date +%s`.pcap
或者实时打印到屏幕,就参考这里,http://www.askbjoernhansen.com…,这么写
I always forget the parameters for this and have to look them up in the …… 阅读全文
linux ss
ss 是一个类似 netstat 的网络连接查看工具,man page 是这么说的
ss – another utility to investigate sockets
而 netstat 的 man page 中也有说到
This program is obsolete. Replacement for netstat is ss.
常用命令有
-s 参数,打印 summary
# ss -s
Total: 1596 (kernel 1890)
TCP: 7587 (estab …… 阅读全文
python 日志初始化
import logging
logging.basicConfig(format = '[%(asctime)s][%(levelname)s] %(message)s [%(funcName)s::%(lineno)d]', level = logging.DEBUG)
logging.debug(123)
—————————
2016-2-19 09:26:26 update
logging.basicConfig(stream=sys.stdout, for…… 阅读全文
navicat 新建查询报错目录名或卷标语法不正确
网上查了一下,说要删了重建,其实这个错误在提示中比较明显了,解决方法是在右键,连接属性,高级,设置位置,把路径名中的非法字符去掉就可以了,例如冒号改成下划线等等,那么,Windows 路径中的非法字符有哪些呢,看这里,https://msdn.microsoft.com/zh-…
The following reserved characters:
< (less than)…… 阅读全文
获取当前机器 IP
std::string GetLocalIP()
{
struct ifreq req;
int sock_fd;
char szLocalIP[16]= {0};
string strLocalIP="";
sock_fd = socket(AF_INET,SOCK_STREAM,0);
if(sock_fd < 0)
return strLocalIP;
snprint…… 阅读全文
清除旧日志脚本
bash 的语法真是反人类啊,反人类啊啊啊
#!/bin/bash
# created: 2015-10-10 13:24:15
size=204800
echo "loop delete oldest log file until directory size < "$size" KB"
while [ 1 ]; do
directory_size=$(du -s | cut -f1)
if [ "$size" -gt "$dire…… 阅读全文