一、webvirtmgr安装前说明:

  1:操作做系统:centos7.2_x86_64

  2:安装参考出处1:https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr

  3:安装参考出处2:https://blog.csdn.net/xiegh2014/article/details/53053420

  3:webvirtmgr源码包下载链接:git clone git://github.com/retspen/webvirtmgr.git  https://github.com/retspen/webvirtmgr

二、防火墙设置

、sed -i  "s/^SELINUX=enforcing/SELINUX=disabled/g"  /etc/selinux/config

、systemctl disable firewalld.service

三、安装

一、环境包
、yum install epel-release -y //yum包
、yum -y install git python-pip libvirt-python libxml2-python python-websockify supervisor nginx
、yum -y install gcc python-devel
、pip install numpy
、yum install qemu-kvm qemu-img libvirt virt-install libvirt-python virt-manager python-virtinst libvirt-client virt-viewer -y //kvm相关包
二、webvirtmgr、sqlite 安装
、指定安装位置
mkdir /application/
、sqlite安装
cd /application/
wget http://www.sqlite.org/sqlite-3.5.6.tar.gz
cd sqlite-3.5./
./configure --disable-tcl
make
make install
、webvirtmgr安装
cd /application/
git clone git://github.com/retspen/webvirtmgr.git
tar -xvf webvirtmgr.tar.gz
cd webvirtmgr
pip install -r requirements.txt
./manage.py syncdb                        
./manage.py collectstatic                                //生成配置文件
./manage.py createsuperuser                               //添加管理员账号
、拷贝 djabgo 服务到指定路径
mkdir -pv /var/www                      
cp -Rv /application/webvirtmgr /var/www/webvirtmgr
5、设置SSH  
  ssh-keygen
  ssh-copy-id server@ip
  ssh server@ip -L localhost:8000:localhost:8000 -L localhost:6080:localhost:6080
6、设置ngix服务下webvirtngr管理
vim /etc/nginx/conf.d/webvirtmgr.conf 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 $scheme;
proxy_connect_timeout ;
proxy_read_timeout ;
proxy_send_timeout ;
client_max_body_size 1024M; # Set higher depending on your needs
}
} 7、修改权限及修改supervisord 配置文件
chown -R nginx:nginx /var/www/webvirtmgr vim /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 8、检测ngix配置中代理服务是否设置正确
grep '^bind =' /var/www/webvirtmgr/conf/gunicorn.conf.py 正确显示:bind = '127.0.0.1:8000'
9、启动相关服务
systemctl restart nginx.service
#Job for nginx.service failed because the control process exited with error code. See " 错误提示
修改:vim /etc/nginx/nginx.conf 注释掉39行 # listen default_server; systemctl restart nginx.service
systemctl start supervisord.service 10、后台运行
nohup /usr/bin/python2 /var/www/webvirtmgr/manage.py run_gunicorn -c /var/www/webvirtmgr/conf/gunicorn.conf.py & 、KVM被管理端配置
vim /etc/sysconfig/libvirtd
LLIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf
LIBVIRTD_ARGS="--listen" vi /etc/libvirt/libvirtd.conf
listen_tls =
listen_tcp =
tcp_port = ""
listen_addr = "0.0.0.0"
auth_tcp = "none"
启动服务: systemctl restart libvirtd.service
12:设置开机启动
  chkconfig supervisord on
  vim /etc/rc.local
    /usr/sbin/setsebool httpd_can_network_connect true
13、 启动进程
/etc/init.d/supervisord restart
15查看进程
netstat -lnpt 即可以看到6080和8000已经启动
 
16 web访问
http://192.168.0.194/login/

KVM_webvirtmgr的更多相关文章

随机推荐

  1. JavaScript学习笔记--语法二

    条件判断与C语言一样 两种循环.for 循环和 while 循环,JavaScript不区分整数和浮点数,统一用Number表示,所以不是 int i var x = 0; var i; for (i ...

  2. 机器Coding For WPF

    declare @modelcode varchar(90)='AutoProjectType'declare @ns varchar(90)='WpfApplication'declare @dat ...

  3. 20170915 linux系统管理培训

    进程管理 程序:通常为二进制程序放在存储媒介中(如光盘.硬盘.软盘.磁带等),以物理文件的形式存在: 进程:正在运行当中的程序,程序被触发后,执行者的权限与属性.程序的程序代码与所有数据等都会被加载到 ...

  4. Tomcat7目录结构详解

    1.bin:该目录下存放的是二进制可执行文件,如果是安装版,那么这个目录下会有两个exe文件:tomcat6.exe.tomcat6w.exe,前者是在控制台下启动Tomcat,后者是弹出UGI窗口启 ...

  5. Centos的yum源更换为国内的阿里云源

    1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2.下载新的CentOS-Base ...

  6. Python3学习之路~5.2 time & datetime模块

    time模块 时间相关的操作,时间有三种表示方式: 时间戳               1970年1月1日之后的秒,即:time.time() 格式化的字符串    2014-11-11 11:11, ...

  7. 003-读书笔记-企业IT架构转型之道-阿里巴巴中台战略思想与架构实战-分布式服务框架的选择

    3.1.淘宝平台“服务化”历程 大约2007年,淘宝500人团队,维护一个war包,200多个功能模块. 1)项目团队协同成本高,业务响应越来越慢 2)应用复杂度超出人的认知负载. 3)错误难于隔离[ ...

  8. 导出toolStrip1中的图标

    foreach (ToolStripItem c in toolStrip1.Items) { if (!(c is ToolStripButton)) continue; var btn = (To ...

  9. jquery-ui 之dialog

    1,引入css和js <script type="text/javascript" src="${ctx}/js/ytd/platform/zdjsDlbyqbh/ ...

  10. [py]python的time和datetime模块获取星期几

    import time import datetime #今天星期几 today=int(time.strftime("%w")) print today #某个日期星期几 any ...