摘要: ssh -o stricthostkeychecking=no root@192.168.1.10 阅读全文
posted @ 2017-09-21 10:27 yangrz 阅读(1065) 评论(0) 推荐(0) 编辑
摘要: <![if !supportLists]>1. <![endif]>硬盘扩容<!--more-->qcow2格式磁盘,直接通过qemu-img 直接扩展qcow2磁盘, 新添加一块qcow2 格式的磁盘加入到KVM虚拟机,然后通过虚拟机系统lvm逻辑卷管理方式进行管理,扩展磁盘空间。 添加一块qco 阅读全文
posted @ 2017-09-12 15:49 yangrz 阅读(386) 评论(0) 推荐(0) 编辑
摘要: KVM虚拟机的管理主要是通过virsh命令对虚拟机进行管理。 <!--more--> <![if !supportLists]>1. <![endif]>配置文件目录 虚拟机的配置文件放在/etc/libvirt/qemu/目录下,命名规则: 主机名.xml [root@localhost work 阅读全文
posted @ 2017-09-12 15:48 yangrz 阅读(380) 评论(0) 推荐(0) 编辑
摘要: virsh 无法重启或者关闭虚拟机 <!--more--> 1 命令行virsh reboot vm-name kvm目前仍不支持reboot命令,'reboot' is not supported by the hypervisor 2 虚拟机内部重启操作不成功,状态为关机,重启失败。 原因配置文 阅读全文
posted @ 2017-09-12 15:47 yangrz 阅读(3547) 评论(0) 推荐(0) 编辑
摘要: <![if !supportLists]>1. <![endif]>查看磁盘格式: <!--more--> [root@localhost kvm-host]# qemu-img info test01.qcow2 image: test01.qcow2 file format: qcow2 vir 阅读全文
posted @ 2017-09-12 15:45 yangrz 阅读(790) 评论(0) 推荐(0) 编辑
摘要: <![if !supportLists]>1. <![endif]>查看系统是否支持虚拟化 <!--more--> egrep '(vmx|svm)' /proc/cpuinfo flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge 阅读全文
posted @ 2017-09-12 15:43 yangrz 阅读(440) 评论(0) 推荐(0) 编辑
摘要: 有时使用pip安装东西,特别慢,我们可以将默认的pip源换成国内的源,如清华、豆瓣的pip源,相比国外源会快很多。 临时使用 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package 注意,simple 不能少, 是 h 阅读全文
posted @ 2017-09-08 13:57 yangrz 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 1. Ansible Inventory配置及详解 提示:本文所有示例使用Inventory文件基于以下内容: [java1] 172.16.12.168 [java2] 172.16.12.149 [tomcat] 172.16.12.149 172.16.12.168 Inventory是Ans 阅读全文
posted @ 2017-08-25 11:19 yangrz 阅读(543) 评论(0) 推荐(0) 编辑
摘要: git init #把这个目录变成Git可以管理的仓库 git add readme.txt # 把文件添加到git仓库 git commit -m 'wrote a readme file' # 告诉git把文件提交到仓库, -m 后面输入的是本次提交的说明 git status # 查看当前仓库 阅读全文
posted @ 2017-08-23 18:18 yangrz 阅读(355) 评论(1) 推荐(0) 编辑
摘要: 为了方便公司内部访问jira、wiki等内网应用服务,我们搭建了DNS服务,为全公司提供域名解析服务,重要性可想而知,因此,有了监控的需求,这里记录下使用zabbix来监控dns的过程。 监控DNS分为三部分 端口监控(53) 日志监控(/var/log/messages中出现named.*fatal) 解析域名监控(脚本定时dig www.baidu.com) 监控实施: 为了方便迁... 阅读全文
posted @ 2017-07-28 16:58 yangrz 阅读(5268) 评论(0) 推荐(0) 编辑