kvm部署

简介

KVM — 全称是基于内核的虚拟机(Kernel-based Virtual Machine)

  • KVM是一个开源软件,基于内核的虚拟化技术,实际是嵌入系统的一个虚拟化模块,通过优化内核来使用虚拟技术,该内核模块使得 Linux 变成了一个Hypervisor,虚拟机使用 Linux 自身的调度器进行管理。
  • KVM 是基于虚拟化扩展(Intel VT 或者 AMD-V)的 X86 硬件的开源的 Linux 原生的全虚拟化解决方案。KVM 中,虚拟机被实现为常规的 Linux 进程,由标准 Linux 调度程序进行调度;虚机的每个虚拟 CPU 被实现为一个常规的 Linux 进程。这使得 KMV 能够使用 Linux 内核的已有功能。但是,KVM 本身不执行任何硬件模拟,需要客户空间程序通过 /dev/kvm 接口设置一个客户机虚拟服务器的地址空间,向它提供模拟的 I/O,并将它的视频显示映射回宿主的显示屏。目前这个应用程序是 QEMU。
  • Guest:客户机系统,包括CPU(vCPU)、内存、驱动(Console、网卡、I/O 设备驱动等),被 KVM 置于一种受限制的 CPU 模式下运行。
  • KVM:运行在内核空间,提供CPU 和内存的虚级化,以及客户机的 I/O 拦截。Guest 的 I/O 被 KVM 拦截后,交给 QEMU 处理。
  • QEMU:修改过的为 KVM 虚机使用的 QEMU 代码,运行在用户空间,提供硬件 I/O 虚拟化,通过IOCTL /dev/kvm 设备和 KVM 交互。

KVM模块和管理工具
KVM有一个内核模块叫 kvm.ko,只用于管理虚拟 CPU 和内存。IO 的虚拟化,就交给 Linux 内核和qemu来实现。

Libvirt:是 KVM 的管理工具。Libvirt 除了能管理 KVM 这种 Hypervisor,还能管理 Xen,VirtualBox 等。OpenStack 底层也使用 Libvirt。

Libvirt 包含 3 个东西:后台 daemon 程序 libvirtd、API 库和命令行工具 virsh

  • libvirtd是服务程序,接收和处理 API 请求;
  • API 库使得其他人可以开发基于 Libvirt 的高级工具,比如 virt-manager,这是个图形化的 KVM 管理工具,后面我们也会介绍;
  • virsh 是我们运维工程师经常要用的 KVM 命令行工具。作为 KVM 和 OpenStack 的实施人员,virsh 和 virt-manager 是一定要会用的。

KVM安装

主机ip职责系统
kvm192.168.111.141kvmredhat8
kvm-web192.168.111.143nginx、kvm Webcentos7
//关闭防火墙和selinux
[root@localhost ~]# systemctl disable --now firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@localhost ~]# setenforce 0
[root@localhost ~]# sed -ri 's/^(SELINUX=).*/\1disabled/g' /etc/selinux/config
[root@localhost ~]# getenforce 
Permissive
[root@localhost ~]# reboot

[root@localhost ~]# getenforce 
Disabled

//配置网络源并下载相应的工具
dnf -y install epel-release vim wget net-tools unzip zip gcc gcc-c++

//验证cpu是否支持kvm,如果结果中有vmx或svm字样,就说明cpu是支持的
svm                 //svm的多少在于你给的cpu核数

//安装依赖包和kvm
[root@localhost ~]# yum -y install qemu-kvm qemu-kvm-common qemu-img virt-manager libvirt python3-libvirt libvirt-client virt-install virt-viewer bridge-utils libguestfs-tools

//配置桥接网卡 
因为虚拟机中网络,我们一般都是和公司的其他服务器是同一个网段,所以我们需要把
KVM服务器的网卡配置成桥接模式。这样的话KVM的虚拟机就可以通过该桥接网卡和公司内部
其他服务器处于同一网段

此处我的网卡是ens160,所以用br0来桥接ens160网卡

[root@localhost network-scripts]# cat ifcfg-br0 
TYPE=Bridge
BOOTPROTO=static
NAME=br0
DEVICE=br0
ONBOOT=yes
IPADDR=192.168.111.141
PREFIX=24
GATEWAY=192.168.200.2
DNS1=114.114.114.114
[root@localhost network-scripts]# cat ifcfg-ens160 
TYPE=Ethernet
BOOTPROTO=static
NAME=ens160
DEVICE=ens160
ONBOOT=yes
IPV6_PRIVACY=no
BRIDGE=br0

