博客转移到Diahosting的xen-vps,现在购买免费送Directadmin控制面板.
August 20th, 2010 | Categories: WordPress | Tags: ,

WordPress首页不显示某些分类的文章代码如下:
在index.php里查找

<?php if (have_posts()) : ?>

在之前加入以下代码就OK了

<?php
//只显示某分类的文章
$cat_id='1,2';//the category ID
//不显示某些分类的话 这样写
//$cat_id='-3,-4';//the category ID
$limit = get_option('posts_per_page');
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts('cat=' . $cat_id . '&showposts=' . $limit . '&paged=' . $paged);
$wp_query->is_archive = true; $wp_query->is_home = false;
?>
5 comments (42 views)
August 8th, 2010 | Categories: Linux | Tags: ,

上班是无聊的,如果不找点事做,我会睡着的...

所以就这个脚本就诞生了..

主要功能有:(标题不是说了嘛!!!!),详细点就是,自动备份网站文件和数据库并上传到FTP空间,在本地保留3天备份,在远端FTP空间保留5天备份.
数据库备份采用发送到Email和FTP空间,双重备份,保证数据的安全.

首先安装Email发送组件

yum install sendmail mutt

Read more...

5 comments (212 views)
June 10th, 2010 | Categories: Linux | Tags: , ,

刚刚才在centos上安装了RAR, 现在又要在centos上安装7-ZIP,真烦,还好安装步骤都简单:

wget http://nchc.dl.sourceforge.net/sourceforge/p7zip/p7zip_4.65_src_all.tar.bz2
tar -xjvf p7zip_4.65_src_all.tar.bz2
cd p7zip_4.65
make
make install

Read more...

9 comments (352 views)
June 10th, 2010 | Categories: Linux | Tags: , , ,

由于最近弄了个计划,不得不使用RAR,所以要在centos上安装RAR,记录如下:

wget http://www.rarsoft.com/rar/rarlinux-3.9.3.tar.gz
tar -xvf rarlinux-3.9.3.tar.gz
cd rar
make

看见下面这些信息就是安装成功了
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
cp rar unrar /usr/local/bin
cp rarfiles.lst /etc
cp default.sfx /usr/local/lib
Read more...

2 comments (183 views)
June 8th, 2010 | Categories: Linux | Tags: ,

nginx现在的最新开发版本是0.8.40 ,一些网友就是喜欢最新版本,都问我的LNMP一键安装包怎么升级 Nginx 到最新版本 ,现在,只要你简单的执行几句命令,就可以将 Nginx 升级到最新版本 ,只适合我的LNMP一键安装包,如果你知道你的LNMP安装启动的路径,也可以用这个方法的.

首先下最新版本,解压缩编译

wget http://nginx.org/download/nginx-0.8.40.tar.gz
tar zxvf nginx-0.8.40.tar.gz
cd nginx-0.8.40
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-ld-opt='-ltcmalloc_minimal'
make

一定不要make install !!!!!
Read more...

3 comments (698 views)
June 8th, 2010 | Categories: Linux | Tags: ,

一,准备工作
1,登录进VPS控制面板,准备好随时重启VPS。
2,关闭Web Server先,过高的负载会导致后面的操作很难进行,甚至直接无法登录SSH。
3,以防万一,把设置的Web Server系统启动后自动运行去掉。
(如果已经无法登录进系统,并且重启后负载过高导致刚刚开机就已经无法登录,可联系管理员在母机上封掉VPS的IP或80端口,在母机上用虚拟控制台登录 进系统,然后进行2&3的操作,之后解封)

二,找出攻击者IP
Read more...

1 comment (322 views)
Page 1 of 5712345102030...Last »