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. appium 环境搭建2

    以windows-x64为例安装的软件有JDK  AndriodSDK   Node.js   Appium(界面化的可以不装)   python  Appium_Python_Client.安装的顺 ...

  2. PHPexcel(2)

    //导出 public function export(){ $xlsData = Db('ent_apply')->select(); Vendor('PHPExcel.PHPExcel'); ...

  3. linux 下的OpenGL的安装配置

    https://blog.csdn.net/qq_38228254/article/details/78521155 本人亲测有效

  4. 对于Java Bean的类型转换问题()使用 org.apache.commons.beanutils.ConvertUtils)

    在进行与数据库的交互过程中,由数据库查询到的数据放在 map 中,由 map 到 JavaBean 的过程中可以使用 BeanUtils.populate(map,bean)来进行转换 这里要处理的问 ...

  5. mysql 用行号rownum更新顺序号字段

    UPDATE customer SET OrderNo = ( SELECT afterOrder.rowNum FROM ( SELECT @row_number := CASE WHEN @cus ...

  6. An owner of this repository has limited the ability to open a pull request to users that are collaborators on this repository.

    git 无法发起:pull request,提示:An owner of this repository has limited the ability to open a pull request ...

  7. vue配置手机通过IP访问电脑开发环境

    vue配置手机通过IP访问电脑开发环境config/index.js// Various Dev Server settings host: '0.0.0.0', // can be overwrit ...

  8. mysql查看所有触发器以及存储过程等操作集合

    今天在做每个月定时扣费的功能 用到了Mysql的Event Scheduler 昨完之后发现一个问题 Event Scheduler 默认是不开启的 要在mysql内执行SET GLOBAL even ...

  9. rabbitMq交换机direct、topics

    一: direct 上面我用采用了广播的模式进行消息的发送,现在我们采用路由的方式对不同的消息进行过滤 发送端代码 public class RoutingSendDirect { private s ...

  10. MMIO和PIO

    1.概念 内存映射I/O(MMIO)[统一编址]和端口映射I/O(PMIO)[独立/单独编址]是两种互为补充的I/O方法,用于设备驱动程序和设备通信,即在CPU和外部设备之间. (1)在MMIO中,内 ...