一、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. 20165213&20165225结对学习感想及创意照

    20165213&20165225结对学习感想及创意照 会JAVA的大学生活好小组 团队感悟: 1+1>2还是1+1<2? 上述两个观点实际没有对错之分,取决点在于个人见解. 相信 ...

  2. 获取链接的参数,判断是否是微信打开,ajax获取数据

    //获取链接参数function GetQueryString(name) {    var reg = new RegExp("(^|&)" + name + " ...

  3. python编码类型互转总结

    1.只有在unicode下才能将utf-8与gbk互转2.unicode是在内存中使用,bytes是文件存储和网络传输时使用-------------------------------------- ...

  4. 【pyqtgraph绘图】如何使用pyqtgraph

    解读官方API-如何使用pyqtgraph 这里有一些使用pyqtgraph的建议方法: 从交互式shell(python -i,ipython等) 从应用程序显示弹出窗口 在PyQt应用程序中嵌入小 ...

  5. discuz config_global.php文件设置说明

    <?php $_config = array(); // ---------------------------- CONFIG DB ----------------------------- ...

  6. mysql-utilities1.6

    mysql-utilities1.6 mysql-utilities是一个用python编写的mysql工具集 mysql-utilities是Oracle专门开发的 一共有28个工具 /usr/bi ...

  7. GUI库之Tkinter组件(二)

    一.Lable组件 Lable组件是用于在界面上输出描述的标签: 1.举个例子. # Lable组件 from tkinter import * root = Tk() root.title(&quo ...

  8. HP1020打印机“传递给系统调用的数据区域太小” 如何处理?

    如果电脑上曾经安装过 HP LaserJet 激光打印机的驱动程序,重新安装驱动程序之前,需要完全卸载以前安装的驱动程序,否则可能会出现无法找到设备或者安装不上驱动程序的现象. 安装网站下载的即插即用 ...

  9. echarts给数据视图添加表格样式

    1,准备好样式 <style>.myTable {margin: 0 auto;/* height: 300px; */width: 700px;} .myTitle {backgroun ...

  10. vue中常用的两中页面刷新的方式和页面回退

    这个方法的参数是一个整数,意思是在 history 记录中向前或者后退多少步,类似 window.history.go(n) router.push(location) 想要导航到不同的 URL,则使 ...