|
|
11 2011 档案
摘要: Linux kernel 2.6 supports filtering on a bridgeAll bridged packets pass through the FORWORD chainIntroWhat is bridge-nf?It is the infrastructure that enables {ip,ip6,arp}tables to see bridged IPv4, resp. IPv6, resp. ARP packets. Thanks to bridge-nf, you can use these tools to filter bridged packets, 阅读全文
摘要: 所有managed domain在创建的时候(xm new)会将其配置信息写入:/var/lib/xend/domains/UUID/config.sxp这样,在dom0重启的时候,xend会将/var/lib/xend/domains下的所有虚机自动创建出来。该文件的示例如下:(domain (domid 49) (vcpus_params ((cap 0) (weight 256))) (PV_args 3) (PV_bootloader /usr/bin/pygrub) (cpus (() () () () () () () ())) (VCPUs_live 1) (actions_af 阅读全文
摘要: This document(3466408)is provided subject to thedisclaimerat the end of this document.EnvironmentNovell SUSE Linux Enterprise Server 10 Service Pack 1Novell SUSE Linux Enterprise Server 10 Service Pack 2Novell SUSE Linux Enterprise Server 10 Service Pack 1 XENNovell SUSE Linux Enterprise Server 10 S 阅读全文
摘要: 配置文件SConstruct:env=Environment(CC='gcc', CFLAGS=[], LIBS=[''], LIBPATH=['/usr/local/lib'], CPPPATH=['.','/usr/local/include'], CPPDEFINES=[]) env.Program('test',Glob('*.c'))多个程序的时候:多次调用env.Program('a','a.c')env=Environment(CC= 阅读全文
摘要: 设置编译选项:SConstruct中添加:env=Environment(CC='gcc', CFLAGS=['-g','-pg'], LINKFLAGS=['-pg'], LIBPATH=['/usr/local/lib','/lib64'], CPPPATH=['.','/usr/local/include','/usr/include'], CPPDEFINES=[])如是多进程程序: export GMON_OUT_PREFIX=x.out运行 阅读全文
摘要: Problem 1: UDP, VLANs and Lack of Flow ControlProblem VLAN devices do not support scatter-gather This means the that each skb needs to be linearised and thus cloned if they are trasmitted on a VLAN device Cloning results in the original fragments being released This breaks Xen's netfront/netback 阅读全文
摘要: xm list源码分析XenAPI.py:442 parseServer():从/etc/xen/xm-config.xml读取配置,得到serverType: Xen-APIserverURI: http://localhost:9363/username: mepassword: mypasswordpython\xen\xm\main.py:2979 2979: main() 判断是否打印help 2956: xm_lookup_cmd() 查找命令对应的函数-->xm_list() 3003:_run_cmd 根据serverType: 如果Xen-API:server = Xe 阅读全文
摘要: when executing "xm list" command, u may see this output below: [root@spark ~]# xm li Name ID Mem VCPUs State Time(s) 1-pv 1 256 1 ------ 1.5 2-pv 2 256 1 ------ 0.7 state line shows nothing, why? "I don't know why it's not progressing, but it's perfectly possible to have a 阅读全文
摘要: 一、迁移的准备工作在进行迁移之前,有一些准备工作要做,主要是目的主机和源主机及其网络方面。下面分别加以介绍。首先,在源主机和目的主机方面,两者必须都运行有Xen和xend守护进程。必须确保目的主机具有足够的磁盘空间、内存容量和资源,以供迁移后的domain运行之用。此外,源主机和目的主机还必须具有相同的体系结构和虚拟化扩展,例如,如果源主机使用的是具有虚拟化扩展的x86-64体系结构的话,目的主机也必须如此。之所以这样做,是为了防止由于内核和用户库使用的指令集不匹配而导致domain迁移之后无法正常工作的情况。其次,在网络方面,要求源主机和目的主机还必须位于同一子网上。迁移domain时,如果 阅读全文
摘要: Domian 0 上运行配置相关的配置文件,运行下面命令: xm create example。进入Domain U 的创建过程;代码级别分析开始:首先对xm命令进行分析,找到xen/tools/python/xen/xm/main.py函数:def main(argv=sys.argv): 首先导入所有命令对应的处理函数:for c in IMPORTED_COMMANDS: commands[c] = eval_r('lambda args: xm_importcommand("%s", args)' % c)def xm_importcommand(c 阅读全文
摘要: 获取Google/Twitter hosts的方法Chrome插件:https://chrome.google.com/webstore/detail/bcomihljbnefaobillhnajpgompoelme?hc=search&hcp=mainPython脚本:https://github.com/davidsun/HostsFile 阅读全文
摘要: 本文对Xen平台上的软硬件攻击进行了分类,每类攻击给出了简单的攻击方法,实际上黑客、病毒等的攻击方法和攻击手段远不止于此,这里只是对一些常见的攻击手段进行了分类总结。首先是对Xen平台上的硬件安全威胁进行总结。lCPU方面的威胁:1)攻击者通过CPU microcode更新修改microcode,导致CPU执行指令是以为当前处于特权级(ring 0),从而攻击者能够非法访问Hypervisor的物理内存。2)恶意VM控制CPU cache内容,致使CPU无意中执行cache中修改了的Hypervisor代码。3)攻击者修改BIOS中的SMI handler,拥有足够权限执行SMM下的代码修改H 阅读全文
摘要: 1.DELL R710 CPU: e5504 官方称支持INTER的VT技术,但我装32位和64位的系统都不认cpu都不支持vmxBIOS中需要打开VT支持 processor settings --> virtualization technology --> enable2.Centos5.5(x64) 不支持 DELL R710 集成的声卡,造成客户端没有声音戴尔服务器PowerEdge售后服务电话800-858-0960 官方告知:DELL 全系列服务器(除工作站都是不支持声卡的,显卡是集成的)安装USB声卡解决问题3.用什么来集中管理和监控Xen、KVM虚拟机?convi 阅读全文
摘要: xm list中几种状态的含义使用xm list命令,得到的结果中,state段能列出6中XenDomain的状态,State为下面的其中一个。r–运行Domain正在CPU里面运行b–阻塞domain阻塞,意味这个domain不处于运行或者可运行的状态。导致这种状态可能是因为domain正在等待IO(atraditionalwaitstate)或者因为闲置而已经处于sleep状态。p–暂停domain处于暂停状态,通常是因为管理员运行了xmpause命令。处于暂停状态的domain依旧会占用系统资源,比如内存。但是不会被Xenhypervisor列出(butwillnotbeeligible 阅读全文
摘要: Xen虚拟机的创建和启动半虚拟化获取Sample Image到Jailtime.org下载,并解压(注默认root密码为password)# tar jxvf centos.5-0.20070424.img.tar.bz2centos.5-0.imgcentos.5-0.xen2.cfgcentos.5-0.xen3.cfgcentos.swap当然,也可以到http://www.rpath.com/rbuilder下载创建配置文件参考centos.5-0.xen2.cfg和centos.5-0.xen3.cfg,其内容为:kernel = “/boot/vmlinuz-2.6.18-xen” 阅读全文
摘要: 使用virt-install 创建Xen虚拟机[root@gmnode14 vm01-CentOS-5.5]# virt-install -n vm01-CentOS-5.5 -r 1024 --vcpus=4 -f vm01-CentOS-5.5.img -s 20--nographic-l nfs:10.10.113.14:/opt/CentOS/mirrors/5.5-------------------------virt-install 参数解析:-nvm01-CentOS-5.5#虚拟机的名称,这里我们的名称是vm01-CentOS-5.5-r 1024#虚拟机的最大内存,单位MB 阅读全文
摘要: Xen PV Bootloader为什么选择bootloader = '/usr/bin/pygrub'Why?PyGrub enables you tostart LinuxDomUswith the kernels that lie in the filesystem of the DomU instead of with a Kernel that lies in the filesystem of the Dom0.This enables easier kernel update from DomU or migration of HVM'ed Linuxes 阅读全文
摘要: libvirt获取实际内存的实现libvirt可以通过virDomainGetInfo()来得到虚机信息: struct virDomainInfo{ unsigned char state : the running state, one of virDomainState unsigned long maxMem : the maximum memory in KBytes allowed unsigned long memory : the memory in KBytes used by the domain unsigned short nrVirtCpu : the number 阅读全文
摘要: 使用Python可以用很简单的方法得到本机IP地址,不过在Windows和Linux下的方法稍有不一样的,Windows下获得IP地址的方法方法一使用拨号上网的话,一般都有一个本地ip和一个外网ip,使用python可以很容易的得到这两个ip 使用gethostbyname和gethostbyname_ex两个函数可以实现import socketlocalIP = socket.gethostbyname(socket.gethostname())#得到本地ipprint "local ip:%s "%localIPipList = socket.gethostbynam 阅读全文
摘要: 启动虚机报错:Error: Boot loader didn't return any data!Usage: xm start <DomainName>Start a Xend managed domain -p, --paused Do not unpause domain after starting it -c, --console_autoconnect Connect to the console after the domain is created --vncviewer Connect to display via VNC after the domain 阅读全文
摘要: XenAPI方式:#!/usr/bin/pythonfromxen.xm.XenAPIimportSessionsession=Session('httpu:///var/run/xend/xen-api.sock')try:session.login_with_password('','')xenapi=session.xenapi#print xenapi.VM.get_all_records()#print xenapi.VM_metrics.get_all_records()printxenapi.VM.get_all()printxen 阅读全文
摘要: 安装:首先下载rpmforge-release扩展的rpm包32位操作系统:http://www.sudu.us/Tools/bmon/rpmforge-release-0.3.6-1.el5.rf.i386.rpm64位操作系统:http://www.sudu.us/Tools/bmon/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm去安装rpmforge-release扩展rpm -Uhvrpmforge-release-0.3.6-1.el5.rf.i386.rpm或rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm 阅读全文
摘要: xend的安装路径xend的python源码路径:/usr/lib64/python2.4/site-packages/xen/配置文件路径:/etc/xenxenstore生成的数据库文件路径:/var/lib/xenstored/tdb 阅读全文
摘要: 安装:Wincap 4.0.2以上版本xcaphttp://download.csdn.net/user/cxxxap使用选择网卡 在 interface 下拉菜单中,选择 Refresh interface,就可以识别 pc 上的网卡。选择使用的接口后,右键选择 Start interface,之后就 可以选择用该接口进行收发报文了。创建一个 packet group在packet group中添加包,双击包名可以打开包设置向导,按向导设置包,支持arp/ipv4/ipv6/icmp/tcp/udp等报文配置发包的时间间隔就可以发包了。 阅读全文
摘要: #!/bin/bash# ultimate.sh for duron# Based on Wonder Shaper v1.1aecho "/usr/sbin/ultimate.sh: "# Please read the README before filling out these values.# Set the following values to somewhat less than your actual download# and upload speed in kilobits. Also set the device that is to be shap 阅读全文
摘要: arping:向相邻主机发送ARP请求语 法arping[必要参数][选择参数][目的地址]功 能arping 命令:在指定网卡上发送ARP请求指定地址,源地址 “-s” 参数指定,可用来直接 ping MAC 地址,以及找出那些 ip 地址被哪些电脑所使用了类似命令:arppingping6clockdifftracepathcu相似命令:linux命令执行权限:超级用户 普通用户命令属性:网络通讯参数必要参数-A ARP回复模式,更新邻居-b 保持广播-D 复制地址检测模式-f 得到第一个回复就 退出-q 不显示警告信息-U 主动的ARP模式,更新邻居选择参数-c<数据包的数目> 阅读全文
摘要: 在使用HTB的时候,有时会碰到htb quantum of class 10001 is big. consider r2q change的警告,而quantum是HTB子类借父类带宽时的计算依据。如果该参数设置不好,可能会碰到意想不到的结果。HTB manual建议quantum取值要尽量小,且要大于mtu。这样,quantum的最佳值就是等于mtu。如果不设置该参数,默认quantum=rate/r2q,而默认r2q=10,默认mtu=1500,也就是说使用默认参数只适合rate=15kbps的情况。当实际带宽不同时,需要手动设置r2q参数:r2q=rate/mtu,实际r2q最好比计算出 阅读全文
摘要: http://markmail.org/ 阅读全文
摘要: Credit调度算法的基本原理Credit调度算法是自Xen3.0版本以来使用的缺省的调度算法,其为一种按比例公平共享的非抢占式调度算法。Credit调度算法为每一个Guest操作系统设置二元组(weight,cap),各个Guest操作系统之间weight的比例决定它们各自占用CPU时间片的比例;而cap决定一个Guest操作系统用CPU时间的上限值,比如cap=50,表示Guest操作系统只能最多只能占用半个物理CPU的所有时间,cap=100,表示Guest操作系统只能最多只能占用一个物理CPU的所有时间。Credit调度算法将各个虚拟CPU分为两个队列,under队列和over队列,它 阅读全文
摘要: HFSC Scheduling with Linux© 2005 Klaus Rechert, Patrick McHardy © 2006 Martin A. Brown (translation)For complex traffic shaping scenarios, hierarchical algorithms are necessary. Current versions of Linux support the algorithms HTB and HFSC. While HTB basically rearranges token bucket filte 阅读全文
摘要: 对于复杂的流量管制方案,阶层式演算法是必要的。新近版本的linux可采用的演算法有htb和hfsc 。而htb基本上是将token bucket filter( tbf )转换成阶层式架构,保留了tbf的主要特征, 而hfsc允许按比例分配频宽并且控制及分配延迟(latency)。这能够在只有一条实体网路连线的情况下,又快又好地同时提供频宽密集的资料传输服务及互动式服务。当网路被一个以上的实体连线连结或提供各种不同的服务时,我们需要一些合理的资源管理以保障个人服务及共享连接使用者的最低频宽。尤其是关于VOIP或串流服务,无论是单纯的频宽分配或降低延迟都变得相形重要。在两个使用者共享一个1000 阅读全文
摘要: Quantum & r2qLet's assume we have 2 classes with the same parent :Parent : ceil = rate = 100class 1 : rate = 40 and ceil = 100class 2 : rate = 20 and ceil = 100(the used numbers are just theoretical to explain how it works)Both classes are sending as much as they can. First, they are allowed 阅读全文
摘要: TSO (TCP Segmentation Offload)TSO (TCP Segmentation Offload) 是一种利用网卡分割大数据包,减小 CPU 负荷的一种技术,也被叫做 LSO (Large segment offload) ,如果数据包的类型只能是 TCP,则被称之为 TSO,如果硬件支持 TSO 功能的话,也需要同时支持硬件的 TCP 校验计算和分散 - 聚集 (Scatter Gather) 功能。可以看到 TSO 的实现,需要一些基本条件,而这些其实是由软件和硬件结合起来完成的,对于硬件,具体说来,硬件能够对大的数据包进行分片,分片之后,还要能够对每个分片附着相关的 阅读全文
摘要: 后台执行的方法:disconnect#!/usr/bin/expectspawn openvpn --config ./test.ovpn expect "*Username:"send "root\r"expect "*Password:"send "passwd\r"if [fork]!=0 exitdisconnect传递参数的方法:set name [lindex $argv 0]#!/usr/bin/expectif { $argc != 2 && $argc != 1 } { send_ 阅读全文
摘要: OverviewThe u32 filter allows you to match on any bit field within a packet, so it is in some ways the most powerful filter provided by the Linux traffic control engine. It is also the most complex, and by far the hardest to use. To explain it I will start with a bit of a tutorial.MatchingThe base o 阅读全文
摘要: 安装:yum install sysstat查看与LVM对应关系:lvdisplay|awk '/LV Name/{n=$3} /Block device/{d=$3; sub(".*:","dm-",d); print d,n;}'实例:$iostat -x 1Linux 2.6.33-fukai (fukai-laptop) _i686_ (2 CPU)avg-cpu: %user %nice %system %iowait %steal %idle 5.47 0.50 8.96 48.26 0.00 36.... 阅读全文
摘要: 这是“你应该知道的Unix和Linux命令”系列的第三篇,在这篇文章中,我会介绍lsof这个工具,如果说netcat是进行网络诊断的瑞士军刀,那么lsof就是Unix调试的瑞士军刀。Lsof是遵从Unix哲学的典范,它只做一件事情,并且做的相当完美——它可以列出某个进程打开的所有文件信息。打开的文件可能是普通的文件,目录,NFS文件,块文件,字符文件,共享库,常规管道,明明管道,符号链接,Socket流,网络Socket,UNIX域Socket,以及其它更多。因为Unix系统中几乎所有东西都是文件,你可以想象lsof该有多有用。你可以看看这系列文章第一篇对pipe viewer的介绍,如果你对 阅读全文
摘要: 首先要了解两个特殊的设备:/dev/null:回收站、无底洞/dev/zero:产生字符Ø 测试磁盘写能力time dd if=/dev/zero of=/test.dbf bs=8k count=300000因为/dev//zero是一个伪设备,它只产生空字符流,对它不会产生IO,所以,IO都会集中在of文件中,of文件只用于写,所以这个命令相当于测试磁盘的写能力。Ø 测试磁盘读能力time dd if=/dev/sdb1 of=/dev/null bs=8k因为/dev/sdb1是一个物理分区,对它的读取会产生IO,/dev/null是伪设备,相当于黑洞,of到该设备不 阅读全文
摘要: 日常做后台服务开发,总免不了要写测试客户端。但是tcp客户端写起来其实还是比较罗嗦的,各种错误返回,各种异常判断。。。。而我们通常并不是要写一个健壮的客户端,我们只是要一个能用的客户端来测试服务端是否正确。 这里给大家介绍一个简单易用的方法:用bash操作socket!很酷,是不是? man bash,查找tcp关键字,可以看到这么一段内容:1/dev/tcp/host/port2If host is a valid hostname or Internet address, and port is an integer port number or service name, bash at 阅读全文
摘要: 参考了TC的很多文档,自己也整理了一篇配置记录。在实际使用过程中效果还不错,在此分享给大家以备参考。环境:局域网规模不是很大40多台机器。 NAT共享上网(内网:eth0 外网:eth2)CBQ 是通过硬件的闲置时间来计算队列,硬件不同,效果也不同,对于比较大的网络使用HTB比较好。以下限制上传和下载的方法可以写成脚本,通过mrtg发现流 量的异常情况,然后通过ntop查处是谁在干坏事,最后用写好的tc脚本限制他的流量,避免影响其他人的网络使用。1) 针对网络物理设备(如以太网卡eth0)绑定一个CBQ队列#tc qdisc add dev eth0 root handle 1: cbq ba 阅读全文
摘要: 同样要重复说明TC规则涉及到“队列(QUEUE) 分类器(CLASS) 过滤器(FILTER)”三项。而且是控发不控收。今天我们就TC针对HTB队列方式配合filter的set-mark功能再做流量管控演示。HTB被 很多人认为要比CBQ操作起来简单很多,当然我也这样认为。假设环境:linux下有两块网卡,一个eth1是外网,另一块eth0是内网.在eth0上做HTB。(注意:filter划分标志位可用u32 打标功能或iptables的set-mark功能,如果用iptables来打标记的话,下行速度在eth0处控制,但打标应在进入eth0之前进行, 所以要在防火墙中设置“-i eth1&q 阅读全文
摘要: 在 WebHostingTalk 论坛上有些国外奸商会把虚拟机当作独立服务器卖,去年7月份的时候就有一位中国同胞上当受骗, 并在 WHT 上发帖声讨,证据确凿,甚至连服务商自己也承认,回帖达355篇。这家独立服务器/VPS 提供商 HostATree.com 居然大胆的把 OpenVZ VPS 这种一看就知道是虚拟机的虚拟机当作独立服务器卖,晕,至少也要弄个 VMWare/KVM/Xen HVM 吧(更难发现是虚拟机),用 OpenVZ 这种容器也太欺负人了:)昨天恰好收到网友一封邮件问到了如何判断自己买的是独立服务器还是虚拟机的问题。这里 VPSee 简单介绍一下市面上常用虚拟技术(包括容器 阅读全文
摘要: Xen Live Migration with iSCSIOverviewThis is a document about how to set up XEN and iSCSI on 3 Debian Stable (3.1 / Sarge) machines so that you can have a virtual host that can be migrated live between 2 of the machines. The third machine will be the common disk for the virtual machine that is seen 阅读全文
摘要: If you ever want to get to the grub menu while using pygrub - there is a really simple way of doing that. Just add : bootargs="-i"into the /etc/xen/{domU config file}. And the next time you start the VM, it will bring up the grub menu. Quite handy when you need to recover the root password 阅读全文
摘要: python pdb调试python -m pdb myscript.py #注意这会重启myscript.py可以在程序中这么设置断点:import pdb; pdb.set_trace()可以修改变量的值,但是要注意,前面加上!比如要修改final的值,应该这样!final="newvalue"支持的命令: p 打印变量 n next step 细点运行 c continue l list a args 打印当前函数的参数 condition bpnumber [condition] clear/disable/enable 清除/禁用/使能断点 q quitpytho 阅读全文
摘要: * Export necessary system variables:# export XEND_DEBUG=1# export XEND_DAEMONIZE=0* Start xend tracing:# /usr/sbin/xend trace_startThe trace file will be available at /var/log/xen/xend.trace.* Debug xend using the Python Debugger:# python -m pdb /usr/sbin/xend trace_startYou'll drop to a debuggi 阅读全文
摘要: udevis the device manager for the Linux 2.6 kernel series. Primarily, it manages device nodes in/dev. It is the successor of devfs and hotplug, which means that it handles the/devdirectory and all user space actions when adding/removing devices, including firmware load. The system is divided into th 阅读全文
摘要: I'm looking for some definite info about when it's allowed to restartthe various Xen daemons (xend, xenstored and xenconsoled).Up to now I worked with the assumption that I can restart them whileguest domains are running on the host and there's no harm done.Indeed there wasn't, until 阅读全文
摘要: The Xen StoreThe Xen Store Daemon provides a simple tree-like database to which we can read and write values. The Xen Store code is mainly under tools\xenstore.It replaces the XCS, which was a daemon handling control messages.The physical xenstore resides in one file:/var/lib/xenstored/tdb. Both use 阅读全文
摘要: xen虚拟windows xp,使用vnc图形桌面,鼠标位置偏移。在xen的bug报告页上有这个问题的解决方法:http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=585 解决方法有两个:一,在windows xp中进入控制面板,禁止鼠标加速。二,在xen配置文件中使用usb tablet,如下: #----------------------------------------------------------------------------- # Enable USB support (specific devices spe 阅读全文
摘要: 安装Xen:# yum install kernel-xen xen重启,启动时选择xen的内核启动后查看Xen的状态:# xm listName ID Mem(MiB) VCPUs State Time(s)Domain-0 0 747 2 r—– 3623.1安装虚拟机:virt-install -n centos -r 256 -f /home/feisky/xen/centos.img -s 4 –nographics -p -lhttp://mirrors.163.com/centos/5.6/os/i386安装完成后,会在/etc/xen下面生成一个配置文件:name = “cen 阅读全文
摘要: XenBus and XenStoreXenStore是一个类似于数据库的文件系统, 包含了domain间的共享信息. 有domain配置和状态信息.XenStore 提供了一种发现设备信息的简便方法. 它作为数据库在/var/lib/xenstore/tdb, 在用户空间的 daemon 称为 "xenstored".这个逻辑文件树有三个主要的路径:/vm – /vm/uuid 存储配置信息,例如虚拟CPU数和内存分配数./local/domain – 包含了正在运行的domain信息, 由domid标识./tool – 存储多种工具信息.应用程序向这个数据库的 key 阅读全文
摘要: xen提供的虚机动态迁移需要满足以下条件:1.配置文件中开启迁移# (xend-relocation-hosts-allow '')# (xend-relocation-port 8002)# (xend-relocation-address '')# (xend-relocation-server yes)2.两台dom0能在同样的路径访问到domU相关文件。因为迁移过去的信息是包括绝对路径。使用xm命令进行动态迁移,迁移过去的只是虚机的当前运行状态,而块设备则不进行任何处理。这样,一般都需要搭建共享的存储环境,如iSCSI, DRBD, NFS等。注意:迁移 阅读全文
摘要: 公司新上了一个8核的cpu,上面用xen虚拟了2个Windows。但是通过各种配置,还是无法平衡cpu的压力。大多都压在第一个cpu上。下面是top的数据Cpu0: 20.6%us, 65.7%sy,0.0%ni, 13.7%id,0.0%wa,0.0%hi,0.0%si,0.0%stCpu1:0.0%us,0.0%sy,0.0%ni, 96.2%id,0.0%wa,0.0%hi,0.0%si,3.8%stCpu2:1.0%us,0.0%sy,0.0%ni, 99.0%id,0.0%wa,0.0%hi,0.0%si,0.0%stCpu3:0.0%us,0.0%sy,0.0%ni, 99.0%i 阅读全文
摘要: 替换默认源为163源:wget http://mirrors.163.com/.help/CentOS5-Base-163.repomv CentOS5-Base-163.repo /etc/yum.repos.d/mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bakyum makecacheyum源改回去:mv /etc/yum.repos.d/CentOS-Base.repo.bak /etc/yum.repos.d/CentOS-Base.reporm -f /etc/yum.repos.d/ 阅读全文
摘要: 不完整的内核源码:安装: * kernel-devel (both 32- & 64-bit architectures) * kernel-xen-devel (both 32- & 64-bit architectures) * kernel-PAE-devel (32-bit architecture only)执行:ln -s /usr/src/kernels/2.6.18-238.19.1.el5xen-x86_64 /lib/modules/$(uname -r)/build完整的内核源码:yum install rpm-build redhat-rpm-confi 阅读全文
摘要: rpm2cpio xxxx.rpm | cpio -id 阅读全文
摘要: 原因:默认DES加密,最多只支持8位解决方法:使用md5+pam加密vim /etc/pam.d/common-password注销掉:password optional pam_smbpass.so nullok use_authtok use_first_pass missingok添加:password required pam_unix.so nullok obscure min=8 max=20 md5/etc/login.defs添加:MD5_CRYPT_ENAB yes 阅读全文
摘要: IO:1. Virtual disk I/O management mechanism in Xenhttp://lists.xensource.com/archives/html/xen-devel/2007-07/msg00863.html2. Token-based-QoS-resource-limiting-for-VBD-I-Ohttp://markmail.org/thread/3hmn7fwfzd5b56oh#query:+page:1+mid:yql4s2c2dvnj6xiu+state:results3. dm-iobandhttp://sourceforge.net/app 阅读全文
摘要: 转自:http://linux.vbird.org/linux_server/redhat6.1/linux_22nat.php要求:第一张网路卡eth0为对外的连线介面,具有实体IP;第二张网路卡eth1为对内的连线介面,为虚拟IP。基本上,你要做的事情其实真的很简单,只要:确定第一张网路卡可以连上网际网路:关于对外的连线上网际网路方法请参考『连上Internet』的说明,这里就不多说了;确定第二张网路卡可以正常的启动:这是一张具有虚拟IP的网路卡,请确定他可以被启动,另外,这里的设定是这样的:IP为192.168.1.2;子遮罩网路为255.255.255.0;gateway 为192.1 阅读全文
|