2015年11月2日

nginx返回数据太长,被中间截断返回

摘要: 前两天遇到一个问题,就是线上服务器中有一台服务器在需要返回的数据过长时,会被nginx自动截断,返回一部分。配置文件都是一样的,查了半天也没查出来原因,后来请教一位大神,他在localtion里面加了 这么两句话就可以了,是因为fastcgi_buffers设置的太小造成的。具体为什么几台机器上面默 阅读全文

posted @ 2015-11-02 13:51 asif 阅读(5614) 评论(0) 推荐(0) 编辑

2015年10月8日

Centos6修改yum源

摘要: cd /etc/yum.repos.dwget http://mirrors.163.com/.help/CentOS6-Base-163.repomv CentOS6-Base-163.repo CentOS-Base.repoyum clean all若没有超级管理员权限请切换到root或者命令... 阅读全文

posted @ 2015-10-08 16:44 asif 阅读(144) 评论(0) 推荐(0) 编辑

2015年8月24日

leetcode Missing Number

摘要: Given an array containingndistinct numbers taken from0, 1, 2, ..., n, find the one that is missing from the array.For example,Givennums=[0, 1, 3]retur... 阅读全文

posted @ 2015-08-24 09:17 asif 阅读(255) 评论(0) 推荐(0) 编辑

2015年7月24日

centos6 php、mysql等升级

摘要: 1.下载rpm运行文件rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm2.运行这个文件rpm -ilatest.rpm3.yum list会显示出新的列表4.卸载老的版本5.根据卸载的选项进行安装 阅读全文

posted @ 2015-07-24 11:50 asif 阅读(150) 评论(0) 推荐(0) 编辑

2015年3月31日

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

摘要: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)一般出现这种错误不是密码没设置,就是密码错误(可能也有其他的原因)依次执行下面的命令:/etc/init.d/mysql stop (... 阅读全文

posted @ 2015-03-31 17:39 asif 阅读(141) 评论(0) 推荐(0) 编辑

2015年3月24日

leetcode Word Frequency

摘要: 题目连接地址:https://leetcode.com/problems/word-frequency/Write a bash script to calculate the frequency of each word in a text filewords.txt.For simplicity... 阅读全文

posted @ 2015-03-24 10:39 asif 阅读(595) 评论(0) 推荐(0) 编辑

2015年1月16日

ssh免密码登录

摘要: linux终端利用ssh远程登录的时候,每次都需要输入密码,很麻烦,下面说一下头几天在imooc上面看到的一种免密码登录的方法:asif@ubuntu:~$ssh-keygen执行之后会出现一系列的提示,直接回车默认就行。然后会在用户主目录之下会生成两个文件.ssh/id_rsa和.ssh/id_r... 阅读全文

posted @ 2015-01-16 10:17 asif 阅读(160) 评论(0) 推荐(0) 编辑

2015年1月11日

linux抓包工具--tcpdump

摘要: linux抓取访问自己的数据包命令执行:tcpdump -i eth0 -nnX port 21-i后面跟的是坚挺哪一张网卡, nnX的意思是以ip和端口号的形式显示并且显示为16进制, port 21表示监听21号端口。然后用ftp登陆这台机器之后就会有如下显示:密码直接就出来了 阅读全文

posted @ 2015-01-11 21:10 asif 阅读(251) 评论(0) 推荐(0) 编辑

2014年12月17日

Linux 系统监控、诊断工具-top,vmstat,iostat,iotop

摘要: 1、问题:最近在做日志的实时同步,上线之前是做过单份线上日志压力测试的,消息队列和客户端、本机都没问题,但是没想到上了第二份日志之后,问题来了:集群中的某台机器 top 看到负载巨高,集群中的机器硬件配置一样,部署的软件都一样,却单单这一台负载有问题,初步猜测可能硬件有问题了。同时,我们还需要把负载... 阅读全文

posted @ 2014-12-17 23:26 asif 阅读(692) 评论(0) 推荐(0) 编辑

2014年12月9日

根据经纬度调用百度地图获取详细的位置信息

摘要: 访问类似下面的网址:http://api.map.baidu.com/geocoder/v2/?ak=A1758accd4ec22544bc2f200e5c83a76&location=39,116&output=json&pois=0location代表坐标的位置,前面是纬度,后面的是经度,中间用... 阅读全文

posted @ 2014-12-09 18:00 asif 阅读(561) 评论(0) 推荐(0) 编辑

导航