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