Third, the traditional IDC deployment site

A clone virtual machine
virtual machine to machine being used init0
find tools - Management - clone clone then been the next step after the completion of the boot modify IP address
vi / etc / sysconfig / network- scripts / ifcfg-ens33 network configuration changes are complete restart
systemctl restart network
then modify the hostname
hostnamectl SET-hostname yylinux02

Second, remote login

1, putty choose the right place to be copied can be copied directly
2, xshell default can not directly copy, you need to set the top menu bar click Tools Options options to find the bottom of a keyboard and mouse right button to select this option and then click OK to paste you can copy and paste of
3, xsell be opened directly in the connected state to another may be selected or arranged side by side are arranged vertically arranged
3 putty secret key authentication
secret key and authentication password is a kind of
secret key corresponding to the character string regarded as a lock and key 1 an encryption decryption can put their computer is in the private client can put the public key on the server that is at the service end
point to open puttygen and then click generate to generate a random string and then you can set a password may be empty, but in order to security chose to set a password and then select save public or private-public key can be copied directly save public key is the public key save private key is private key is
then created in the above directory server
mkdir /root/.ssh absolute path
mkdir command to create a directory
and then modify permission to modify permissions chmod command is
chmod 700 / root /.ssh
then write long command file vi /root/.ssh/authorized_keys not necessarily remember, you may think of using tab completion, but the tab is unable to completion, to remember what
SELinux
setenforce 0 Close SELinux
Ctrl d directly It can also exit the terminal exit
Keys set up after the need to set up click above putty ssh auth select the bottom there is the Browse option, where you find the secret key is then placed after setting up the need to select save or can not take effect in the login screen, then log on putty this time enter the user name prompted for a password enter the password you set up the private key password, do not enter the root password, but the password input keys can log
xshell secret key authentication
open xshell toolbar to find something new user keys, and putty the steps are basically the same
xshell public and private key can be opened with WordPad
open xshell select the user authentication method for selecting amended as public key to enter a user name and password from the password click batter can log in directly without entering a user name and password.
But I do not know they're using a secret key or password authentication certified View may deliberately enter the wrong password to view public or private
summarize create a directory mkdir /root/.ssh
modify permissions and chmod 700 /root/.ssh
then edit vi /root/.ssh/authorized_keys
and the putty and put inside and save the public key xshell

Three, ls command
ls command usage: the -l -t -a -h -i -d
ls the -l can file a detailed list to -rw ------- 1 root root 1418 August (indicates how many. files using the same iNode) represents the first root is the owner who is the second time root belongs to the group which represents the file size of 1418 bytes of the file created
iNode No. ls -i file
ls -a to see all hidden files . the beginning of the file there is a hidden directory
each file has a current directory .. and .. represents the directory on behalf of a..
LS represents the time -t sort by time sooner row below the later the more above
ls - h automatically when the file size column size changes as KMG
ls -d directory itself plus d only columns will not add the file directory and directory listed below
man ls ls view usage
ll actually ls -l alias
alias

Third, the traditional IDC deployment site

Fourth, the file type
ls -la
first left-most column represents the permissions on the file
type first representative document of the first column
d directory
- common binary files without color text documents can be directly used colored cat can not see this view is a binary file compiled to a common file if the file permissions plus the X will become a green, such as: EXE files can not be viewed
c string representing the
b block device disk
s socket file represents process
l soft link file is similar to Windows Shortcut

Third, the traditional IDC deployment site
Five, alias
some have and some do not and some representatives of the alias command is the command to add a new command the right combination of options form of
direct knock alias can see those commands have aliases
which is a view of the PATH environment variable file where the variable name system
you can customize a command alias yy = 'ls -lha' If you want to cancel the alias how do unalias yy thus cancel the
environment variable aliases stored /root/.bashrc
If you want to take effect in other terminals is above a alias in / root / .bashrc this file inside to add your alias

Third, the traditional IDC deployment site

Sixth, the relative and absolute paths
any file has a from / to start the path to
absolute path from / starting
as vi / etc / sysconfig / network- scripts / ifcfg-ens33 this is the absolute path
relative path is relative to the current directory location the path is not a path beginning with / .ssh as LS / authorized_keys
pwd View current path
cd = change directory represents the directory

Third, the traditional IDC deployment site

Seven, CD command
cd - cd directory is located on a representation to the next home directory of the current directory CD ~ user's home directory
cd .. below the root
man cd to see what usage
Third, the traditional IDC deployment site

Eight, create and remove directories rmdir mkdir
mkdir = the make Directory
rmdir = the Remove Directory

mkdir -p can create a series of string to create a directory mkdir -pv visualization can see the process of creating a directory
rmdir remove directory files can not be deleted without empty will delete empty directories for
touch create a blank file
rmdir -p can delete a bunch of successive directory

Third, the traditional IDC deployment site

Third, the traditional IDC deployment site

Guess you like

Origin blog.51cto.com/13292790/2433439