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. windows----------windows10如何固定局域网ip

    1. 2. 3. 4. 5.

  2. Install Sudo for Debian

    $ su $ apt-get install sudo $ vim /etc/sudoers 1 2 3 在文本中添加: "username" ALL=(ALL) ALL 1 保存 ...

  3. 关于git的认证方式

    之前对github的使用,形成了两种观点.就是有两种url的模式,一种是http或https的,另一种是git专属的.然后git专属的url方式可以配置公钥认证,http(s)的则需要输入密码. 近期 ...

  4. supervisor配置详解(转)

    有阵子没写博客了,这段时间一直在研究python django框架和前端相关的东西.楼主学通信的,对web这一块啥也不懂,学了一个礼拜django,接着学了2个礼拜前端,感觉还是做不出来一个好看的页面 ...

  5. Dungeon Master (广搜)

    问题描述: You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed ...

  6. Log4j2 HelloWorld

    Log4j2 使用教程 Log4j2 的好处就不在这里一一列举了,如果你搜了2,说明你对它一定有兴趣,并且想了解它,使用它. 一.下载log4j2 ,基本上你只需要导入下面两个jar包即可: log4 ...

  7. iOS 小米推送总结和遇到的坑

    极光推送就不赘述了,这里说下小米推送在ios上的坑吧,查了好久也没有查到相关的文章. 极光的强大就不说了,当客户贪图实惠的时候,当人家给你让你用小米推送的时候,我的内心是崩溃的,小米推送???没听过! ...

  8. 微信小程序将网络图片转化为base64

    网络图片需用wx.downloadFile下载,然后调用微信自带的base64转化 可能会存在兼容, let image_to_base64 = function(img){ return new P ...

  9. redis 分页

    redis 分页 > rpush a (integer) > rpush a (integer) > rpush a (integer) > rpush a (integer) ...

  10. Python 计算当真因子个数为偶数个时为幸运数,计算区间内幸运数之和

    晚饭后朋友发来个问题,正好无事做,动手写了一下 若一个正整数有偶数个不同的真因子,则称该数为幸运数.如4含有2个真因子为 1 和 2 .故4是幸运数.求[2,100]之间的全部幸运数之和. 常规思路 ...