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 ...
随机推荐
- Puppeteer笔记(一):Puppeteer简介
一.Puppeteer简介 Puppeteer是NPM库,它提供了NodeJS高级API来控制Chrome.Puppeteer 默认以无头(无界面)方式运行,但也可以配置为运行有界面的Chrome. ...
- VMware如何克隆一个虚拟机
如何在Vmware克隆一个虚拟机,并修改哪些配置. 克隆虚拟机步骤 其中模板虚拟机的安装部署可参见:「VMware安装Linux CentOS 7.7系统」 找到克隆的模板机,并选择克隆. 进入克隆虚 ...
- LaunchScreen作为启动图设置,修改无效的解决方案
原有的推流APP用launchScreen做的启动图,现在要修改一张,发现修改无效. 当前测试的方法有 1,重启Xcode 卸载app 清楚xcode缓存 2,修改launchScreen.stor ...
- C语言经典笔试题目
1.bool,float,指针变量 与 “零值” 比较的if语句 注意点:c语言中bool类型采用整数存储,0为false,非0均为true; float类型采用IEEE754标准,第一位符号位,中间 ...
- python爬取页面内容
from selenium import webdriverimport xlwt driver = webdriver.Chrome(r'D:\chromedriver.exe')driver.ma ...
- 关于Tensorflow基于Windows安装那些事儿
声明:代码及博客小白一枚,如有错误,感谢指正~~ 众所周知,摘抄来温习一遍: Tensorflow 是一个采用数据流图(data flow graphs),用于数值计算的开源软件库.节点(Nodes) ...
- Docker 入门:Dockerfile
主要内容: 什么是 Dockerfile 查看 DockerHub 中镜像的 Dockerfile Dockerfile 编写 Dockerfile 常用命令 什么是 Dockerfile 使用 Do ...
- 读Pyqt4教程,带你入门Pyqt4 _007
QSlider 滑块是由一个简单的滑柄的窗口组件.该滑柄可以前后拖动,通过这种方式我们可以为特定任务选择值.有时候使用滑块比简单提供数值或使用微调框(spin box)更自然. QLabel 显示文字 ...
- Spring boot Sample 003之spring-boot-configuration-properties
一.环境 1.1.Idea 2020.1 1.2.JDK 1.8 二.目的 通过properties文件配置spring boot 属性文件 三.步骤 3.1.点击File -> New Pro ...
- Qcom平台RTC驱动分析
相关文件list: pm8998.dtsi ---RTC dts配置 qpnp-rtc.c ---qcom RTC驱动 class.c ---RTC相关class interface.c ---相关R ...