KVM虚拟化管理平台webvirtmgr配置过程

一个微型的kvm管理平台 ,基于django开发,非常轻量级,功能简单明了。


测试环境:
centos 6.x  
webvirtmgr 最新版本
完全照搬官方文档,但补全了一些关键点。完全按官方文档是没有办法配置成功的。


1.安装依赖软件包


yum -y install epel-release
yum -y install git python-pip libvirt-python libxml2-python python-websockify supervisor nginx


2.下载webvirtmgr代码


git clone git://github.com/retspen/webvirtmgr.git
cd webvirtmgr
pip install -r requirements.txt 
./manage.py syncdb
会自动创建一个管理用户,根据提示一直next就可以了。


./manage.py collectstatic


3.相较官方文档做一个修改,这里不使用nginx直接用supervisord管理webvirtmgr进程


cd ..
mv webvirtmgr /var/www/  #随意指定,前后一致即可


chkconfig supervisord on
修改/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=root


[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=root


###下面是三个关键的地方


修改webvirtmgr配置文件,官方文档没有这一步,会报错。
vim /var/www/webvirtmgr/conf/gunicorn.conf.py
bind = '192.168.196.129:8000'   #ip替换成你自己的主机IP


复制local_settings文件
cd /var/www/webvirtmgr/webvirtmgr/local
cp local_settings.py.example local_settings.py


关闭selinux,已经关闭可忽略
setenforce 0  
永久关闭
vim /etc/selinux/config
SELINUX=disabled




启动supervisord
/etc/init.d/supervisord  start


4.浏览器访问192.168.196.129:8000,进行WEB界面的配置



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值