One, temporary configuration network (IP, gateway, DNS)
Ifconfig View Network Configuration
Modify the IP address ifconfig ens33 192.168. 255.129/
ENS33 nic name, 192.168. 255.129/24 is the IP address/subnet mask to configure
Two , Permanent configuration network (IP, gateway, DNS)
Ifconfig View Network Configuration
Modify the network configuration, save.
Third, for the machine in the cluster to set the hostname, the use of/etc/hosts file to resolve all the host names in their own cluster, the corresponding, the cluster configuration should be changed to use the host name of the way
Hostnamectl set-hostname python #设置主机名
Hostname #查看主机名
Host:
Ext. 1
Ext. 2
Ext. 3
Test
Enter the following command on the host
Enter the domain name separately in the webpage, PYTHON-WEB1,PYTHON-WEB2,PYTHON-WEB3, the test succeeds.
Iv. ssh login, scp upload, download, ssh key login, modify SSH server port to 8888 and then sign in and SCP test
SSH login: ssh+ domain name or IP address
SCP upload
SCP download
SSH secret key Login
Ssh-kengen #生成秘钥
ls/root/.ssh/#秘钥生成目录
ssh-copy-id-i + domain name #发送锁给服务机
Vim/etc/ssh/sshd_config #修改主机ssh端口为888
Systemctl Restart sshd #重启主机ssh服务
SSH + domain or IP address-P 888 #客户端使用主机名 + PORT login
SSH [email protected]+ domain name or IP address-P 888 #登录测试
V. Organize the bash command type to verify the priority of finding a command
Command interpreter Bash priority descending from left to right:
Alias>compound commands>function>build_in>hash> $PATH >error
Linux Basics (6)