Diff:文本比較工具 ???vimdiff:圖形化比較
Cp/etc/passwd{..ori}
備份的好處:
1州刽、恢復(fù)
2、比較浪箭、檢查
2穗椅、rpm
[root@oldboyedu?~]#?mount?/dev/cdrom?/mntmount:?no?medium?found?on?/dev/sr0[root@oldboyedu?~]#?mount?/dev/cdrom?/mntmount:?/dev/sr0?is?write-protected,?mounting?read-only[root@oldboyedu?~]#?cd?/mnt/[root@oldboyedu?/mnt]#?lsCentOS_BuildTag??EULA??images????LiveOS????repodata??????????????RPM-GPG-KEY-CentOS-Testing-7EFI??????????????GPL???isolinux??Packages??RPM-GPG-KEY-CentOS-7??TRANS.TBL[root@oldboyedu?/mnt]#?cd?Packages/
[root@oldboyedu?/mnt/Packages]#?rpm?-qa|grep?treetree-1.6.0-10.el7.x86_64[root@oldboyedu?/mnt/Packages]#?rpm?-qa?treetree-1.6.0-10.el7.x86_64
[root@oldboyedu ~]# rpm -ql tree
/usr/bin/tree
/usr/share/doc/tree-1.6.0
/usr/share/doc/tree-1.6.0/LICENSE
/usr/share/doc/tree-1.6.0/README
/usr/share/man/man1/tree.1.gz
[root@oldboyedu?~]#?rpm?-qf?/sbin/ifconfig?net-tools-2.0-0.24.20131004git.el7.x86_64
3、yum:幫我們?cè)趓pm安裝時(shí)解決軟件包依賴奶栖,但是背后還是使用rpm匹表,不需要直接使用rpm,
讓安裝軟件更智能了宣鄙。Yum主要用于自動(dòng)安裝袍镀。
[root@oldboyedu?~]#?yum?grouplistLoaded?plugins:?fastestmirrorLoading?mirror?speeds?from?cached?hostfilebase????????????????????????????????????????????????????????|?3.6?kB??00:00:00?????Available?Environment?Groups:???Minimal?Install???Compute?Node???Infrastructure?Server???File?and?Print?Server
[root@oldboyedu?~]#?yum?list?treeLoaded?plugins:?fastestmirrorLoading?mirror?speeds?from?cached?hostfileInstalled?Packagestree.x86_64????????????????????????????????1.6.0-10.el7????????????????????????????????@base[root@oldboyedu?~]#?yum?install?tree?-y
根據(jù)命令或者配置等的路徑查屬于哪個(gè)包[root@oldboyedu?~]#?yum?provides?/etc/my.cnf[root@oldboyedu?~]#?yum?provides?/sbin/ifconfig
3 .Linuxi系統(tǒng)如何安裝軟件?
1. rpm安裝
簡(jiǎn)單快冻晤。依賴多苇羡,解決依賴?yán)щy繁瑣
2.Yum安裝
簡(jiǎn)單快,自動(dòng)解決依賴鼻弧。不能選擇軟件版本或軟件存放路徑设江。
3.編譯安裝(源碼編譯)
慢復(fù)雜需要GCC編譯器,可以自定義安裝(版本攘轩、軟件路徑)
4.將源碼制作成rpm绣硝,然后放到y(tǒng)um倉(cāng)庫(kù),實(shí)現(xiàn)yum自動(dòng)安裝撑刺。
一次性慢復(fù)雜,安裝快握玛,可以自定義安裝(版本够傍、軟件路徑)
制作rpm,yum 倉(cāng)庫(kù)搭建
https://blog.oldboyedu.com/autodeploy-rpm/
centOS6.x和centOS7.x的區(qū)別