//重启网卡
[root@localhost ~]# systemctl restart NetworkManager
[root@localhost ~]# ifdown ens160;ifup ens160
Error: '/etc/sysconfig/network-scripts/ifcfg-ens160' is not an active connection.
Error: no active connection provided.
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/3)
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br0 state UP group default qlen 1000
    link/ether 00:0c:29:07:67:13 brd ff:ff:ff:ff:ff:ff
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:0c:29:07:67:13 brd ff:ff:ff:ff:ff:ff
    inet 192.168.111.141/24 brd 192.168.111.255 scope global noprefixroute br0
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe07:6713/64 scope link 
       valid_lft forever preferred_lft forever

//启动服务并验证安装结果
[root@localhost network-scripts]# lsmod|grep kvm
kvm_intel             315392  0
kvm                   847872  1 kvm_intel
irqbypass              16384  1 kvm
[root@localhost network-scripts]# virsh -c qemu:///system list
 Id   名称   状态
-------------------

[root@localhost network-scripts]# virsh --version
6.0.0
[root@localhost network-scripts]# virt-install --version
2.2.1
[root@localhost network-scripts]# ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-kvm
[root@localhost network-scripts]# ll /usr/bin/qemu-kvm
lrwxrwxrwx 1 root root 21 10月 20 23:05 /usr/bin/qemu-kvm -> /usr/libexec/qemu-kvm
[root@localhost network-scripts]# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.000000000000       no              
virbr0          8000.52540016ec1b       yes             virbr0-nic

kvm web管理界面部署

#安装epel源
[root@kvm-web ~]# yum -y install epel-release
#安装软件包
[root@kvm-web ~]# yum -y install git python-pip libvirt-python libxml2-python python-websockify supervisor nginx python-devel

#从github上下载webvirtmgr代码
[root@kvm-web ~]# cd /usr/local/src
[root@kvm-web src]# git clone git://github.com/retspen/webvirtmgr.git
正克隆到 'webvirtmgr'...
remote: Enumerating objects: 5614, done.
remote: Total 5614 (delta 0), reused 0 (delta 0), pack-reused 5614
接收对象中: 100% (5614/5614), 2.97 MiB | 225.00 KiB/s, 完成.
处理 delta 中: 100% (3606/3606), 完成.

