网络配置及shell基础
一:集群已做完
二:臨時(shí)配置網(wǎng)絡(luò)(ip,網(wǎng)關(guān),dns)+永久配置
臨時(shí)配置網(wǎng)絡(luò):
ip:??? [root@localhost ~]# ifconfig
[root@localhost ~]# ifconfig eno16777736 192.168.24.129/24
網(wǎng)關(guān):[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
?
?
三:集群內(nèi)的機(jī)器設(shè)定主機(jī)名,利用/etc/hosts文件來(lái)解析自己的集群中所有的主機(jī)名,相應(yīng)的,集群的配置應(yīng)該改成使用主機(jī)名的方式
?
?
?
?
四:ssh登錄,scp上傳、下載,ssh秘鑰登錄,修改ssh server端的端口為8888然后進(jìn)行登錄和scp測(cè)試
?
?
五:整理bash命令類型,驗(yàn)證尋找一個(gè)命令的優(yōu)先級(jí)
==> alias
==> Compound Commands
==> function?
==> build_in
==> hash
==> $PATH
?
函數(shù)與內(nèi)置優(yōu)先級(jí) [root@localhost ~]# function cd () { echo 123; }
[root@localhost ~]# cd
123
[root@localhost ~]# unset cd
?
六:通配符實(shí)驗(yàn)
~ 家目錄:切換到家目錄cd~
?
~覆蓋命令
[root@python-web2 ~]# echo hello world > a.txt
?
~追加命令
[root@python-web2 ~]# echo hello world >> b.txt
?
轉(zhuǎn)載于:https://www.cnblogs.com/niejinmei/p/6597196.html
總結(jié)
以上是生活随笔為你收集整理的网络配置及shell基础的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 检查代码的一个方法
- 下一篇: Spring MVC Servlet