KVM Web管理平台 WebVirtMgr
WebVirtMgr介绍
WebVirtMgr 管理工具安装
一、安装前的部署
yum -y install git python-pip libvirt-python libxml2-python python-websockify supervisor nginx gcc python-devel wget vim net-tools lrzsz
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip -V #查看pip版本
pip install numpy
git clone git://github.com/retspen/webvirtmgr.git
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install nginx -y
cat /etc/supervisord.conf
pip install supervisor
mkdir /etc/supervisord.d/
echo_supervisord_conf > /etc/supervisord.conf
vi /etc/supervisord.d/app.conf
[program:appname]
command=/root/soft/push.api
directory=/root/soft/push.api
autostart=true
autorestart=true
user=root
stdout_logfile = /var/log/supervisor/pushapi.log
stderr_logfile = /var/log/supervisor/pushapi-error.log
vi /etc/supervisord.conf
[include]
files = /etc/supervisord.d/*.ini
supervisord -c /etc/supervisord.conf
/usr/bin/supervisorctl start all
/usr/bin/supervisorctl stop all
二、安装环境
cd webvirtmgr
pip install -r requirements.txt
./manage.py syncdb
You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): yes
Username (leave blank to use 'root'): admin
Email address: 275301281@qq.com
Password: admin
Password (again):admin
Superuser created successfully.
Installing custom SQL ...
Installing indexes ...
Installed 6 object(s) from 1 fixture(s)
./manage.py collectstatic
./manage.py createsuperuser
WARNING:root:No local_settings file found.
Username (leave blank to use 'root'): yes
Email address: 275301281@qq.com
Password: Lenovo@123
Password (again): Lenovo@123
Superuser created successfully.
cd ..
mv webvirtmgr /var/www/
vi /etc/nginx/conf.d/webvirtmgr.conf
server {
listen 80 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 $scheme;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
client_max_body_size 1024M; # Set higher depending on your needs
}
}
/etc/init.d/nginx start
systemctl restart nginx
systemctl enable supervisord
chown nginx.nginx /var/www/webvirtmgr
vi /etc/supervisord.conf
[program:webvirtmgr]
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]
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
systemctl restart supervisord.service
systemctl enable supervisord.service
systemctl status supervisord.service
cd /var/www/webvirtmgr
git pull
./manage.py collectstatic
systemctl restart supervisord
./manage.py runserver 0:8000
#或者后台运行脚本
nohup python /var/www/webvirtmgr/manage.py runserver 0:8000 >/dev/null &
nohup python /var/www/console/webvirtmgr-console >/dev/null &
saslpasswd2 -a libvirt lenovo
Password: xuewenlong
Again (for verification): xuewenlong
sasldblistusers2 -f /etc/libvirt/passwd.db
lenovo@webvirtmgr.net: userPassword
ssh-keygen -t rsa //产生公私钥
ssh-keygen -t rsa
ssh-copy-id 192.168.1.165
sudo saslpasswd2 -a libvirt -d lenovo
virsh -c qemu+tcp://IP_address/system nodeinfo
(virsh -c qemu+tcp://192.168.1.50/system nodeinfo)
Please enter your authentication name: lenovo
Please enter your password: xxxxxx
CPU model: x86_64
CPU(s): 2
CPU frequency: 2611 MHz
CPU socket(s): 1
Core(s) per socket: 2
Thread(s) per core: 1
NUMA cell(s): 1
Memory size: 2019260 kB
yum install -y novnc
cd /var/www/console/
./webvirtmgr-console &
nohup python /var/www/webvirtmgr/manage.py runserver 0:8000 >/dev/null &
nohup python /var/www/console/webvirtmgr-console >/dev/null &
KVM Web管理平台 WebVirtMgr的更多相关文章
- kvm虚拟化管理平台WebVirtMgr部署-完整记录(1)
公司机房有一台2U的服务器(64G内存,32核),由于近期新增业务比较多,测试机也要新增,服务器资源十分有限.所以打算在这台2U服务器上部署kvm虚拟化,虚出多台VM出来,以应对新的测试需求.当KVM ...
- KVM虚拟化管理平台WebVirtMgr部署及使用
KVM虚拟化管理平台WebVirtMgr部署及使用 需求: 公司机房有一台2U的服务器(64G内存,32核),由于近期新增业务比较多,测试机也要新增,服务器资源十分有限.所以打算在这台2U服务器上 ...
- kvm虚拟化管理平台WebVirtMgr部署-完整记录(3)
继下面三篇文章完成了kvm虚拟化管理平台webvirtmgr环境的部署安装:kvm虚拟化管理平台WebVirtMgr部署-虚拟化环境安装-完整记录(0)kvm虚拟化管理平台WebVirtMgr部署-完 ...
- kvm虚拟化管理平台WebVirtMgr部署-完整记录(2)
继上一篇kvm虚拟化管理平台WebVirtMgr部署-完整记录(1),接下来说说WebVirtMgr的日常配置:添加宿主机,创建虚机,磁盘扩容,快照等具体操作记录如下: 一.配置宿主机1.登录WebV ...
- KVM web管理工具——WebVirtMgr(一)
WebVirtMgr 介绍 WebVirtMgr采用几乎纯Python开发,其前端是基于Python的Django,后端是基于Libvirt的Python接口,将日常kvm的管理操作变的更加的 ...
- 快速搭建 kvm web 管理工具 WebVirtMgr
作者:SRE运维博客 博客地址: https://www.cnsre.cn/ 文章地址:https://www.cnsre.cn/posts/211117937177/ 相关话题:https://ww ...
- centos7.2 kvm虚拟化管理平台WebVirtMgr部署
在服务器上部署kvm虚拟化,虚出多台VM出来,以应对新的测试需求.当KVM宿主机越来越多,需要对宿主机的状态进行调控,决定采用WebVirtMgr作为kvm虚拟化的web管理工具,图形化的WEB,让人 ...
- KVM WEB管理工具——WebVirtMgr(二)日常配置
配置宿主机 1.登录WebVirtMgr管理平台 2.添加宿主机 选择首页的WebVirtMgr -->Addd Connection 选择“SSH链接“,设置Label,IP,用户 注意:La ...
- KVM WEB管理工具webvirtmgr安装和使用
生产环境的KVM宿主机越来越多,需要对宿主机的状态进行调控.这里用webvirtmgr进行管理.图形化的WEB,让人能更方便的查看kvm 宿主机的情况和操作 1 安装支持的软件源 yum -y ins ...
随机推荐
- java 四舍五入 保留n为数
double x1 = 0.026;String format = String.format("%.2f", x1);System.out.println(format); St ...
- Java POI 读取Excel数据转换为XML格式
1.首先要下载poi相关的包:http://poi.apache.org/ ,以下是所需的jar包 2.贴上详细的代码 public class ExcelToXml { /** * 将excel的 ...
- AJAX三
三.ajax 4.代参数的get方法 ①服务器 ②ajax代码 xhr.open("get",url,true) url="/demo/get_login?uname=& ...
- POJ1984
题目链接:https://vjudge.net/problem/POJ-1984 解题思路:并查集+离线操作. 用dx[ ]和dy[ ]两个数组存储某点相对于该点所在集合的源头的方位,因此不难推知dx ...
- 包装类的使用与Junit单元测试类
包装类: 针对八种基本数据类型定义相应的引用类型,使之有了类的特点,就可以调用类的方法 基本数据类型 包装类 boolean Boolean byte Byte short Short int Int ...
- VUE源码解析心得
解读vue源码比较好奇的几个点: VUE MVVM 原理 http://www.cnblogs.com/guwei4037/p/5591183.html https://cn.vuejs.org/v2 ...
- Java多线程通关——基础知识挑战
等掌握了基础知识之后,才有资格说基础知识没用这样的话.否则就老老实实的开始吧. 对象的监视器 每一个Java对象都有一个监视器.并且规定,每个对象的监视器每次只能被一个线程拥有,只有拥有它的线 ...
- 50个SQL语句(MySQL版) 问题六
--------------------------表结构-------------------------- student(StuId,StuName,StuAge,StuSex) 学生表 tea ...
- Rocket - debug - Example: Accessing Registers Using Abstract Command
https://mp.weixin.qq.com/s/RdJzE06mMkh2x__vVj_fEA 介绍riscv debug接口的使用实例:使用抽象命令读取寄存器. 1. Read s0 using ...
- Chisel3 - Scala语言专家
https://mp.weixin.qq.com/s/j8mt_qvwliKIKtlN6JcyqQ 介绍Intellij IDEA安装Scala插件后,如何在阅读和编码两方面助益开发者. ...