一、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. jquery中选取兄弟节点的方法

    $('#id').siblings() 当前元素所有的兄弟节点$('#id').prev() 当前元素前一个兄弟节点$('#id').prevaAll() 当前元素之前所有的兄弟节点$('#id'). ...

  2. 优云软件又双叒通过CMMI ML3评估 , 研发和质量管理水平创新高

    2017年第三季度,SEI授权的主任评估师对优云软件研发中心进行了CMMI软件能力成熟度模型评估,优云软件顺利通过复评. 这是继2011年12月优云软件首次通过CMMI ML3级的评估认证以来,第二次 ...

  3. openssl编译参数选项

    执行Configure是常见参数选项如下: 安装参数: --openssldir=OPENSSLDIR 安装目录,默认是 /usr/local/ssl . --prefix=PREFIX 设置 lib ...

  4. 怎么使用JavaScript进行进制转换

    JS 是一个很神奇的语言,内制的的很多函数可以帮我们进行数(进)制转换: JS中可以直接使用16进制: var a = 0xff; //255 将任意进制字符串转换为十进制,如二进制,八进制,十六进制 ...

  5. kvo观察实例变量

    // 手动设定KVO - (void)setAge:(NSString *)age { [self willChangeValueForKey:@"age"]; _age = ag ...

  6. int(1)和int(11)是否有区别?

    MySQL类型关键字后面的括号内指定整数值的显示宽度(例如,INT(11)).该可选显示宽度规定用于显示宽度小于指定的列宽度的值时从左侧填满宽度.显示宽度并不限制可以在列内保存的值的范围,也不限制超过 ...

  7. magento开发手册之目录结构

    magento是一个很优秀的电商系统,很多朋友会用它部署自己的电商网站,少不了二次开发.下面我们随着ytkah来一起认识一下magento开发手册之目录结构吧. /app – 程序根目录 /app/e ...

  8. 20180925 SQL Server游标使用

    之前写了一个存储过程 目标: 根据时间,获取指定范围的数据集A, 再从数据集A 中,取出每行数据中的两个时间,卡另外一个B表里面的某列时间范围的值集.得到均值进行配置值比对. 这里有个问题,就是取得B ...

  9. idea structure窗口

    https://blog.csdn.net/qq_19934363/article/details/87994000

  10. 运维自动化ansible基础

    云计算三种服务架构 IAAS: 不提供OS  只购买硬件(网络,存储,计算) PAAS: 提供硬件和OS和开发和运行环境  只需要开发应用软件 SAAS: 提供 硬件 os 软件   相当于直接购买软 ...