ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

kvm部署

2021-06-22 00:01:08  阅读:196  来源: 互联网

标签:wed01 Creating 部署 kvm python table root webvirtmgr


kvm

  • 打开虚拟机虚拟化功能,添加一块100g的磁盘。增加处理器数量

image-20210619175713993

image-20210619175818044

  • kvm虚拟机

  • web控制界面
## 安装相关软件
[root@wed01 src]# yum install -y epel-release  #先安装epel源,要不git等一些插件安不上 
[root@wed01 src]# yum -y install git python-pip libvirt-python libxml2-python python-websockify supervisor nginx python-devel 


## 克隆github上的代码
[root@wed01 ~]# cd /usr/local/src/
[root@wed01 ~]# git clone git://github.com/retspen/webvirtmgr.git

##安装webvirtmgr
[root@wed01 ~]# cd /usr/local/src/webvirtmgr/
[root@wed01 webvirtmgr]# pip install -r requirements.txt


##检查sqlite3是否安装
[root@wed01 webvirtmgr]# python
Python 2.7.5 (default, Nov 16 2020, 22:23:17) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3        #没有报错就是安装成功
>>> exit()



//初始化帐号信息
[root@wed01 webvirtmgr]# python manage.py syncdb
WARNING:root:No local_settings file found.
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_groups
Creating table auth_user_user_permissions
Creating table auth_user
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table servers_compute
Creating table instance_instance
Creating table create_flavor

You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no):  #是否想现在创建
Please enter either "yes" or "no": yes
Username (leave blank to use 'root'):        #输入用户名
Email address: 1@2.com						 #邮箱
Password: 									 #密码
Password (again): 							 #再次输入密码
Superuser created successfully.
Installing custom SQL ...
Installing indexes ...
Installed 6 object(s) from 1 fixture(s)


##拷贝web网页至指定目录
[root@wed01 webvirtmgr]# mkdir /var/www
[root@wed01 webvirtmgr]# cp -r /usr/local/src/webvirtmgr /var/www/
[root@wed01 webvirtmgr]# chown -R nginx.nginx /var/www/webvirtmgr/


##生成密钥
[root@wed01 webvirtmgr]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:vCIGiZx+7fXMF0fpZLveKUozpMh3gGM1tOJp5oH5Ods root@wed01
The key's randomart image is:
+---[RSA 2048]----+
|         .       |
|        . .      |
|       . +    .  |
|....  +.= .  =   |
|.oo  o XS. .= .  |
|.  .. B =.+. +   |
| . .o..O.o =o .  |
|  ......O o.oo. .|
|     . . E..o..o |
+----[SHA256]-----+
[root@wed01 webvirtmgr]# ssh-copy-id 10.0.0.5


  • 配置web界面

image-20210621102551358

image-20210621102603985

image-20210621102702828

image-20210621102725192

image-20210621102750283

image-20210621102836022

image-20210621102914314

  • 用xftp把centos 7 的镜像传过来(演示略)

标签:wed01,Creating,部署,kvm,python,table,root,webvirtmgr
来源: https://blog.csdn.net/huyinghao03/article/details/118097102

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有