[{"data":1,"prerenderedAt":167},["ShallowReactive",2],{"\u002F2015-04-30-%E6%8B%BE%E9%81%97":3},{"id":4,"title":5,"body":6,"date":144,"description":12,"extension":145,"meta":146,"navigation":149,"path":160,"seo":161,"stem":162,"tags":163,"__hash__":166},"blogs\u002F_legacy\u002F2015\u002F2015-04-30-%e6%8b%be%e9%81%97.md","拾遗",{"type":7,"value":8,"toc":136},"minimark",[9,13,18,21,24,33,36,40,43,46,57,60,66,69,72,75,81,84,90,93,96,102,105,109,112,115,121,124,130,133],[10,11,12],"p",{},"有的问题，花费了时间解决之后，由于短时间内不会用到，过了一段之后遇到了又需要重新寻找解决方案。故而在此记录下来，以节省时间花费。",[14,15,17],"h2",{"id":16},"qq登录","QQ登录",[10,19,20],{},"QQ登录的功能相对简单，但是在进行应用调试的时候可能会遇到这样的问题：",[10,22,23],{},"QQ登录回调时出现如下的报错：redirect uri is illegal(100010)",[10,25,26,27,32],{},"解决方法是，在URL的结尾加上斜杠，如",[28,29,31],"a",{"href":30},"\u002F","\u002F\u002F","。",[10,34,35],{},"QQ互联官方对信息的修改有一定延迟，测试时需要适当的拉出空隙。提交之前也最好等待一下，否则审核的时候可能会因为不能正常使用而被拒绝。",[14,37,39],{"id":38},"iptables","IPTABLES",[10,41,42],{},"Ubuntu上的iptables设置，网上教程很多，但是要做出适合自己需求的配置则需要仔细的研究。",[10,44,45],{},"配置需求：开放22、80端口。同时服务器需要进行抓取、回调等任务。",[47,48,53],"pre",{"className":49,"code":51,"language":52},[50],"language-text","iptables -A INPUT -i lo -j ACCEPT \niptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT \niptables -A INPUT -p tcp --dport 22  -j ACCEPT \niptables -A OUTPUT -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT \niptables -A INPUT -p tcp -s 0\u002F0 --dport 80 -j ACCEPT \niptables -A OUTPUT  -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT \niptables -A INPUT -p udp --sport 53 -m state --state ESTABLISHED -j ACCEPT \niptables -A OUTPUT  -p tcp --dport 80 -j ACCEPT \niptables -A INPUT -p tcp -s 0\u002F0 --sport 80 -m state --state ESTABLISHED -j ACCEPT \niptables -A INPUT -j DROP\n","text",[54,55,51],"code",{"__ignoreMap":56},"",[10,58,59],{},"常用命令：",[47,61,64],{"className":62,"code":63,"language":52},[50],"#保存配置\niptables-save\n\n#列出当前配置\niptables -L\n",[54,65,63],{"__ignoreMap":56},[14,67,68],{"id":68},"服务器空间问题",[10,70,71],{},"服务器出现\u002Fdev\u002Fxvda1达到100%或者文件写入被拒绝write failed: No space left on device时的解决方法。",[10,73,74],{},"使用命令",[47,76,79],{"className":77,"code":78,"language":52},[50],"df –h\n",[54,80,78],{"__ignoreMap":56},[10,82,83],{},"检查是否有除此之外的异常配比，如果没有的情况下，切换到根目录，通过目录大小进行排查",[47,85,88],{"className":86,"code":87,"language":52},[50],"du -h --max-depth=1 .\u002F\n",[54,89,87],{"__ignoreMap":56},[10,91,92],{},"通过列出的大小逐级寻找，可以定位出问题文件夹。",[10,94,95],{},"如果在根目录列出的大小和\u002Fdev\u002Fxvda1的大小差异极大，那么问有可能是文件删除之后依然被某些进程打开，导致无端占用磁盘空间。列出所有这些文件",[47,97,100],{"className":98,"code":99,"language":52},[50],"lsof | grep \"(deleted)\"\n",[54,101,99],{"__ignoreMap":56},[10,103,104],{},"之后就是寻找这些文件产生原因的地狱之旅了……紧急情况下可以使用重启的方法来暂时缓解危机。",[14,106,108],{"id":107},"bootsrap与wordpress","Bootsrap与Wordpress",[10,110,111],{},"当使用bootstrap做主题时，顶部的置顶导航条会和管理功能的admin-bar产生冲突。解决方法是，",[10,113,114],{},"首先，对body的class进行修改(通常在header.php中)",[47,116,119],{"className":117,"code":118,"language":52},[50],"\u003Cbody \u003C?php body_class(); ?>>\n",[54,120,118],{"__ignoreMap":56},[10,122,123],{},"然后添加对应的css：",[47,125,128],{"className":126,"code":127,"language":52},[50],"@media ( min-width: 782px ) {body{ padding-top: 70px !important; }}\n\nbody.body-logged-in .navbar-fixed-top{ top: 28px !important; }\n\nbody.logged-in .navbar-fixed-top{ top: 28px !important; }\n",[54,129,127],{"__ignoreMap":56},[10,131,132],{},"刷新一下之后，应该就不会出现相互遮盖的问题了。",[10,134,135],{},"注意：当前使用的wordpress版本4.2.1，版本不同的情况下解决方法可能会出现不同。",{"title":56,"searchDepth":137,"depth":138,"links":139},2,3,[140,141,142,143],{"id":16,"depth":137,"text":17},{"id":38,"depth":137,"text":39},{"id":68,"depth":137,"text":68},{"id":107,"depth":137,"text":108},"2015-04-30","md",{"layout":147,"status":148,"published":149,"author":150,"author_login":151,"author_email":152,"author_url":30,"wordpress_id":153,"wordpress_url":154,"date_gmt":155,"excerpt":156},"post","publish",true,{"display_name":151,"login":151,"email":152,"url":30},"chaoshikari","chaoshikari@gmail.com",1218,"\u002F\u002F?p=1218","2015-04-30 03:52:24 +0000",{"type":7,"value":157},[158],[10,159,12],{},"\u002F2015-04-30-拾遗",{"title":5,"description":12},"_legacy\u002F2015\u002F2015-04-30-%e6%8b%be%e9%81%97",[164,38,165,17],"wordpress","服务器","oiOqIKC7LS2SNjcmK2YEY8tkS9Wnq4z6QLTHWVp-kTM",1788763177614]