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 ...
随机推荐
- react-grid-layout实现拖拽,网格布局
借鉴地址:https://www.jianshu.com/p/b48858eee3a7 安装 react-grid-layout npm install react-grid-layout impor ...
- 蒲公英 · JELLY技术周刊 Vol.07: EcmaScript 2020 -- 所有你想要知道的都在这
「蒲公英」期刊,每周更新,我们专注于挖掘「基础技术.工程化.跨端框架技术.图形编程.服务端开发.桌面开发.人工智能」等多个大方向的业界热点,并加以专业的解读:不仅如此,我们还精选凹凸技术文章,向大家呈 ...
- k8s安装部署成功
- C# 生成log文件
public void WriteLog(string strLog) { string sFilePath = AppDomain.CurrentDomain.BaseDirectory + &qu ...
- Json转化与ExtJS树(后台处理)
一.JSON对格式化数据的操作: 1.导入依赖包: import org.json.JSONArray; import org.json.JSONException; import org.json. ...
- OpenResty高性能web平台
openresty高性能web平台安装使用 简介:OpenResty® 是一个基于 Nginx 与 Lua 的高性能 Web 平台,其内部集成了大量精良的 Lua 库.第三方模块以及大多数的依赖项.用 ...
- vue-cli中的index.html ,main.js , App.vue的关系
###发现不少小伙伴才刚开始接触到这个结构都被绕的迷糊,而发现很多人说的也不是那么准确,那么下面我来说一下是怎么回事### 1.首先我们来看看原生Vue中组件的写法, 我们按照vue-cli的结构按照 ...
- Magicodes.IE 2.2发布
Magicodes.IE 导入导出通用库,支持Dto导入导出以及动态导出,支持Excel.Word.Pdf.Csv和Html.已加入NCC开源组织. Magicodes.IE 2.0发布 Magico ...
- python - 怎样使用 requests 模块发送http请求
最近在学python自动化,怎样用python发起一个http请求呢? 通过了解 request 模块可以帮助我们发起http请求 步骤: 1.首先import 下 request 模块 2.然后看请 ...
- node进程间通信
作为一名合格的程序猿/媛,对于进程.线程还是有必要了解一点的,本文将从下面几个方向进行梳理,尽量做到知其然并知其所以然: 进程和线程的概念和关系 进程演进 进程间通信 理解底层基础,助力上层应用 进程 ...