Linux basics,
In rescue mode, there are 7 OPTIONS 0-6 when centos6 is started; In centos7, check the startup options: ls-l/usr/lib/systemd/system/runlevel * target.
Set the bios for boot and select the optical drive to start;
In centos7, the rescue mode is Troubleshooting. Select this option and enter;
Select Rescue a Centos Linux system
Enter 1 to continue
Enter chroot/mnt/sysimage, enter passwd root to prompt you to change the root user password, enter a new password, and then enter the password again to change the root password. Turn off the power and uninstall the optical drive; clone a VM first shut down the system where the VM runs; manage-clone-next-create a link clone (save space) Wait for completion, close it; after starting the VM, edit the IP address, delete the UUID column, save and exit, restart the network service, and run vim/etc/systemconfig/network-script/if-restart systemctl restart network. servicehostname to view the host name; hostnamectl set-hostname liyang-01 to change the host name; launch and re-enter to view the host name; the host name configuration file in cat/etc/hostname to save the snapshot
Standard syntax for login between Linux Hosts: ssh username @ ipssh 192.168.164.13001 02 01
W View
Standard syntax ssh-p 22 root@192.168.164.129ssh-p specifies port; ssh-keygen tool automatically generates Public Key Private Key directly press enter (no password is set here) the public key and private key are stored in/root/by default /. ssh/directory
Cat/root/. ssh/id_rsa.pub view the public key, copy the public key to open host 01, vi/root/. ssh/authorized_keys, paste the remarks, save and exit;
Getenforce: Check the selinux status. Enforcing is enabled, permissive is disabled, and setenforce 0 is disabled;