




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
/s/1gdz1Ghd:us6r本人打開它(做RHCSA的實驗需要打開的虛擬機為:RHCE7SERVERRHCE7Station做RHCE的實驗需要打開的虛擬機為:RHCE7SERVERRHCE-ServerRHCE-Desktop)Bro_Canada@Toronto2015-mount-oremount,rw/sysroot chroot/sysroot echo"redhat"|passwd--stdin touch systemctlisolategraphical.target或者第1題配置主機名和IP地址hostnamectlset-hostname 以直接vim/etc/hostname修改里面的內(nèi)容檢查:catnmcliconnectionshow nmclideviceshownmcliconnectionmodifyxxx(連接名)ipv4.addresses"0/2454"ipv4.dns54connection.autoconnectyesipv4.methodnmcliconnectionupxxx(連接名ping ping ###測試 setenforce cat 第3yum/dvd/rm-f/etc/yum.repos.d/* vim/etc/yum.repos.d/base.repo yum df-hT|greprhellvextend-L300M/dev/rhel/rhelxfs_growfs ###如或是ext4文件系統(tǒng),用命令第5題創(chuàng)建用戶和用戶組創(chuàng)建組要求harry和natasha的附加組為tom為非交互式groupadduseradd-Gsysadmharryuseradd-Gsysadmnatashauseradd-s/sbin/nologintomecho"redhat"|passwd--stdinharryecho"redhat"|passwd--stdinnatashaecho"redhat"|passwd--stdintom第6題把/etc/fstab拷貝到文件的屬主是cp/etc/fstabsetfacl-mu:harry:rw-/var/tmp/fstabsetfaclmu:natasha:/var/tmp/fstabgetfacl getfacl:Removingleading'/'fromabsolutepathnames###file:var/tmp/fstab###owner:root###group:rootgroup::r-other::r-第7harry用戶增加計劃任務(wù),每天23:30/bin/echoHELLOWORLD!crontab-uharry-e3023***/bin/echoHELLOcrontab-l-u 第8題創(chuàng)建目錄sysadms在/home下要求屬組為mkdirchgrpsysadm/home/sysadmschmodg+wchmodll-d第9題升級內(nèi)核新內(nèi)核地址在/pub新版的kernel在重新開機后為預(yù)設(shè)的wget/pub/kernel-3.10.0-123.1.2.el7.x8664.rpmrpm-ivhkernel-3.10.0-123.1.2.el7.x8664.rpm安裝完按成后,grep-i^menuentry/etc/grub2.cfg grub2-editenvlist 第10題LDAP認(rèn)證配置賬號密碼的驗證方式為LDAP,通過guest2001登錄,該用戶的密碼為證書可以從/pub/EXAMPLE-LDAP服務(wù)器地址yum-yinstallauthconfig-gtk.x86_64sssdkrb5-workstation.x86_64 authconfig- getentpasswdguest2001 sshguest2001@localhost 第11題配置NTP,地址為54yum-yinstall vim server54systemctlenablechronyd systemctlrestartchronyd timedatectlstatus查看NTP第12題配置autofs配置autofs,實現(xiàn)用戶guest2001登陸后有家目錄yum-yinstall vim /rhomevim/etc/auto.misc guest2001-rw54:/rhome/guest2001systemctlenableautofs.service systemctlstart ###啟動autofs服sshguest2001@localhost touchaaauseradd-u1234georgeecho"redhat"|passwdstdinalexidgeorge fdisk-lfdisk/dev/sdaWelcometofdisk(util-linuxChangeswillremaininmemoryonly,untilyoudecidetowritethem.Becarefulbeforeusingthewritecommand.Command(mforhelp):n Partitiontype: primary(2primary,0extended,2free) Select(defaultp): Partitionnumber(3,4,default3): ###分區(qū)號為3Firstsector(16812032-31457279,default16812032): UsingdefaultvalueLastsector,+sectorsor+size{K,M,G}(16812032-31457279,default Partition3oftypeLinuxandofsize512MiBisCommand(mforhelp): Partitionnumber(1-3,default3):3 Hexcode(typeLtolistallcodes):82 Changedtypeofpartition'Linux'to'Linuxswap/Solaris'Command(mforhelp):w Thepartitiontablehasbeenaltered!partx ll/dev/sda*vim/etc/fstab 0free-m查看多少swapswaponaswapswapon-s查看掛在了幾個mkdirfind/-userharry-execcp-a{}/opt/finddirlsl 第16/usr/share/dict/words中找出包含seismicgrepseismic/usr/share/dict/words>tarcjf(bz2方式)/root/backup.tar.bz2/usr/local/ tartjf 第18題創(chuàng)建邏輯卷創(chuàng)建一個邏輯卷fdiskWelcometofdisk(util-linuxChangeswillremaininmemoryonly,untilyoudecidetowritethem.Becarefulbeforeusingthewritecommand.Command(mforhelp):nPartitiontype: primary(3primary,0extended,1free) Select(defaulte):eSelectedpartition4Firstsector(17860608-31457279,defaultUsingdefaultvalueLastsector,+sectorsor+size{K,M,G}(17860608-31457279,default31457279):Usingdefaultvalue31457279Partition4oftypeExtendedandofsize6.5GiBisCommand(mforhelp):AllprimarypartitionsareinuseAddinglogicalpartition5Firstsector(17862656-31457279,defaultUsingdefaultvalueLastsector,+sectorsor+size{K,M,G}(17862656-31457279,default31457279):+2GPartition5oftypeLinuxandofsize2GiBissetCommand(mforhelp):Partitionnumber(1-5,default5):5Hexcode(typeLtolistallcodes):8eChangedtypeofpartition'Linux'to'LinuxLVM'Command(mforhelp):pDisk/dev/sda:16.1GB,16106127360bytes,31457280sectorsUnits=sectorsof1*512=512bytesSectorsize(logical/physical):512bytes/512bytesI/Osize(minimum/optimal):512bytes/512bytesDisklabeltype:dosDiskidentifier:*LinuxLinuxswap/5LinuxCommand(mforhelp):Thepartitiontablehasbeenpartx/dev/sdapvcreatevgcreate-s16Mdatastorage/dev/sda5vgdisplaydatastoragelvcreate-l50-ndatabaselvdisplaymkfs.ext3vim/etc/fstab/dev/datastorage/database ext3default0df-hT---------RHCE---------第1題當(dāng)前要求selinux開啟vim/etc/selinux/config 第2題配置SSHsystemctlstopiptables systemctldisablefirewall-cmd--list-firewall-cmd--remove-service=ssh--firewall-cmd--add-rich-rule'rulefamily=ipv4sourceaddress=/24servicename=sshaccept'--permanentfirewall-cmd--firewall-cmd--list-all vim第3題命令別名vim/etc/bashrcaliaspsa='/bin/ps-aux' source/etc/bashrc第4題端口轉(zhuǎn)發(fā)firewall-cmd--add-rich-rule'rulefamily=ipv4sourceaddress=/24forward-portport=5423protocol=tcpto-port=80'--permanentfirewall-cmd--firewall-cmd--list-all 第5題鏈路聚合此鏈路使用接口slave1和此鏈路在server30上使用地址nmclidevicenmcliconnectionaddcon-nameteam0typeteamifnameteam0confignmcliconnectionmodifyteam0ipv4.addresses"1/24"connection.autoconnectyesipv4.methodmanualnmcliconnectionaddcon-nameslave1typeteam-slaveifnamexxxxmasterteam0nmcliconnectionaddcon-nameslave2typeteam-slaveifnamexxxxmasternmcliconnectionupteam0ping測試第6題IPv6server30上配置IP地址為desktop30上配置IP地址為nmcliconnectionaddcon-nameeth0typeethernetifnamexxx nmcliconnectionmodifyxxxipv6.address"fd00:ba5e:ba11:10::10/64fd00:ba5e:ba11:10::fe"ipv6.methodmanualconnection.autoconnectyesnmcliconnectionupxxxping6第7題在server30上配置郵件服務(wù)在這些系統(tǒng)上本地發(fā)送的任何郵件都要被路由到從這些系統(tǒng)上發(fā)送的郵件顯示來自于/email/daveyuminstallviminet_interface=localhostrelayhost=systemctlenablepostfixsystemctlrestartpostfixpostconfnnetstatentlp25mail-s"TTTTTTT"davectrl+Dfirefoxtail 第8題SAMBA服務(wù)共享/common目錄,共享名為用戶floyd必須能夠讀取共享中的內(nèi)容,如果需要的話,驗證密碼是yum-yinstallsamba-clientmkdirsemanagefcontext-a-tsamba_share_t'/common(/.*)?'//-a添加-t類型restorecon-vvFR/common/ //-v顯示過程-R遞歸-F強制vimworkgroup=comment=PublicStuffpath=/commonbroweable=yesvalidusers=floyduseraddfloydsmbpasswd-afloydsystemctlenablesmb.servicenmb.servicesystemctlstartsmb.servicenmb.servicenetstat-ntlpfirewall-cmd--add-rich-rule'rulefamily=ipv4sourceaddress=/24servicename=sambaaccept'--permanentfirewall-cmd--add-rich-rule'rulefamily=ipv4sourceaddress=/24servicename=samba.clientaccept'--permanentfirewall-cmd--到客戶端驗證:yumyinstallsamba-clientsmbclient-L30smbclient//30/common-Ufloyd第9題多用戶samba掛載在server30上通過samba共享目錄用戶kenji能夠以讀的方式訪問共享,訪問密碼用戶chihiro能以讀寫的方式訪問共享,訪問密碼mkdirsemanagefcontext-a-tsamba_share_t'/devops(/.*)?'restorecon-vvFR/devops/vimworkgroup=comment=DevopsPublicpath=/debopsbroweable=yesvalidusers=kenji,chihirowritelist=chihirouseraddkenjismbpasswd-akenjismbpasswd-achihirosetfacl-mu:chihiro:rwx/devopssystemctlrestartsmb.servicenmb.serviceyum-yinstallcifs-utilsmkdir/mnt/devvim//30/devops/mnt/devcifsusername=kenji,password=redhat,multiuser,sec=ntlmssp00su-student cd/mnt/devcifscredsadd-uchihiro30 第10題在server30上配置NFS服務(wù)用戶guest2001能以讀寫的方式訪問yum-yinstallnfs-utilsmkdir/publicmkdirvim/public/protectedwget-O/etc/krb5.keytab/pub/server30.keytabsystemctlenablenfs-server.servicenfs-secure-server.servicesystemctlstartnfs-server.servicenfs-secure-mkdirchownguest2001exportfs-r exportfs-v firewall-cmd--add-rich-rule'rulefamily=ipv4sourceaddress=/24servicename=nfsaccept'--permanentfirewall-cmd--第11desktop30上掛載來自于server30的NFS/public掛載在目錄/mnt/nfsmountyum-yinstallnfs-mkdir/mnt/nfsmount/wgetO/etc/krb5.keytab/pub/desktop30.keytabsystemctlenablenfs-secure systemctlstartnfs-vim30:/public/mnt/nfsmountnfsro0: /mnt/nfssecurenfsrw,sec=krb5p0df-hTssh 第12server30上配置web站點yum-yinstallhttpdhttpd-manualvim/etc/httpd/conf/httpd.confServerNamecdwget-Oindex.html/pub/example.htmlcat/var/www/html/index.htmlsystemctlenablehttpd.servicesystemctlstarthttpd.servicenetstat-ntlp看有沒有80監(jiān)聽firewall-cmd--add-rich-rule'rulefamily=ipv4sourceaddress=/24servicename=httpaccept'--permanentfirewall-cmdadd-rich-rule'rulefamily=ipv4sourceaddress=/24servicename=httpsaccept'--permanent//為下一道題做準(zhǔn)備firewall-cmd--在客戶端測試:firefox第13為站點配置TLS加yum-yinstallvim<VirualHostDocumentRoot"/var/www/html"###ServerSSLCertificateFile###ServerPrivateSSLCertificateFile CertificateAuthoritySSLCertificateFilecdwgetcdwgetsystemctlrestarthattpd.servicenetstat-nltp 在客戶端測試:firefox第14題在server30上擴展WEB服務(wù)器idfloydsetfacl-mu:floyd:rwx/var/www/virtualcd/var/www/virtualwget-oindex.htmlvimvhost.conf<VirtualHostServerName<VirtualHost*:80>ServerNamesystemctlrestarthttpd.servicehttpd-S查看第15題WEB訪問控制cdprivatewget-Oindex.htmlvim<Directory/var/www/html/private> AllowOverridenoneRequireip30systemctlrestart第16題在server30上實現(xiàn)動態(tài)WEB虛擬主機偵聽端口為客戶端訪問:8909時,應(yīng)該接收到動態(tài)生成的web面yum-yinstallmod_wsgicd/var/www/html/wgetvimetc/httpd/conf.d/vhost.confListen8909<VirtualHostServerName:8909WSGIScriptAlias//var/www/html/webapp.wsgisemanageport-a-thttp_port_t-ptcp8909systemctlrestarthttpd.servicenetstate-firewall-cmd--add-rich-rule'rulefamily=ipv4sourceaddress=/24portprotocol=tcpport=8909accept'--permanentfirewall-cmd--第17server30提供一個iSCSI共享服務(wù)磁盤名稱為iqn.2014-服務(wù)端口為使用iscsi_store作為后端卷大小為yum-yinstallfdisk/dev/sda Command(mforhelp):nPartition primary(2primary,0extended,2free) Select(defaultp):Partitionnumber(3,4,default3):Firstsector(16812032-31457279,defaultUsingdefaultvalueLastsector,+sectorsor+size{K,M,G}(16812032-31457279,default31457279):+3GPartition3oftypeLinuxandofsize3GiBissetCommand(mforhelp):ThepartitiontablehasbeenCallingioctl()tore-readpartitionWARNING:Re-readingthepartitiontablefailedwitherror16:DeviceorresourceThekernelstillusestheoldtable.Thenewtablewillbeusedatthenextrebootorafteryourunpartprobe(8)orkpartx(8)Syncingdisks.partx/dev/sdacdcreateiscsi_storecd.example:server30cdaclscd../lunscreate/backstores/block/iscsi_storecd create30 systemctlenabletarget.servicesystemctlstarttarget.servicefirewall-cmd--add-rich-rule'rulefamily=ipv4sourceaddress=0portprotocol=tcpport=3260accept'--permanentfirewall-cmd--第18題配置客戶端desktop30塊設(shè)備iSCSI上包含一個大小等于2100MB的分區(qū),格式化為18.3/mnt/datayum-yinstallsystemctlenableiscsisystemctlstartiscsivim systemctlrestartiscsiadm-mdiscovery-tst-piscsiadm-mnode-T.example:server30-p30-fdisk-l fdisk/dev/sdbCommand(mforhelp):nPartitiontype: primary(0primary,0extended,4free) Select(defaultp):Partitionnumber(1-4,default1):Firstsector(8192-6291455,defaultUsingdefaultvalueLastsector,+sectorsor+size{K,M,G}(8192-6291455,default6291455):+2100MPartition1oftypeLinuxandofsize2.1GiBissetComm
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 德州職業(yè)技術(shù)學(xué)院《工程翻譯》2023-2024學(xué)年第二學(xué)期期末試卷
- 貴州電子商務(wù)職業(yè)技術(shù)學(xué)院《社會查與統(tǒng)計》2023-2024學(xué)年第二學(xué)期期末試卷
- 天津醫(yī)科大學(xué)臨床醫(yī)學(xué)院《大學(xué)化學(xué)下》2023-2024學(xué)年第二學(xué)期期末試卷
- 淮陰工學(xué)院《大學(xué)人文專題教育》2023-2024學(xué)年第二學(xué)期期末試卷
- 沈陽體育學(xué)院《中國法律思想史》2023-2024學(xué)年第二學(xué)期期末試卷
- 吉林農(nóng)業(yè)科技學(xué)院《游戲引擎原理及應(yīng)用二》2023-2024學(xué)年第二學(xué)期期末試卷
- 湖北職業(yè)技術(shù)學(xué)院《空間飛行器總體設(shè)計》2023-2024學(xué)年第二學(xué)期期末試卷
- 浙江工貿(mào)職業(yè)技術(shù)學(xué)院《非織造布設(shè)計》2023-2024學(xué)年第二學(xué)期期末試卷
- 天津國土資源和房屋職業(yè)學(xué)院《咖啡茶文化與服務(wù)理論教學(xué)》2023-2024學(xué)年第二學(xué)期期末試卷
- 河南機電職業(yè)學(xué)院《物理化學(xué)B(限選)》2023-2024學(xué)年第二學(xué)期期末試卷
- 婚內(nèi)財產(chǎn)債務(wù)協(xié)議書(通用)
- 部編版四年級下冊道德與法治 第4課 買東西的學(xué)問(第2課時) 教學(xué)課件
- 慢性活動性EB病毒課件
- 葡萄胎全面版課件
- 《冷沖壓工藝與模具設(shè)計》完整版ppt課件全套教程
- 業(yè)務(wù)招待費明細單
- 高效液相色譜法分析(三聚氰胺)原始記錄1
- 典雅中國風(fēng)詩詞大會古風(fēng)PPT模板
- Part 7 Formal and Informal Styles課件
- 文化差異及跨文化交際試題集
- 油畫人體張東方姑娘的極致美
評論
0/150
提交評論