web管理kvm ,安装webvirtmgr
原创博文
安装配置KVM http://www.cnblogs.com/elvi/p/7718574.html
web管理kvm http://www.cnblogs.com/elvi/p/7718582.html
kvm系统安装 http://www.cnblogs.com/elvi/p/7718623.html
KVM克隆&快照 http://www.cnblogs.com/elvi/p/7718628.html
web管理kvm ,安装webvirtmgr
# web管理kvm ,安装webvirtmgr #安装基础组件
yum install epel-release
yum -y install git python-pip libvirt-python libxml2-python python-websockify supervisor nginx
#安装数据库
yum install sqlite python-sqlite*
#WebVirtMgr安装及初始化配置
cd /usr/local/src/
git clone git://github.com/retspen/webvirtmgr.git
zip -r webvirtmgr.zip webvirtmgr #备份
#将WebVirtMgr复制到系统默认的web服务目录:
mkdir -pv /var/www
cp -R /usr/local/src/webvirtmgr /var/www/
#cp -r webvirtmgr/ /var/www/ cd /var/www/webvirtmgr
pip install -r requirements.txt #安装Django
./manage.py syncdb #django进行环境配置
./manage.py collectstatic #生成配置文件
# ./manage.py createsuperuser #添加管理员账号 kvm@kvm2017
# ./manage.py changepassword kvm #修改用户kvm的密码
###############启动django
#参考http://itfish.net/article/58805.html
cd /var/www/webvirtmgr
./manage.py runserver 0.0.0.0:
#访问:http://x.x.x.x:8000 (用 ./manage.py createsuperuser创建的用户) # nginx代理配置文件
service httpd stop
vim /etc/nginx/conf.d/kvm.conf
# kvm web
server {
listen default_server;
server_name $hostname;
#access_log /var/log/nginx/webvirtmgr_access_log; location /static/ {
root /var/www/webvirtmgr/webvirtmgr; # or /srv instead of /var
expires max;
} location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $remote_addr;
proxy_connect_timeout ;
proxy_read_timeout ;
proxy_send_timeout ;
client_max_body_size 1024M; # Set higher depending on your needs
}
}
#
mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.bak
chkconfig nginx on
/etc/init.d/nginx restart
service nginx restart chown -R nginx:nginx /var/www/webvirtmgr ##############设置supervisor进程管理
cp /etc/supervisord.conf /etc/supervisord.conf.bak
vim /etc/supervisord.conf #在文件末尾添加如下
;#KVM
[program:webvirtmgr]
;#启动8000端口
command=/usr/bin/python /var/www/webvirtmgr/manage.py run_gunicorn -c /var/www/webvirtmgr/conf/gunicorn.conf.py
directory=/var/www/webvirtmgr
autostart=true
autorestart=true
logfile=/var/log/supervisor/webvirtmgr.log
log_stderr=true
user=nginx
[program:webvirtmgr-console]
;#启动6080端口(这是控制台vnc端口)
command=/usr/bin/python /var/www/webvirtmgr/console/webvirtmgr-console
directory=/var/www/webvirtmgr
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/webvirtmgr-console.log
redirect_stderr=true
user=nginx
;#KVM grep bind /var/www/webvirtmgr/conf/gunicorn.conf.py #确保下面bind绑定的是本机的8000端口
# bind = '127.0.0.1:8000' #远程无法访问
sed -i "/^bind/cbind = '0.0.0.0:8000'" /var/www/webvirtmgr/conf/gunicorn.conf.py |grep bind #supervisor以WEB方式监控管理进程
[inet_http_server]
;#port=127.0.0.1:9009修改为如下
port=*:
username=user
password= # vim /etc/rc.local
# /usr/sbin/setsebool httpd_can_network_connect true
chkconfig supervisord on #设置开机启动
/etc/init.d/supervisord restart #启动进程
#报错,重新安装supervisor
yum remove supervisor #卸载yum安装的
yum install supervisor -y
#pip install supervisor #安装
#pip uninstall supervisor #卸载pip安装的模块
service supervisord restart
lsof -i: #查看端口是否启动
service nginx restart
#########################################
#KVM被管理端配置
#设置tcp ip链接
curl http://retspen.github.io/libvirt-bootstrap.sh | sudo sh
sudo saslpasswd2 -a libvirt kvm #新建kvm用户kvm@kvm
sudo sasldblistusers2 -f /etc/libvirt/passwd.db #查看账号
kvm@kvm.test: userPassword
#sudo saslpasswd2 -a libvirt -d kvm #删除账号kvm
virsh -c qemu+tcp://127.0.0.1/system nodeinfo #输入账户@hostname+密码验证
#登录web,Add Connection,TCP链接,填写ip、用户、密码即可
###设置ssh链接太麻烦…… ########################################################
#centos7
#安装配置supervisord
systemctl restart supervisord
systemctl stop supervisord
systemctl enable supervisord.service #开机启动
web管理kvm ,安装webvirtmgr的更多相关文章
- SSH WebShell: SSH在线WEB管理器安装教程 - VPS管理百科
SSH WebShell: SSH在线WEB管理器安装教程 - VPS管理百科 SSH WebShell: SSH在线WEB管理器安装教程 本站原创 [基于 署名-非商业使用-相同方式分享 2.5 协 ...
- Disconf web管理端安装
1.环境配置配置java.maven环境,并安装mysql,reids,zookeeeper,Nginx2.下载disconf下载https://codeload.github.com/knightl ...
- CentOS7系列--5.1CentOS7中配置和管理KVM
CentOS7配置和管理KVM 安装与配置虚拟化软件KVM ( Kernel-based Virtual Machine ) + QEMU,它要求计算机的CPU支持Intel VT or AMD-V功 ...
- centos6.5环境openldap实战之ldap配置详解及web管理工具lam(ldap-account-manager)使用详解
ldap常用名称解释 1.环境搭建 操作系统:centos6.5 x86_64 关闭防火墙.selinux 开启时间同步 # crontab -e 加入 # time sync */5 * * * * ...
- KVM WEB管理工具webvirtmgr安装和使用
生产环境的KVM宿主机越来越多,需要对宿主机的状态进行调控.这里用webvirtmgr进行管理.图形化的WEB,让人能更方便的查看kvm 宿主机的情况和操作 1 安装支持的软件源 yum -y ins ...
- Linux下KVM的图形界面管理工具(WebVirtMgr)(Web版)
WebVirtMgr面板 截图 介绍 WebVirtMgr是一个基于libvirt的Web界面,用于管理虚拟机.它允许您创建和配置新域,并调整域的资源分配.VNC查看器为来宾域提供完整的图形控制台.K ...
- KVM web管理工具——WebVirtMgr(一)
WebVirtMgr 介绍 WebVirtMgr采用几乎纯Python开发,其前端是基于Python的Django,后端是基于Libvirt的Python接口,将日常kvm的管理操作变的更加的 ...
- KVM Web管理平台 WebVirtMgr
WebVirtMgr介绍 WebVirtMgr是一个KVM管理平台,让kvm管理变得更为可视化,对中小型kvm应用场景带来了更多方便.WebVirtMgr采用几乎纯Python开发,其前端是基于Pyt ...
- 快速搭建 kvm web 管理工具 WebVirtMgr
作者:SRE运维博客 博客地址: https://www.cnsre.cn/ 文章地址:https://www.cnsre.cn/posts/211117937177/ 相关话题:https://ww ...
随机推荐
- C#用到windows 消息列表Message类MSG的id代号
C# Constants:private const UInt32 WM_ACTIVATE = 0x0006;private const UInt32 WM_ACTIVATEAPP = 0x001C; ...
- AI翻译离无障碍交流有多远
AI翻译服务通过硬件.软件连接千千万万个应用场景,会打破语言不通的尴尬局面吗?会是人工翻译的终结者吗? 世界这么大,我想去看看!十一长假临近,梦想中的你背起行囊,自由行走在异国的大街小巷.然而现实的画 ...
- django开发中利用 缓存文件 进行页面缓存
首先我们先来了解下浏览器的缓存 浏览器缓存机制 Cache-control策略 Cache-Control与Expires的作用一致,都是指明当前资源的有效期,控制浏览器是否直接从浏览器缓存取数据还是 ...
- Lua与javascript的差异
Lua与javascript的差异 2010-03-08 Lua模拟器js方案 1.语法级模拟 lua与js语言差异 1.1注释 js 为//,lua为--. 1.2变量 js利用var来声明全局变量 ...
- 动态规划求一个序列的最长回文子序列(Longest Palindromic Substring )
1.问题描述 给定一个字符串(序列),求该序列的最长的回文子序列. 2.分析 需要理解的几个概念: ---回文 ---子序列 ---子串 http://www.cnblogs.com/LCCRNblo ...
- 349B - C. Mafia
C - Mafia Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit S ...
- 移动端click事件延迟300ms的原因以及解决办法[转载]
原文:http://www.bubuko.com/infodetail-822565.html 这要追溯至 2007 年初.苹果公司在发布首款 iPhone 前夕,遇到一个问题 —— 当时的网站都是为 ...
- 网页头部 lang的声明
1. 简体中文页面:html lang=zh-cmn-Hans2. 繁体中文页面:html lang=zh-cmn-Hant3. 英语页面:html lang=en 4. <回来>的音频, ...
- 从ELK到EFK演进
背景 作为中国最大的在线教育站点,目前沪江日志服务的用户包含网校,交易,金融,CCTalk 等多个部门的多个产品的日志搜索分析业务,每日产生的各类日志有好十几种,每天处理约10亿条(1TB)日志,热数 ...
- selenium_Alert
网页测试,最避免不了的就是弹出框,但是弹出框你真的分的清吗? Alert prompt comfirm 先来认识一下这三个弹窗 代码如下 <!DOCTYPE html> <html ...