系统环境:
[root@kvm-admin ~]# cat /etc/redhat-release
CentOS Linux release7.3.1611(Core)
关闭防火墙、selinux
[root@kvm-admin ~]# systemctl stop firewalld.service
[root@kvm-admin ~]# setenforce 0
一、安装部署WebVirtMgr
需要有repo源,centos7默认没有wget:yum install wget
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
1、安装依赖包
[root@localhost ~]# yum -y install git python-pip libvirt-python libxml2-python python-websockify supervisor nginx[root@localhost ~]# yum -y install gcc python-devel
[root@localhost ~]# pip install numpy
Collecting numpy
Downloading https://files.pythonhosted.org/packages/6a/a9/c01a2d5f7b045f508c8cefef3b079fe8c413d05498ca0ae877cffa230564/numpy-1.14.5-cp27-cp27mu-manylinux1_x86_64.whl (12.1MB)
100% |████████████████████████████████| 12.1MB 26kB/s
Installing collected packages: numpy
Successfully installed numpy-1.14.5
You are using pip version 8.1.2, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
2、安装python需求并设置Django环境
[root@localhost ~]# cd /server/tools/[root@localhost tools]# git clone git://github.com/retspen/webvirtmgr.git
Cloning into 'webvirtmgr'...
remote: Counting objects:5730, done.
remote: Compressing objects:100% (6/6), done.
remote: Total5730 (delta 1), reused 0 (delta 0), pack-reused 5724Receiving objects:100% (5730/5730), 3.01 MiB | 341.00 KiB/s, done.
Resolving deltas:100% (3686/3686), done.
[root@localhost tools]# cd webvirtmgr/[root@localhost webvirtmgr]# pipinstall -r requirements.txt
Collecting django==1.5.5 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/38/49/93511c5d3367b6