1、临时配置网络(ip,网关,dns)+永久配置

临时配置:

网络相关配置

网络相关配置

网络相关配置

网络相关配置

永久配置:

vim /etc/sysconfig/network-scripts/ifcfg-ens33

网络相关配置

(dhcp必须改成static,但是我不想改~)

关防火墙     systemctl stop firewarlld  

                systemctl disable firewalld

关闭SELINUX   vim /etc/sysconfig/selinux

网络相关配置

重启网卡 service network restart

查看 ifconfig

2、为集群内的机器设定主机名,利用/etc/hosts文件来解析自己的集群中所有的主机名,相应的,集群的配置应该改成使用主机名的方式

 hostnamectl set-hostname web1

 hostnamectl set-hostname web2

 vim /etc/hosts

网络相关配置

 vim /etc/hosts

网络相关配置

网络相关配置

网络相关配置

 

3、ssh登陆,scp上传、下载,ssh秘钥登陆,修改ssh server端的端口为8888然后进行登陆和scp测试

ssh登陆:

 网络相关配置

网络相关配置

scp上传、下载:

网络相关配置

网络相关配置

ssh秘钥登陆:

ssh-keygen

ssh-copy-id -i web2

网络相关配置

网络相关配置修改ssh:

vim /etc/ssh/sshd_config

网络相关配置

systemctl restart sshd

网络相关配置

网络相关配置

 

相关文章:

  • 2021-03-31
  • 2022-01-07
  • 2021-06-26
  • 2021-05-26
  • 2021-07-28
  • 2021-06-10
  • 2021-06-21
  • 2021-10-23
猜你喜欢
  • 2021-11-05
  • 2021-04-13
  • 2021-12-13
  • 2022-02-22
  • 2021-04-22
  • 2021-12-23
  • 2021-04-01
相关资源
相似解决方案