网络配置及shell基础

一:集群已做完

二:临时配置网络(ip,网关,dns)+永久配置

临时配置网络:

ip:    [root@localhost ~]# ifconfig

[root@localhost ~]# ifconfig eno16777736 192.168.24.129/24

网关:[root@localhost ~]# route add default gw 192.168.24.1 netmask 255.255.255.0

[root@localhost ~]# route -n

Dns:[root@localhost ~]# vim /etc/resolv.conf

 

永久配置:

[root@localhost ~]# cd /etc/sysconfig/network-scripts/

[root@localhost network-scripts]# vim ifcfg-eno16777736

[root@localhost network-scripts]# systemctl restart network

 

 

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

 

 

 

 

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

 

 

五:整理bash命令类型,验证寻找一个命令的优先级

==> alias
==> Compound Commands
==> function 
==> build_in
==> hash
==> $PATH

 

函数与内置优先级 [root@localhost ~]# function cd () { echo 123; }

[root@localhost ~]# cd

123

[root@localhost ~]# unset cd

 

六:通配符实验

~ 家目录:切换到家目录cd~

 

~覆盖命令

[root@python-web2 ~]# echo hello world > a.txt

 

~追加命令

[root@python-web2 ~]# echo hello world >> b.txt

 

posted @ 2017-03-21 22:30  karina梅梅  阅读(327)  评论(0编辑  收藏  举报