p是输入目录代码如下importosdefgetDirList(p):#b=[];filepath=piffilepath=="":returnbfilepath=filepath.replace("/","\\")iffilepath[-1]!="\\":filepath=filepath+"\\"a=os.listdir(filepath)#print(a)forxina:path=filepath+xprint(path)ifos.path.isdir(path):c=getDirLi..
分类:
编程语言 时间:
2014-05-21 01:31:14
阅读次数:
417
keepalived是一款c语言写的实现在linux系统上实现负载均衡和高可用的软件。它遵从于GNU是一款优秀的开源软件。一:两个关键词的解释1:负载均衡keepalived内置了对ipvs函数的调用支持。可以直接在keepalived中按照语法配置ipvs然后keepalived就可以实现对ipvs的配置。2:高可用..
分类:
其他好文 时间:
2014-05-21 01:27:15
阅读次数:
1962
cdpr命令:安装:yum-yinstallcdpr(安装epel库)[21:53:07root@localhost~]#cdpr-h
cdpr-CiscoDiscoveryProtocolReporter
Version2.4
Copyright(c)2002-2010-MonkeyMental.com
d:Specifydevicetouse(eth0,hme0,etc.)
h:Printthisusage
t:timeinsecondstoabortwaitingforapack..
分类:
系统相关 时间:
2014-05-21 00:08:27
阅读次数:
447
数组:就是借助索引将多个数据存储为一个集合。普通数组:数组的索引只能使用整数关联数组:数组的索引可以使用整数和字符串(要bash4.0以上的版本才支持关联数组)数组通常与循环或者其他判断式交互使用才有比较高的意义普通数组的定义array1=(aab123a)数组的索引从0为起始索..
分类:
系统相关 时间:
2014-05-20 23:04:38
阅读次数:
350
1、卸载原有存储umount/home/weishaostore/2、查看iSCSIsession信息iscsiadm-msession3、设置InitiatorNamevim/etc/iscsi/initiatorname.iscsiInitiatorName=iqn.2014-05.com.ruijie.whistle:whistle-100.e7839d5100InitiatorName=iqn.2014-05.com.ruijie.whistle:whistle-150...
分类:
系统相关 时间:
2014-05-20 22:22:40
阅读次数:
492
一、简介LVM,即LogicalVolumeManager(逻辑卷管理)的缩写,是Linux环境下对磁盘分区进行管理的一种机制。二、版本LVM1:最初在1998年发布,在Linux内核2.4版本上实现。LVM2:LVM1的升级版,在Linux内核2.6版本上可用。[root@wshmysh]#uname-r#查看内核版本
2.6.32-431.el6.x86_6..
分类:
系统相关 时间:
2014-05-20 19:54:37
阅读次数:
763
在centos6.*中搭建nginx中遇到的一些问题。安装nginx之前,要先确定是否安装gcc、OpenSSL-devel、pcre-devel和zlib-devel软件库。安装好上边的这些库之后,继续安装nginx,在启动的时候出现了errorwhileloadingsharedlibraries:libpcre.so.1:cannotopensharedobjectfile:Nosuch..
分类:
其他好文 时间:
2014-05-20 19:11:01
阅读次数:
222
安装python2.7,安装成功会有一个python交互解释器,类似与命令窗口!但python仅是个基础库,用作web开发还远不够,因此需要装很多扩展插件!介绍个包管理器setuptools,安装方法:先下载SetupTools,然后安装,如果本机没有装python2.7的话,会报个错误,"python2.7required,b..
分类:
编程语言 时间:
2014-05-20 19:00:14
阅读次数:
334
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<errno.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include<arpa/inet.h>
#include<sys/ioct..
分类:
其他好文 时间:
2014-05-20 18:46:37
阅读次数:
260
一、LVS简介LVS是LinuxVirtualServer的简称,也就是Linux虚拟服务器,是一个由章文嵩博士发起的自由软件项目,它的官方站点是www.linuxvirtualserver.org。现在LVS已经是Linux标准内核的一部分,在Linux2.4内核以前,使用LVS时必须要重新编译内核以支持LVS功能模块,但是从Linux..
分类:
其他好文 时间:
2014-05-20 17:33:26
阅读次数:
369