KVM_webvirtmgr
一、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的更多相关文章
随机推荐
- SQL Server的一些小问题
一.SQL Server远程调用失败 解决办法:在控制面板-程序和功能中卸载“Microsoft SQL Server 2012 Express LocalDB”,具体版本根据你安装的VS版本决定,我 ...
- Frps 家庭服务器访问解决方案
100.64.0.0/10运营商级(Carrier-grade)NAT保留IP地址 在一次跟踪路由的网络操作时发现自己路由器下一跳路由节点的IP地址比较奇怪,是100.64.0.1.好奇促使我查询 ...
- JavaScript学习笔记--语法
代码风格: 每句结尾不用加分号: 单行注释用//,多行注释用/*...需要注释掉的代码....*/ 严格区分大小写 优雅的代码需要注意锁进 基础知识: Number:JavaScript不区分整数和浮 ...
- win7远程ubuntu桌面以及Ubuntu14.04安装搜狗输入法 Ubuntu远程登录windows系统
windows远程登录ubuntu有命令行以及桌面两种方式. 1.命令行的方式我认为putty这款软件比较好,这之前需要在ubuntu电脑上安装上ssh,命令如下(安装与启动): sudo apt-g ...
- 【托业】【新托业TOEIC新题型真题】学习笔记10-题库七-P7
1.to request a review of information 要求审查资料 2.inform of 将…告知(某人); 3.flammable [ˈflæməbl]adj.易燃的,可燃的; ...
- chkconfig 管理系统服务
[root@localhost ~]# chkconfig --list # 列出开启或关闭了哪些系统服务 [root@localhost ~]# chkconfig xxx off # 关闭某个系统 ...
- Linux ethtool 命令
ethtool 是用于查询及设置网卡参数的命令,常见用法如下: 注意:该命令只是临时设置,如果网卡重启就失效了,如果想要永久保存应该配置 /etc/sysconfig/network-scripts/ ...
- 20171018 在小程序页面去获取用户的OpenID
1. 在小程序的.js 文件中增加代码 //加载页面时到后台服务去获取openID onLoad: function (options) { //OpenId wx.login({ //获取code ...
- mysql在linux上的安装
前提: 环境:workstation 11 + CentOS 7 + mysql-5.6.40 安装前先查看服务器里是否有老版本的mysql已经被安装了 rpm -qa|grep mysql 如果有就 ...
- Font Awesome 最简单应用例子
简介: Font Awesome为您提供可缩放的矢量图标,您可以使用CSS所提供的所有特性对它们进行更改,包括:大小.颜色.阴影或者其它任何支持的效果. 使用方法: 引入<link rel=&q ...