1、安装依赖包
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum -y install python-pip
yum -y install python-virtualenv python-devel libvirt-devel glibc gcc nginx supervisor python-lxml git python-libguestfs

2、下载webvirtcloud并初始化webvirtcloud
git clone https://github.com/retspen/webvirtcloud
mv webvirtcloud /opt
cd /opt/webvirtcloud && cp webvirtcloud/settings.py.template webvirtcloud/settings.py
pip install -r conf/requirements.txt
cp conf/nginx/webvirtcloud.conf /etc/nginx/conf.d/
sed -i "s#SECRET_KEY = ''#SECRET_KEY = 'abcd12345'#g" /opt/webvirtcloud/webvirtcloud/settings.py
python manage.py migrate

3、编辑一个webvirtcloud.ini的新文件并粘贴以下内容到文件中
vim /etc/supervisord.d/webvirtcloud.ini

[program:webvirtcloud]
command=/usr/bin/gunicorn webvirtcloud.wsgi:application -c /opt/webvirtcloud/gunicorn.conf.py
directory=/opt/webvirtcloud
user=nginx
autostart=true
autorestart=true
redirect_stderr=true [program:novncd]
command=/usr/bin/python /opt/webvirtcloud/console/novncd
directory=/opt/webvirtcloud
user=nginx
autostart=true
autorestart=true
redirect_stderr=true

4、更改webwirtcloud文件夹的权限为nginx
chown -R nginx:nginx /opt/webvirtcloud
systemctl start nginx && systemctl start supervisord

5、在所有KVM主机上新增webvirtcloud账户用于webvirtcloud连接虚拟化服务
useradd webvirtcloud
echo "123456" | passwd --stdin webvirtcloud
usermod -G kvm -a webvirtcloud

6、安装虚拟化服务
wget -O - https://clck.ru/9V9fH | sudo sh

7、配置ssh免钥登陆kvm主机
su - nginx -s /bin/bash
ssh-keygen    #生成id_rsa.pub文件,直接回车即可
touch ~/.ssh/config && echo -e "StrictHostKeyChecking=no\nUserKnownHostsFile=/dev/null" >>~/.ssh/config
chmod 0600 ~/.ssh/config
ssh-copy-id webvirtcloud@127.0.0.1   #拷贝id_rsa.pub文件到远端kvm主机

8、在所有kvm主机上新增以下文件
vim /etc/polkit-1/localauthority/50-local.d/50-org.libvirtd-group-access.pkla

[libvirtd group Management Access]
Identity=unix-group:kvm
Action=org.libvirt.unix.manage
ResultAny=yes
ResultInactive=yes
ResultActive=yes

service libvirtd restart

9、访问http://ip,默认用户名:admin,密码:admin

10、创建虚拟后出现下图中的错误,解决办法:点击Users,编辑admin用户,最下面四个选项填入-1即可


参考链接:
           https://github.com/retspen/webvirtmgr/wiki/Setup-SSH-Authorization
           https://github.com/retspen/webvirtcloud
           https://github.com/luckman666         #一键部署k8s