#安装webvirtmgr
[root@kvm-web src]# cd webvirtmgr/
[root@kvm-web webvirtmgr]# pip install -r requirements.txt 
Collecting django==1.5.5 (from -r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/38/49/93511c5d3367b6b21fc2995a0e53399721afc15e4cd6eb57be879ae13ad4/Django-1.5.5.tar.gz (8.1MB)
    100% |████████████████████████████████| 8.1MB 91kB/s 
Collecting gunicorn==19.5.0 (from -r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/f9/4e/f4076a1a57fc1e75edc0828db365cfa9005f9f6b4a51b489ae39a91eb4be/gunicorn-19.5.0-py2.py3-none-any.whl (113kB)
    100% |████████████████████████████████| 122kB 1.5MB/s 
Collecting lockfile>=0.9 (from -r requirements.txt (line 5))
  Downloading https://files.pythonhosted.org/packages/c8/22/9460e311f340cb62d26a38c419b1381b8593b0bb6b5d1f056938b086d362/lockfile-0.12.2-py2.py3-none-any.whl
Installing collected packages: django, gunicorn, lockfile
  Running setup.py install for django ... done
Successfully installed django-1.5.5 gunicorn-19.5.0 lockfile-0.12.2
You are using pip version 8.1.2, however version 21.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


#初始化账号信息
[root@kvm-web 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@kvm-web 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): yes		//问你是否创建超级管理员帐号
Username (leave blank to use 'root'): admin		//指定超级管理员帐号用户名,默认留空为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@kvm-web webvirtmgr]# mkdir /var/www
[root@kvm-web webvirtmgr]# cp -r /usr/local/src/webvirtmgr/ /var/www/
[root@kvm-web webvirtmgr]# chown -R nginx.nginx /var/www/webvirtmgr

#生成密钥
[root@kvm-web ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
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:V73NQ4AADyxZb3tXVzfDnzOJCFWagswOxZ/m4X0d9gA root@kvm-web
The key's randomart image is:
+---[RSA 2048]----+
|      ==..o.oo.oo|
|     o+o=. .E...=|
|     ..+.=ooo.oo=|
|      o .=oo .+@o|
|       .S.+. .+oB|
|         +.... .o|
|            .    |
|                 |
|                 |
+----[SHA256]-----+
[root@kvm-web ~]# ssh-copy-id 192.168.111.141
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
The authenticity of host '192.168.111.141 (192.168.111.141)' can't be established.
ECDSA key fingerprint is SHA256:M55K1WE4IQkTBu6mvhszdufPrKh0hripkeHuF9Em52k.
ECDSA key fingerprint is MD5:11:9b:42:bc:29:ae:63:96:04:de:b7:35:97:d9:5a:7d.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@192.168.111.141's password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh '192.168.111.141'"
and check to make sure that only the key(s) you wanted were added.


#配置端口转发
[root@kvm-web ~]# ssh 192.168.111.141 -L localhost:8000:localhost:8000 -L localhost:6080:localhost:60
Last login: Wed Oct 20 20:01:05 2021 from 192.168.8.1



#配置nginx
[root@kvm-web ~]# vim /etc/nginx/nginx.conf
    server {
        listen       80;
        server_name  localhost;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        location / {
            root html;
            index index.html index.htm;
        }

        error_page 404 /404.html;
        location = /404.html {
        }

        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
        }
    }


[root@kvm-web ~]# vim /etc/nginx/conf.d/webvirtmgr.conf
server {
    listen 80 default_server;

    server_name $hostname;
    #access_log /var/log/nginx/webvirtmgr_access_log;

    location /static/ {
        root /var/www/webvirtmgr/webvirtmgr;
        expires max;
    }

    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
        proxy_set_header Host $host:$server_port;
        proxy_set_header X-Forwarded-Proto $remote_addr;
        proxy_connect_timeout 600;
        proxy_read_timeout 600;
        proxy_send_timeout 600;
        client_max_body_size 1024M;
    }
}

#确保绑定的端口为8000
[root@kvm-web ~]# vim /var/www/webvirtmgr/conf/gunicorn.conf.py 
bind = '0.0.0.0:8000'

#重启nginx
[root@kvm-web ~]# systemctl enable --now nginx
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /usr/lib/systemd/system/nginx.service.

#设置supervisor
[root@kvm-web ~]# vim /etc/supervisord.conf		//文件最后加上以下内容
[program:webvirtmgr]
command=/usr/bin/python2 /var/www/webvirtmgr/manage.py run_gunicorn -c /var/www/webvirtmgr/conf/gunicorn.conf.py
directory=/var/www/webvirtmgr
autostart=true
autorestart=true
logfile=/var/log/supervisor/webvirtmgr.log
log_stderr=true
user=nginx

[program:webvirtmgr-console]
command=/usr/bin/python2 /var/www/webvirtmgr/console/webvirtmgr-console
directory=/var/www/webvirtmgr
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/webvirtmgr-console.log
redirect_stderr=true
user=nginx

#设置开机自启supervisor
[root@kvm-web ~]# systemctl enable --now supervisord
Created symlink /etc/systemd/system/multi-user.target.wants/supervisord.service → /usr/lib/systemd/system/supervisord.service.
[root@kvm-web ~]# ss -antl
State       Recv-Q Send-Q              Local Address:Port                             Peer Address:Port              
LISTEN      0      100                             *:6080                                        *:*                  
LISTEN      0      128                             *:8000                                        *:*                  
LISTEN      0      128                             *:80                                          *:*                  
LISTEN      0      128                             *:22                                          *:*                  
LISTEN      0      100                     127.0.0.1:25                                          *:*                  
LISTEN      0      128                            :::22                                         :::*                  
LISTEN      0      100                           ::1:25                                         :::*   

#配置nginx用户
[root@kvm-web ~]# su - nginx -s /bin/bash
-bash-4.2$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/var/lib/nginx/.ssh/id_rsa): 
Created directory '/var/lib/nginx/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /var/lib/nginx/.ssh/id_rsa.
Your public key has been saved in /var/lib/nginx/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:hX/6QlHkMXiEyq0L2bk/A9nXoSuzRphoS8oORGom3+o nginx@kvm-web
The key's randomart image is:
+---[RSA 2048]----+
|           ==    |
|         .o.oo   |
|  .    ..o.o.    |
| o      ooo   .  |
|oo.    +SB...o . |
|+o .  * O +oo .  |
|  o..+ o *.. .   |
|   oo . o B..    |
| .E..    ooB.    |
+----[SHA256]-----+
-bash-4.2$ touch ~/.ssh/config && echo -e "StrictHostKeyChecking=no\nUserKnownHostsFile=/dev/null" >> ~/.ssh/config
-bash-4.2$ chmod 0600 ~/.ssh/config
-bash-4.2$ ssh-copy-id root@192.168.111.143
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/var/lib/nginx/.ssh/id_rsa.pub"
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Warning: Permanently added '192.168.111.143' (ECDSA) to the list of known hosts.
root@192.168.111.143's password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'root@192.168.111.143'"
and check to make sure that only the key(s) you wanted were added.

