摘要: 在虚拟机VMWare 10中安装了ubuntu 14.04 LTS,但无法使用共享文件夹功能,只能转向samba1. 安装samba服务sudo apt-get install samba2. 配置sambasudo mv /etc/samba/smb.conf /etc/samba/smb.con... 阅读全文
posted @ 2015-11-08 18:00 lych2e 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 研究多日终于解决squid的验证问题,使用ncsa验证失败的原因是生成的密码文件不对。使用htpasswd生成密码文件要用-d选项。参考如下链接:http://askubuntu.com/questions/316659/squid3-ncsa-basic-auth-always-fails但是不能... 阅读全文
posted @ 2015-11-08 17:54 lych2e 阅读(396) 评论(0) 推荐(0) 编辑
摘要: 今天遇到一个mysql的编码问题:将数据从原来的库表导到新库表后,用同样的程序读取数据得到乱码。库表编码为utf8,程序与数据库建立链接后调用mysql_set_charset_set设置为utf8。新库表数据在mysql客户端set names utf8,terminal字符集为utf8情况下,数... 阅读全文
posted @ 2015-11-08 17:53 lych2e 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 1. 设置程序/服务自动启动添加到服务列表:chkconfig [service] –add列出所有服务:chkconfig [service] –list从服务列表删除:chkconfig [service] –del设置服务自动启动:chkconfig [service] on取消服务自动启动:... 阅读全文
posted @ 2015-11-08 17:52 lych2e 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 1. 设置tab键为4个空格set shiftwidth=4set smarttab 阅读全文
posted @ 2015-11-08 17:51 lych2e 阅读(88) 评论(0) 推荐(0) 编辑
摘要: Ngnix/Squid/Apache 都支持http的正向代理,目前已经成功的配置了Squid和Apache,经过一段时间的使用,发现apache比较稳定。以下是尝试过的方法:Apache版本2.4,在site-enabled下增加proxy.conf配置文件:ServerNameProxy域名Pr... 阅读全文
posted @ 2015-11-08 17:50 lych2e 阅读(336) 评论(0) 推荐(0) 编辑
摘要: Ultrafire 手电筒(美亚)防水,超小10cm,300lu,只要7.2刀,可惜不能直邮大陆,连直邮hk也不行。 20140830,了解到Ultrafire/Supfire都是冒牌,正牌叫做SureFire,价格不菲。The... 阅读全文
posted @ 2015-11-08 17:48 lych2e 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 最近在项目中发现某个页面的资源,例如JS和png,总是没有被cache,查看http请求,发现服务器的Response头没有设置cache时间只要设置max-age值,浏览器就会对资源进行cache了。参考资料:http://www.ginano.net/browser-server-cache-c... 阅读全文
posted @ 2015-11-08 17:47 lych2e 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 监控某个IP和端口的包tcpdump -i 设备名(eth0) (dst/src) host IP and port PORThost前的dst和src用于描述地址是源还是目的监控某种协议包tcpdump -i 设备名(eth0) tcp/udp (dst/src) host IP and port... 阅读全文
posted @ 2015-11-08 17:44 lych2e 阅读(112) 评论(0) 推荐(0) 编辑