WebvirtCloud安装(CentOS7)的更多相关文章

  1. Linux环境搭建-在虚拟机中安装Centos7.0

    最近在空闲时间学习Linux环境中各种服务的安装与配置,都属于入门级别的,这里把所有的学习过程记录下来,和大家一起分享. 我的电脑系统是win7,所以我需要在win7上安装一个虚拟机-VMware,然 ...

  2. 在virtualbox中安装CentOS-7

    当初才接触linux的时候,因为条件限制,只能在虚拟机中安装linux系统使用,由于是小白,爬了好多坑.于是决定写一篇关于在虚拟机中安装linux系统的博客.一是为了巩固自己的知识,二是希望能够对新手 ...

  3. 在虚拟机中安装CentOS7

    在虚拟机中安装CentOS7 听语音 | 浏览:17352 | 更新:2014-10-31 12:14 1 2 3 4 5 6 7 分步阅读 一键约师傅 百度师傅最快的到家服务,最优质的电脑清灰! 百 ...

  4. windows下vmware10.0 安装centos7

    centos7.0-1506, 1511, 是指2015年, 06月份, 11月份. 这是rhel ubuntu发布新版本的时间. centos7.0 只提供了64位的系统下载: x86_64: we ...

  5. VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装

    VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装在阿里云开源镜像地址下载镜像Index of /centos/7.2.1511/isos/x86_64/http://mirro ...

  6. U盘安装CentOS7的最终解决方案

    转载自http://www.augsky.com/599.html 终于将CentOS7装上笔记本了,过程无比艰辛,因为我发现网上大家提到的所有U盘安装CentOS7时碰到的问题几乎都被我碰到了,像什 ...

  7. 安装 centos7 注意事项

    最近一直没有写博客,把之前的折腾记录写下. 1 下载好镜像文件,刻录光盘. 2  用DVD安装CENTOS7 3 有些处理器不支持Cento7安装,需要重新编译内核文件.我不懂 . 我用的ACER  ...

  8. 最小化安装CentOS7 + xfce4 +PHP + nginx +mariadb 开发环境

    虚拟机自定义最小化安装,新增用户做为管理员,打开自动获取网络,桥接模式.所有的操作只有命令,不做解释,看不明白的可以自行搜索相关的资料. # 开头的行是注释行,# 开头的空行,我自己装机时做了快照.未 ...

  9. 安装centos7注意事项

    1,安装centos7注意1和l的区分 2,每一次对/boot/grub2/或者/boot/grub或者/etc/grub/下的文件修改一定要重新编译配置文件sudo grub2-mkconfig - ...

随机推荐

  1. leetcode网学习笔记(1)

    https://leetcode-cn.com/problems/reverse-linked-list/submissions/ 206 反转链表 错误原因:没有考虑到链表为空以及链表只有一个元素的 ...

  2. 放弃antd table,基于React手写一个虚拟滚动的表格

    缘起 标题有点夸张,并不是完全放弃antd-table,毕竟在react的生态圈里,对国人来说,比较好用的PC端组件库,也就antd了.即便经历了2018年圣诞彩蛋事件,antd的使用者也不仅不减,反 ...

  3. WebApi接口访问异常问题。尝试创建“testController”类型的控制器时出错。请确保控制器具有无参数公共构造函数

    本来运行的好好的webAPI 接口突然报了个 :“尝试创建“testController”类型的控制器时出错.请确保控制器具有无参数公共构造函数” 错误.耗了半宿最终解决了, 原因: api控制器中引 ...

  4. 【数据结构】算法 Maximum Subarray

    最大子数组:Maximum Subarray 参考来源:Maximum subarray problem Kadane算法扫描一次整个数列的所有数值,在每一个扫描点计算以该点数值为结束点的子数列的最大 ...

  5. mac系统如何处理来自身份不明的开发者

    打开终端(终端在 应用程序 -> 实用工具 内) sudo spctl --master-disable

  6. antd-design TextArea initialValue 不生效可能原因

    <Form.Item label="展会介绍"> {getFieldDecorator('introduce', { initialValue:record.intro ...

  7. vue的三种通信方式

    一 确定组件关系二 使用第一步确定的组件关系在下面找到使用方法 1 父子通信(子组件使用父组件数据渲染) a) 在 子组件 中添加props props: [自定义prop名字] b) 在子组件中把自 ...

  8. python 字典嵌套字典赋值异常

    针对dict中 嵌套dict 出现复制异常 lists={} test=['s1','s2','s3'] data = {'value': '',} for i in range(2): lists[ ...

  9. appium+python3+pycharm踩得坑

    错误: selenium.common.exceptions.WebDriverException: Message: A new session could not be created. (Ori ...

  10. 从头推导与实现 BP 网络

    从头推导与实现 BP 网络 回归模型 目标 学习 \(y = 2x\) 模型 单隐层.单节点的 BP 神经网络 策略 Mean Square Error 均方误差 \[ MSE = \frac{1}{ ...