-bash-4.2$ exit
登出

[root@kvm-web ~]# vim /etc/polkit-1/localauthority/50-local.d/50-libvirt-remote-access.pkla
[Remote libvirt SSH access]
Identity=unix-user:root
Action=org.libvirt.unix.manage
ResultAny=yes
ResultInactive=yes
ResultActive=yes


[root@kvm-web ~]# systemctl restart nginx

[root@KVM ~]# systemctl restart libvirtd


在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述


上传镜像然后刷新

在这里插入图片描述

在这里插入图片描述


在这里插入图片描述

在这里插入图片描述

在这里插入图片描述


在这里插入图片描述


在这里插入图片描述


在这里插入图片描述

在这里插入图片描述

在这里插入图片描述


在这里插入图片描述


在这里插入图片描述


在这里插入图片描述

在这里插入图片描述

原文地址:https://blog.csdn.net/bzdmz_/article/details/120875583

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


背景:我已经有一个ssh公钥和私钥了,绑定的是公司的码云但是绑定github是不允许的所以我需要在生成一个公钥和私钥第一步执行下面的命令, 至于如果生成ssh公钥点击这里ssh-keygen-trsa-C'your_email@example.com'-f~/.ssh/id_rsa_github然后一路回车 这里注意id_srs_g
在服务器程序的部署运维过程中,我们经常需要将文件从一个服务器拷贝到另一个服务器中。可以使用ftp,可以使用samba服务,这里我们介绍scp命令进行文件的拷贝和传输。scp是securecopy的缩写,scp是linux系统下基于ssh登陆进行安全的远程文件拷贝命令。scp是加
#!/bin/bash#创建一个以.sc结尾的文件,把要操作的主机按顺序填写进去,多个IP另起一行顶格填写例如:#192.168.0.1#192.168.0.2#确保当前操作脚本的主机,已经可以免密到被操作主机,如未完成请自行解决。do_command(){hosts=`sed-n'/^[^#]/p'*.sc`forhost
打开终端安装openssh-server软件包:sudoaptupdatesudoaptinstallopenssh-server安装完成后,SSH服务默认自动启动,你可以通过以下命令校验服务运行状态:sudosystemctlstatusssh如果防火墙开启,则需要让防火墙允许ssh通过sudoufwallowssh注意事项VMware虚拟
环境centos7.9,.NET5一、Jenkins搭建1)下载Jenkins的war包在\home目录建一个jenkins目录放jenkins的包#进入\home目录cd\home#创建jenkins目录mkdirjenkins在jenkins目录下载war包#进入jenkin目录cd\home\jenkins#下载jenkins的war包wgethttp://mirrors.jenkin
dropbear下载地址:https://matt.ucc.asn.au/dropbeareleases/dropbear-2020.81.tar.bz2软件版本号说明opensuse 15.3 ssh8 dropbear2020.81     安装编译器和依赖:zypperinstallzlib-develgcc配置安装目录:./configure--prefix=/
1.前言前面基本上已经都讲完了MHA的原理部分,这小结主要是动手实操一下MHA2.前提准备1.首先下载MHA软件包(1)#下载mha软件mha官网:https://code.google.com/archive/p/mysql-master-ha/github下载地址:https://github.com/yoshinorim/mha4mysql-manager
前期准备确定服务器可以上网apt源配置完毕安装ssh使用apt安装openssh服务。sudoapt-getinstallopenssh-server启动sshroot@cka01:~#sudo/etc/init.d/sshstart#确定22端口存在并存活root@cka01:~#ss-tnl|grep22LISTEN01280.0.0
1.首先你需要在github上或者gitlab上建立了自己的账户,项目组已经将你加入了group。2.打开gitbash,输入命令ls-al~/.ssh如果显示如下图:则表示生成过key,可以去执行第4个步骤。否则的话执行第三个步骤生成key  3.这个时候输入命令ssh-keygen-trsa-C"min~~~~"  这
简述Linux如何远程拷贝,限速和断点续传scp命令 –远程拷贝文件scp拷贝本地文件filename到远程机器192.168.188.188服务器的/datamp目录下scp-P61204-l40000filenameusername@192.168.188.188:/datamp/ -PportSpecifiestheporttoconnecttoontherem
最近两天发现push代码到GitHub上时,发现必须得用SSH或者Token的方式。直接上干货1.SSH方式 1.1在桌面上GitBashHere 1.2检查是否已存在SSH   如果已存在,则直接进入.ssh目录1.3不存在,则创建一个SSHkey(如果不需要设置输入密码,一直回车就好)$ssh-keygen
安装命令yuminstallopenssh-clientsLinuxscp命令用于Linux之间复制文件和目录。scp是securecopy的缩写,scp是linux系统下基于ssh登陆进行安全的远程文件拷贝命令。scp是加密的,rcp 是不加密的,scp是rcp的加强版。语法scp[-1246BCpqrv][-ccipher][-F
1.环境介绍1.本地为windows2.远程为linux2.本地安装ssh环境我这里下载了git,所以在环境变量里把/git/usr/bin加进去就可以了3.本地vscode安装远程开发插件Remote-development是一个集成插件,安装它就可以了4.生成ssh秘钥对,并将公钥放入远程机#本地机生成秘钥对$s
文章链接故障表现在使用jumperver登录AWSec2实例的时候发现ssh配合秘钥登录的时候无法登录,具体报错如下:ssh-i/path/xx.pemuser@10.0.11.190Permissiondenied(publickey,gssapi-keyex,gssapi-with-mic).问题排查过程在发现无法登录的第一时间等了AWS平台查
1.给root用户设置密码sudopasswdroot2.修改sshd配置文件sudonano/etc/ssh/sshd_config修改PermitRootLoginyes把PermitRootLoginwithout-password或者PermitRootLoginprohibit-password改为PermitRootLoginyes,注意PermitRootLoginwithout-password可能被注
手上有一台12.4的ios机器,通过SecureCrt可以ssh上去,但是每次连接的时候都会报“KeyboardInteractive”错误,skip即可,但是通过ssh客户端连接,却无法正常连接,错误提示如下:@127.0.0.1:Permissiondenied(publickey,password,keyboard-interactive) 开始以为是KeyboardInteract
1、创建私有CA并进行证书申请。1.创建CA所需要文件#生成证书索引数据库文件touch/etc/pki/CA/index.txt#指定第一个颁发证书的序列号echo01>/etc/pki/CA/serial2、生成CA私钥cd/etc/pki/CA/(umask066;opensslgenrsa-outprivate/cakey.pem2048)3、生成CA自签名证书op
克隆两台虚拟机加master三台组成一个集群 所克隆的虚拟机需要修改主机名,ip 永久修改主机名 hostnamectlset-hostnamenode1或node2 ip 方式1: 通过可视化界面直接修改 方式2: vim/etc/sysconfigetwork-scripts/ifcfg-ens33 然后重启网络:servicenetworkrestart
SSH配置文件中加密算法没有指定,默认支持所有加密算法,包括arcfour,arcfour128,arcfour256等弱加密算法。但是目前RC4是不安全算法若数据库安全性要求比较高,这个漏洞还是必须要修复的,下面记录下OracleRAC修复过程,此修复过程不影响现有系统。如有不当欢迎斧正。1、root权限用户才能
问题:通过XShell等客户端使用ssh方式通过root用户连接Ubuntu虚拟机时,出现SSH服务器拒绝了密码,请再试一次。解决:安装ssh,开启root用户登录权限。1安装ssh-serverroot@ubuntu:/etc/apt#apt-getinstallopenssh-server安装ssh-server2安装ssh-clientroot@ubuntu:/etc/apt#ap