摘要: vim /etc/init.d/nginx输入如下nginx脚本:#!/bin/bash## chkconfig: - 85 15# description: Nginx is a World Wide Web server.# processname: nginxnginx=/app/nginx/sbin/nginx #这里/app/是nginx安装路径conf=/app/nginx/conf/nginx.confcase $1 instart)echo -n "Starting Nginx"$nginx -c $confecho " done";;s 阅读全文
posted @ 2012-11-19 13:54 黄丁丁 阅读(499) 评论(0) 推荐(0)
摘要: 默认情况下,yum install wine会提示:"No package wine available."rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarchyum install wine如果提示地址失效,建议打开http://dl.fedoraproject.org/pub/epel/6/进入对应的目录,含32、64位的目录,搜索 epel-release(像现在就只有,6-8.noarch的了) 阅读全文
posted @ 2012-11-19 13:44 黄丁丁 阅读(411) 评论(0) 推荐(0)
摘要: 1) 永久性生效,重启后不会复原开启: chkconfig iptables on关闭: chkconfig iptables off2) 即时生效,重启后复原开启: service iptables start关闭: service iptables stop需要说明的是对于Linux下的其它服务都可以用以上命令执行开启和关闭操作。在开启了防火墙时,做如下设置,开启相关端口,修改/etc/sysconfig/iptables 文件,添加以下内容:-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j AC 阅读全文
posted @ 2012-11-08 10:33 黄丁丁 阅读(234) 评论(0) 推荐(0)
摘要: 明明安装成功好了,但是在安装mysql或者其他的mcrypt时就报错,说没有安装libmcrypt。。。解决方法:ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.laln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.soln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8ln -s / 阅读全文
posted @ 2012-11-06 17:46 黄丁丁 阅读(699) 评论(0) 推荐(0)
摘要: 安装了虚拟机,新建了一台,但是点启动时就报错,Kernel driver not installed (rc=-1908)使用/etc/init.d/vboxdrv setup提示错误:Stopping VirtualBox kernel modules [确定]Uninstalling old VirtualBox DKMS kernel modules [确定]Trying to register the VirtualBox kernel modules using DKMSError! echoYour kernel headers for kernel 3.2.7-1.fc16.i6 阅读全文
posted @ 2012-11-02 17:45 黄丁丁 阅读(1031) 评论(0) 推荐(0)
摘要: 在CentOS 6/Ubuntu 11.10 x64上编译安装php-5.4.7、mysql-5.5.27、nginx-1.3.6.tar.gz、xdebug-2.2.1以及开发IDE,jdk-6u35,phpstorm-5.0.1,netbeans-7.2和版本控制软件tortoisehg-2.5。 阅读全文
posted @ 2012-10-25 17:26 黄丁丁 阅读(3331) 评论(1) 推荐(0)
摘要: 一、不要在循环中执行mysql。我想很多童鞋都用过这样的方法获取二级分类。一次刷新中,尽量用最少的sql。select * from category where fid = 0;先获取父级分类。再用foreach($data as $v){$db->query("select * from category where fid = {$v.id} ");//获取子分类。}这方法很不好,如果你获取的数据不止十来条,而且访问量不止百来个,那你的网站还能撑得住吗?解决办法就是用select * from category,获取你要的所有数据,在用php的方法对这数组进行处 阅读全文
posted @ 2012-10-20 22:03 黄丁丁 阅读(198) 评论(0) 推荐(0)
摘要: Ubuntu 11.10下编译安装最新版 Mercurial hg 2.3和tortoisehg 2.5 阅读全文
posted @ 2012-09-26 11:27 黄丁丁 阅读(720) 评论(0) 推荐(0)