操作如下,登陆SSH:
1 | vi /etc/sysconfig/network-scripts/ifcfg-eth0:0 |
第二个IP,就是
1 | vi /etc/sysconfig/network-scripts/ifcfg-eth0:1 |
第三个IP,就是
ifcfg-eth0:2(由此类推)
(more…)
操作如下,登陆SSH:
1 | vi /etc/sysconfig/network-scripts/ifcfg-eth0:0 |
第二个IP,就是
1 | vi /etc/sysconfig/network-scripts/ifcfg-eth0:1 |
第三个IP,就是
ifcfg-eth0:2(由此类推)
(more…)
Centos 5.6连这样的错误都有!!!!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Transaction Check Error: package openssl-0.9.8e-12.el5_5.7.i686 is already installed file /lib/.libcrypto.so.0.9.8e.hmac from install of openssl-0.9.8e-12.el5_5.7.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.i386 file /lib/.libssl.so.0.9.8e.hmac from install of openssl-0.9.8e-12.el5_5.7.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.i386 file /lib/libcrypto.so.0.9.8e from install of openssl-0.9.8e-12.el5_5.7.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.i386 file /lib/libssl.so.0.9.8e from install of openssl-0.9.8e-12.el5_5.7.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.i386 file /usr/bin/openssl from install of openssl-0.9.8e-12.el5_5.7.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.i386 file /usr/lib/openssl/engines/lib4758cca.so from install of openssl-0.9.8e-12.el5_5.7.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.i386 file /usr/lib/openssl/engines/libaep.so from install of openssl-0.9.8e-12.el5_5.7.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.i386 file /usr/lib/openssl/engines/libatalla.so from install of openssl-0.9.8e-12.el5_5.7.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.i386 file /usr/lib/openssl/engines/libchil.so from install of openssl-0.9.8e-12.el5_5.7.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.i386 file /usr/lib/openssl/engines/libcswift.so from install of openssl-0.9.8e-12.el5_5.7.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.i386 file /usr/lib/openssl/engines/libgmp.so from install of openssl-0.9.8e-12.el5_5.7.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.i386 file /usr/lib/openssl/engines/libnuron.so from install of openssl-0.9.8e-12.el5_5.7.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.i386 file /usr/lib/openssl/engines/libsureware.so from install of openssl-0.9.8e-12.el5_5.7.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.i386 file /usr/lib/openssl/engines/libubsec.so from install of openssl-0.9.8e-12.el5_5.7.i686 conflicts with file from package openssl-0.9.8e-12.el5_5.7.i386 |
解决方法很简单:
1 2 | rpm -e --justdb --nodeps openssl.i386 yum install openssl |
例如我要压缩 /cat/backup 这个文件夹 (绝对路径),但是不将里面的图片文件夹img也压缩了.可以用tar命令的–exclude 排除掉.方法
1 | tar -zcvf backup.tar.gz --exclude=/cat/backup/img /cat/backup |
排除多个目录
1 | tar -zcvf backup.tar.gz --exclude=/cat/backup/img --exclude=/cat/backup/a --exclude=/cat/backup/b /cat/backup |
最近无聊人太多了,一直拿我的小博客来压力测试,所以不得不限制同一个IP的连接数,用iptables就可以简单设置了…
1 | iptables -I INPUT -p tcp --dport 80 -m connlimit --connlimit-above 10 -j DROP |
限制单个地址并发连接数不大于10
1 2 3 4 5 6 7 | find . -type f -name "* *" -print | while read name; do na=$(echo $name | tr ' ' '_') if [[ $name != $na ]]; then mv "$name" $na fi done |
功夫网终于有贡献了..
不过可能会有副作用,就是连自己的网站都给功夫网封了…
下面是php代码..
1 2 3 4 5 6 | <?php if(strpos($_SERVER['REQUEST_URI'],'minghui') === false) { header('Location:'. $_SERVER['REQUEST_URI'] . '?minghui'); exit; } ?> |
演示:http://vii.im/gfw-test.php