随笔分类 -  liunx

摘要:1,删除eth0:0网卡 ifconfig etho0:0 down 2,添加虚拟ip(vip) Ifconfig eth0:0 192.168.2.200 netmask 255.255.255.0 up 阅读全文
posted @ 2014-11-13 14:46 oyaimj 阅读(141) 评论(0) 推荐(0)
摘要:1,nova #nova list –all-tenant –host compute1 #nova-manage service list #nova delete 阅读全文
posted @ 2014-11-13 13:59 oyaimj 阅读(124) 评论(0) 推荐(0)
摘要:负载均衡的两种方式: 1,基于操作系统的 (LVS 基于 Linux操作系统实现的一种软负载) 2,基于第三方软件的 (HAProxy 开源的 基于第三方软件的软负载) ------------------------------------------------------------------------------ haproxy支持两种主要代理... 阅读全文
posted @ 2014-11-10 16:44 oyaimj 阅读(534) 评论(0) 推荐(0)
摘要:$ mkdir /etc/systemd/system/docker.service.d/ $ cat >/etc/systemd/system/docker.service.d/proxy.conf << EOF [Service] Environment=HTTP_PROXY=http://myproxy:3128/ EOF $ systemctl daemon-reload $ ... 阅读全文
posted @ 2014-11-06 16:13 oyaimj 阅读(415) 评论(0) 推荐(0)
摘要:Libvirt 客户端管理工具virsh 链接到Hypervisor 本地的Hypervisor #virsh (virsh -c qemu:///system 或者 virsh –connect qemu:///system ) 远程的Hypervisor #virsh –c qemu+ssh://root@xxx.xxx.xxx.xxx/system ( 使用ssh的transpor... 阅读全文
posted @ 2014-11-03 16:19 oyaimj 阅读(178) 评论(0) 推荐(0)
摘要:Xmanager Yum install xauth Yum install tigervnc Yum install virt-manager Yum install libvirt Systemctl start libvirtd 阅读全文
posted @ 2014-10-30 13:36 oyaimj 阅读(161) 评论(0) 推荐(0)
摘要:1,使用guestfish修改iptables中的内容 Install guestfish #yum install libguestfs-tools Guestfish –rw –a rehel65.img :run :list-filesystems mount /dev/sda1 / vi /etc/sysconfig/iptables 阅读全文
posted @ 2014-10-24 15:00 oyaimj 阅读(215) 评论(0) 推荐(0)
摘要:1,替换本件中的指定内容 #sed -i "s/abcdefg/xyz/g" a.txt //把a.txt中abcdefg 替换成xyz (g代表全局,s 后面的也可以写为#) sed -i "s#abcdefg#xyz#g" a.txt 阅读全文
posted @ 2014-10-10 13:55 oyaimj 阅读(117) 评论(0) 推荐(0)
摘要:1,sleep sleep 3 休息3秒 sleep 3s休息3秒 sleep 3m休息3分钟 sleep 3h休息3小时 2,grep grep –v grep //忽略本条命令 -v select non-matching lines 例:ps –ax |grep –v grep 忽略本条命令(ps –ax |grep –v grep) $ ps –ax –... 阅读全文
posted @ 2014-09-19 11:05 oyaimj 阅读(176) 评论(0) 推荐(0)
摘要:1,dev/null # cd test #tar xzvf jdk-*-linux-x64.gz >/dev/null 把xzvf jdk-*-linux-x64.gz文件解压到 当前目录(test)下。 注 :/dev/null 是 Unix/Linux 里的【无底洞】 当你不想看到 output 或者output 太多太大了,有可能把硬碟给挤爆了的时候, 程序的设计就会考虑... 阅读全文
posted @ 2014-09-17 12:29 oyaimj 阅读(132) 评论(0) 推荐(0)
摘要:Shift :命令左移 shift 3表示原来的$4现在变成$1 不带参数的shift命令相当于shift 1 阅读全文
posted @ 2014-09-15 15:19 oyaimj 阅读(223) 评论(0) 推荐(0)
摘要:1,Install gcc apxs apache $yum install gcc httpd httpd-devel 2,create helloword module $cd helloworld 3,create mod_helloworld.so file $apxs -g -n helloword $apxs -c mod_helloworld.c $apxs -i... 阅读全文
posted @ 2014-08-29 18:29 oyaimj 阅读(383) 评论(0) 推荐(0)