Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

OpenStack Train version dual-node installation (14) create and configure centos7 instance

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Part 14: creating and configuring centos7 instances

This section describes how to create an instance using an official centos7 image.

Download the official centos7 image

The download address of the image is http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1907.qcow2

Download the above image under windows using download tools such as Xunlei, and upload it to the root directory of the control node

Upload the image to glance

. Admin-openrc

Openstack image create-file CentOS-7-x86_64-GenericCloud-1907.qcow2-disk-format qcow2-container-format bare-public CentOS7

Openstack image list

Create an instance type

Openstack flavor create-- id 1-- vcpus 2-- ram 2048-- disk 10 m2.nano

Openstack flavor list

Create an instance using a CentOS7 image

. Ygj-openrc

Openstack server create-flavor m2.nano-image CentOS7-nic net-id=3903994e-3f22-4677-8c3a-5ea4edd90afb-security-group default-key-name ygjkey centos7-instance1

Configuration of instance

After ping is connected, the control node logs in to the instance using ssh centos@10.8.20.56, because the generated key pair containing the public key is injected into the instance when the instance is created, and the private key is stored in the / root/.ssh/ directory of the control node, so you can log in directly with the SSH key in the control node instead of using the password.

Modify the root password of the instance

Sudo passwd

Modify the ssh configuration file to allow remote login with a password

Sudo vi / etc/ssh/sshd_config

Uncomment the line # PermitRootLogin yes

Change the line PasswordAuthentication from no to yes

Restart sshd after modification

Sudo systemctl restart sshd

Reopen a terminal and log in to the instance using the root user

Test the network connection of the instance

The full text is completed in section 14.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report