




已閱讀5頁(yè),還剩20頁(yè)未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
不用破解system1,system2密碼 注意看網(wǎng)絡(luò)信息 考前題目1.配置 SELinuxSELinux 必須在兩個(gè)系統(tǒng) system1 和 system2 中運(yùn)行于 Enforcing 模式-1) getenforcerootsystem1 # getenforceEnforcing2) setenforce 1rootsystem1 # setenforce -helpusage: setenforce Enforcing | Permissive | 1 | 0 rootsystem1 # setenforce 13) vi /etc/selinux/config將SELINUX=permissive 改成 SELINUX=enforcing同樣地在system2上執(zhí)行同樣操作。2.配置 SSH 訪(fǎng)問(wèn)按以下要求配置 SSH 訪(fǎng)問(wèn):用戶(hù)能夠從域 rhce.cc 內(nèi)的客戶(hù)端通過(guò) SSH 遠(yuǎn)程訪(fǎng)問(wèn)您的兩個(gè)虛擬機(jī)系統(tǒng)在域 內(nèi)的客戶(hù)端不能訪(fǎng)問(wèn)您的兩個(gè)虛擬機(jī)系統(tǒng)-1)查看當(dāng)前域rhce.cc的網(wǎng)段:rootsystem1 # host system1.rhce.ccsystem1.rhce.cc has address 00可知網(wǎng)段為2)vi /etc/hosts.allow添加如下內(nèi)容:#sshd : /3)vi/etc/hosts.deny#sshd : .4)scp /etc/hosts.allow /etc/hosts.deny system2.rhce.cc:/etc/3.自定義用戶(hù)環(huán)境在系統(tǒng) system1 和 system2 上創(chuàng)建自定義命令名為 qstat 此自定義命令將執(zhí)行以下命令:/bin/ps -Ao pid,tt,user,fname,rsz此命令對(duì)系統(tǒng)中所有用戶(hù)有效。-1)vim/etc/bashrc unset -f pathmungefi# vim:ts=4:sw=4alias qstat=/bin/ps -Ao pid,tt,user,fname,rsz /最后一行2)source /etc/bashrc3) qstat2301 ? root kworker/ 0 2315 ? root kworker/ 0 2333 ? root anacron 748 2344 ? root kworker/ 0 2346 pts/1 root ps 12644)scp /etc/bashrc system2:/etc5)在system2上執(zhí)行source /etc/bashrc4.配置端口轉(zhuǎn)發(fā)在系統(tǒng) system1 配置端口轉(zhuǎn)發(fā), 要求如下:在 /24 網(wǎng)絡(luò)中的系統(tǒng), 訪(fǎng)問(wèn) system1 的本地端口 5423 將被轉(zhuǎn)發(fā)到 80此設(shè)置必須永久有效-1) 在system1上添加富規(guī)則firewall-cmd -add-rich-rule rule family=ipv4 source address=00/24 forward-port port=5423 protocol=tcp to-port=80 2) 在system1上添加永久性富規(guī)則rootsystem1 # firewall-cmd -add-rich-rule rule family=ipv4 source address=00/24 forward-port port=5423 protocol=tcp to-port=80 -permanentsuccess3) 查看當(dāng)前富規(guī)則:firewall-cmd -list-rich-rulesrootsystem1 # firewall-cmd -list-rich-rules rule family=ipv4 source address=/24 forward-port port=5423 protocol=tcp to-port=805.配置聚合鏈路在 system1.rhce.cc 和 system2.rhce.cc 之間按以下要求配置一個(gè)鏈路:此鏈路使用接口 eth1 和 eth2此鏈路在一個(gè)接口失效時(shí)仍然能工作此鏈路在 system1 使用下面的地址 5/此鏈路在 system2 使用下面的地址 5/此鏈路在系統(tǒng)重啟之后依然保持正常狀態(tài)-1) 配置system1上的team0文件nmcli connection add type team con-name team0 ifname team0 config runner:name:activebackup2) 為team0配置IP地址nmcli connection modify team0 ipv4.addresses 5/243) 為team0設(shè)置手動(dòng)管理nmcli connection modify team0 ipv4.method manual 4) 添加一個(gè)類(lèi)型為team-slave的從設(shè)備,連接名為team0-1 接口為eth1, master 為team0nmcli connection add type team-slave con-name team0-1 ifname eth1 master team05) 添加一個(gè)類(lèi)型為team-slave的從設(shè)備,連接名為team0-2 接口為eth1, master 為team0nmcli connection add type team-slave con-name team0-2 ifname eth2 master team0 cd /etc/sysconfig/network-scripts/vi ifcfg-team0 檢查onboot是否=yesvi ifcfg-team0 檢查onboot是否=yessystemctl restart networkssh 遠(yuǎn)程到另一臺(tái)主機(jī) 00 復(fù)制如上命令,重復(fù)執(zhí)行如下命令nmcli connection add type team con-name team0 ifname team0 config runner:name:activebackupnmcli connection modify team0 ipv4.addresses 5/24 /ip要更換nmcli connection modify team0 ipv4.method manual nmcli connection add type team-slave con-name team0-1 ifname eth1 master team0nmcli connection add type team-slave con-name team0-2 ifname eth2 master team0 systemctl restart networkping 5 或者 5teamdctl team0 state 查看狀態(tài)6.配置 IPv6 地址在您的考試系統(tǒng)上配置接口 eth0 使用下列 IPv6 地址:system1 上的地址應(yīng)該是 200e:ac18:e0a/64system2 上的地址應(yīng)該是 200e:ac18:e14/64兩個(gè)系統(tǒng)必須能與網(wǎng)絡(luò) 200e:ac18/64 內(nèi)的系統(tǒng)通信。地址必須在重啟后依舊生效。兩個(gè)系統(tǒng)必須保持當(dāng)前的 IPv4 地址并能通信。-1) 在system1上修改管理方式為autonmcli connection modify eth0 ipv6.method auto2) 在system1上修改eth0網(wǎng)卡的mac地址nmcli connection modify eth0 ipv6.addresses 200e:ac18:e0a/643) 在system1上修改管理方式為manualnmcli connection modify eth0 ipv6.method manualnmcli connection show eth0|grep ipv6 /可以檢查如下值是否為 auto,如果不為auto則會(huì)無(wú)法成功配置mac地址。ipv6.method: auto4) 重啟網(wǎng)絡(luò)服務(wù)systemctl restart network在system2上再執(zhí)行一次:1) 在system2上修改管理方式為autonmcli connection modify eth0 ipv6.method auto2) 在system2上修改eth0網(wǎng)卡的mac地址nmcli connection modify eth0 ipv6.addresses 200e:ac18:e14/643) 在system2上修改管理方式為manualnmcli connection modify eth0 ipv6.method manual4) 重啟網(wǎng)絡(luò)服務(wù)systemctl restart network5) 最后在system1使用如下命令測(cè)試網(wǎng)絡(luò)連通性:ping6 200e:ac18:e147.配置本地郵件服務(wù)老段工作室 www.rhce.cc在系統(tǒng) system1 和 system2 上 配置郵件服務(wù), 滿(mǎn)足以下要求:這些系統(tǒng)不接收外部發(fā)送來(lái)的郵件在這些系統(tǒng)上本地發(fā)送的任何郵件都會(huì)自動(dòng)路由到 rhgls.rhce.cc從這些系統(tǒng)上發(fā)送的郵件顯示來(lái)自于 rhce.cc您可以通過(guò)發(fā)送郵件到本地用戶(hù) dave 來(lái)測(cè)試您的配置, 系統(tǒng) rhgls.rhce.cc 已經(jīng)配置把此用戶(hù)的郵件轉(zhuǎn)到下列 URL http:/rhgls.rhce.cc/received_mail/11-本地系統(tǒng)不接受外部發(fā)來(lái)的郵件:分別在system1,2上開(kāi)啟smtp富規(guī)則:firewall-cmd -add-service=smtpfirewall-cmd -add-service=smtp -permanent1) 編輯郵件配置文件:vim /etc/postfix/main.cf2) 查找mydestination#mydestination = $myhostname, localhost.$mydomain, localhost/注釋該行mydestination = /取消下一行注釋?zhuān)h除=號(hào)后面內(nèi)容將本地發(fā)送的郵件自動(dòng)路由到rhgls.rhce.cc1) 查找relayhost#relayhost = an.ip.add.ress /在該行下新起一行relayhost = rhgls.rhce.cc /修改成rhgls.rhce.cc從這些系統(tǒng)上發(fā)送的郵件顯示來(lái)自于 rhce.cc 1) 查找myorigin#myorigin = $mydomain /在該行下新起一行myorigin = rhce.cc /修改成rhgls.rhce.cc2) 重啟system1郵件服務(wù)systemctl restart postfixrootlocalhost # vi /etc/resolv.conf rootlocalhost # systemctl restart networkrootlocalhost # host system1.rhce.ccsystem1.rhce.cc has address 001) 拷貝system1郵件服務(wù)配置文件到system2上scp /etc/postfix/main.cf system2.rhce.cc:/etc/postfix/main.cf2) 重啟郵件服務(wù)systemctl restart postfixyum y install mailxecho aaa |mail -s system1 dave8.通過(guò) SMB 共享目錄在 system1 上配置 SMB 服務(wù)您的 SMB 服務(wù)器必須是 STAFF 工作組的一個(gè)成員共享 /common 目錄 共享名必須為 common只有 rhce.cc 域內(nèi)的客戶(hù)端可以訪(fǎng)問(wèn) common 共享common 必須是可以瀏覽的用戶(hù) andy 必須能夠讀取共享中的內(nèi)容, 如果需要的話(huà), 驗(yàn)證的密碼是 redhat-您的 SMB 服務(wù)器必須是 STAFF 工作組的一個(gè)成員yum - y install samba1) 編輯sbm.conf配置文件vim /etc/samba/smb.conf查找workgroupworkgroup = STAFFserver string = Samba Server Version %v共享 /common 目錄 共享名必須為 common1) 創(chuàng)建共享目錄mkdir /common2) 編輯sbm.conf配置文件vim /etc/samba/smb.conf切到最后一行,添加commonpath = /commonhosts allow = /24 /只有 rhce.cc 域內(nèi)的客戶(hù)端可以訪(fǎng)問(wèn) common 共享,而rhce.cc的網(wǎng)段為/243) 更改上下文chcon R t samba_share_t /common用戶(hù) andy 必須能夠讀取共享中的內(nèi)容, 如果需要的話(huà), 驗(yàn)證的密碼是 redhatuseradd andypdbedit L 查看samba用戶(hù)列表yum whatprovides */smbpasswd 查看smbpasswd命令由哪個(gè)包提供Repo : aaMatched from:Filename : /etc/raddb/mods-available/smbpasswdsamba-client-4.1.1-31.el7.x86_64 : Samba client programsRepo : aaMatched from:Filename : /usr/bin/smbpasswdsmbpasswd a andy 為andy設(shè)置密碼firewall-cmd -add-service=samba 添加samba服務(wù)富規(guī)則firewall-cmd -add-service=samba -permanent 永久添加samba服務(wù)富規(guī)則systemctl restart smb systemctl enable smb在system2上測(cè)試yum y install cifs* samba-client*smbclient L /system1.rhce.cc U andy%redhat /測(cè)試第八題有沒(méi)有問(wèn)題9.配置多用戶(hù) SMB 掛載在 system1 共享通過(guò) SMB 目錄 /miscellaneous 滿(mǎn)足以下要求:共享名為 miscellaneous共享目錄 miscellaneous 只能被 rhce.cc 域中的客戶(hù)端使用共享目錄 miscellaneous 必須可以被瀏覽用戶(hù) silene 必須能以讀的方式訪(fǎng)問(wèn)此共享, 訪(fǎng)問(wèn)密碼是 redhat用戶(hù) akira 必須能以讀寫(xiě)的方式訪(fǎng)問(wèn)此共享, 訪(fǎng)問(wèn)密碼是 redhat此共享永久掛載在 system2.rhce.cc 上的 /mnt/multi 目錄, 并使用用戶(hù) silene 作為認(rèn)證 任何用戶(hù)可以通過(guò)用戶(hù) akira 來(lái)臨時(shí)獲取寫(xiě)的權(quán)限-在system1下執(zhí)行:mkdir /miscellaneousvim /etc/samba/smb.confmiscellaneouspath=/miscellaneoushosts allow = /24writable= no /用戶(hù) silene 必須能以讀的方式訪(fǎng)問(wèn)此共享,write list = akira / 用戶(hù) akira 必須能以讀寫(xiě)的方式訪(fǎng)問(wèn)此共享,id sileneid akira 查看用戶(hù)是否存在useradd sileneuseradd akirasmbpasswd a akira /訪(fǎng)問(wèn)密碼是 redhatsmbpasswd a silene /訪(fǎng)問(wèn)密碼是 redhatsystemctl restart smbsystemctl enable smb共享目錄 miscellaneous 只能被 rhce.cc 域中的客戶(hù)端使用chcon -R -t samba_share_t /miscellaneous/改變selinux上下文chmod o+w /miscellaneous /用戶(hù) akira 必須能以讀寫(xiě)的方式訪(fǎng)問(wèn)此共享,在system2上mkdir /mnt/multiyum y install cifs* samba-client*smbclient L /system1.rhce.cc U andy%redhat /測(cè)試第八題有沒(méi)有問(wèn)題mount -o multiuser,sec=ntlmssp,username=silene,password=redhat /system1.rhce.cc/miscellaneous /mnt/multi/ useradd tom1su - tom1cd /mnt/multi 此時(shí)應(yīng)該會(huì)提示權(quán)限不足任何用戶(hù)可以通過(guò)用戶(hù) akira 來(lái)臨時(shí)獲取寫(xiě)的權(quán)限cifscreds add system1.rhce.cc -u akira /輸入密碼后應(yīng)該可以進(jìn)入/mnt/multi目錄,寫(xiě)目錄 如果權(quán)限不夠,檢查/mnt/multi權(quán)限,重啟smb服務(wù) systemctl restart smb檢查/etc/samba/smb.conf 的write list還有檢查system1的selinux上下文是否更改。chcon -R -t samba_share_t /miscellaneous以上檢查完后umount /mnt/multi然后在mount -o multiuser,sec=ntlmssp,username=silene,password=redhat /system1.rhce.cc/miscellaneous /mnt/multivi /etc/fstab加入如下內(nèi)容:/system1.rhce.cc/miscellaneous /mnt/multi cifs defaults, multiuser,sec=ntlmssp,username=silene,password=redhat 0 010.配置 NFS 服務(wù)在 system1 配置 NFS 服務(wù), 要求如下:以只讀的方式共享目錄 /public 同時(shí)只能被 rhce.cc 域中的系統(tǒng)訪(fǎng)問(wèn)以讀寫(xiě)的方式共享目錄 /protected 能被 rhce.cc 域中的系統(tǒng)訪(fǎng)問(wèn)訪(fǎng)問(wèn) /protected 需要通過(guò) Kerberos 安全加密, 您可以使用下面 URL 提供的密鑰http:/host.rhce.cc/materials/nfs_server.keytab.目錄 /protected 應(yīng)該包含名為 confidential 擁有人為 ldapuser11 的子目錄用戶(hù) ldapuser11 能以讀寫(xiě)方式訪(fǎng)問(wèn) /protected/confidential-firewall-cmd -get-services |grep nfs 查看服務(wù)firewall-cmd -add-rich-rule rule family=ipv4 source address=/24 service name=nfs acceptfirewall-cmd -add-rich-rule rule family=ipv4 source address=/24 service name=rpc-bind acceptfirewall-cmd -add-rich-rule rule family=ipv4 source address=/24 service name=mountd accept firewall-cmd -add-rich-rule rule family=ipv4 source address=/24 service name=nfs accept -permanentfirewall-cmd -add-rich-rule rule family=ipv4 source address=/24 service name=rpc-bind accept -permanentfirewall-cmd -add-rich-rule rule family=ipv4 source address=/24 service name=mountd accept -permanentmkdir /publicmkdir /protectedvim /etc/exports添加如下內(nèi)容:/public *(ro,sync)/protected * (rw,sync,sec=krb5p)重新加載/etc/exports中的設(shè)置,并同步更新/var/lib/nfs/etab中的內(nèi)容:exportfs -r或者/public /24(ro,sync)/protected /24(rw,sync,sec=krb5p)wget -O /etc/krb5.keytab http:/host.rhce.cc/materials/nfs_server.keytab /大寫(xiě)的Ovim /etc/sysconfig/nfs查找RPCNFSDARGS編輯RPCNFSDARGS=-V 4.2mkdir /protected/confidentialchown ldapuser11 /protected/confidentialchcon -R -t public_content_t /protected/confidentialsystemctl start nfs-serversystemctl start nfssystemctl start nfs-secure-serversystemctl enable nfs-secure-serversystemctl enable nfs-server11. 掛載一個(gè) NFS 共享在 system2 上掛載一個(gè)來(lái)自 system1.rhce.cc 的 NFS 共享, 并符合下列要求:/public 掛載在下面的目錄上 /mnt/nfsmount/protected 掛載在下面的目錄上 /mnt/nfssecure 并使用安全的方式, 密鑰下載 URL 如下: http:/host.rhce.cc/materials/nfs_client.keytab.用戶(hù) ldapusre11 能夠在 /mnt/nfssecure/confidential 上創(chuàng)建文件老段工作室 www.rhce.cc這些文件系統(tǒng)在系統(tǒng)啟動(dòng)時(shí)自動(dòng)掛載-在system2上執(zhí)行showmount -e system1.rhce.ccmkdir /mnt/nfsmountmkdir /mnt/nfssecurevi /etc/fstab 添加如下內(nèi)容:system1.rhce.cc:/public /mnt/nfsmount nfs defaults 0 0mount -a wget -O /etc/krb5.keytab http:/host.rhce.cc/materials/nfs_server.keytabwget -O /etc/krb5.keytab http:/host.rhce.cc/materials/nfs_client.keytabsystemctl start nfs-securesystemctl enable nfs-securevi /etc/fstab 添加如下內(nèi)容:system1.rhce.cc:/protected /mnt/nfssecure nfs defaults,sec=krb5p,v4.2 0 0mount -adf -HT如果不正常 檢查host、system1 system2時(shí)間是否一致在system1上 ssh ldapuser11system2.rhce.cccd /mnt/nfssecure touch ldapuser1111測(cè)試使用ldapuser11是否能創(chuàng)建文件12. 配置 web 站點(diǎn)system1 上配置一個(gè)站點(diǎn) http:/system1.rhce.cc 然后執(zhí)行下述步驟:從 http:/rhgls.rhce.cc/materials/station.html下載文件, 并且將文件重命名為 index.html 不要修改此文件的內(nèi)容將文件 index.html 拷貝到您的 web 服務(wù)器的 DocumentRoot 目錄下來(lái)自于 rhce.cc 域的客戶(hù)端可以訪(fǎng)問(wèn)此 Web 服務(wù)來(lái)自于 域的客戶(hù)端拒絕訪(fǎng)問(wèn)此 Web 服務(wù)-yum -y groupinstall web* -y vim /etc/httpd/conf/http.conf查找關(guān)鍵字ServerNameServerName system1.rhce.cc:80wget -O /var/www/html/index.html http:/rhgls.rhce.cc/materials/station.htmlfirewall-cmd-add-rich-rule rule family=ipv4 source address=/24 service name=http acceptfirewall-cmd-add-rich-rule rule family=ipv4 source address=/24 service name=http accept -permanentsystemctl start httpd systemctl enable httpd注:模擬考試環(huán)境的物理機(jī)環(huán)境還需要配置/etc/resolv.confnameserver 0systemctl restart network 生效物理機(jī)訪(fǎng)問(wèn) http/:system1.rhce.cc13. 配置安全 web 服務(wù)為 站 點(diǎn) http:/system1.rhce.cc 配 置 TLS 加 密 一 個(gè) 已 簽 名 證 書(shū) 從http:/host.rhce.cc/materials/system1.crt 獲 取 此 證 書(shū) 的 密 鑰 從http:/host.rhce.cc/materials/system1.key 獲 取 此 證 書(shū) 的 簽 名 授 權(quán) 信 息 從http:/host.rhce.cc/materials/domain11.crt 獲取cp /usr/share/doc/httpd-2.4.6/httpd-vhosts.conf /etc/httpd/conf.d/vhost.confvim /etc/httpd/conf.d/vhost.conf刪除掉文件內(nèi)容,編輯成如下內(nèi)容光標(biāo)在第一行 4yy 復(fù)制4行內(nèi)容按p粘貼先保存退出在物理機(jī)重新遠(yuǎn)程system1rootlocalhost # ssh rootsystem1.rhce.ccrootsystem1 # cd /etc/httpd/conf.d/查找ssl.conf文件rootsystem1 conf.d# lsautoindex.conf manual.conf ssl.conf vhost.conffcgid.conf README userdir.conf welcome.confrootsystem1 conf.d# vim ssl.conf把SSLEngine on 改為SSLEngine off然后復(fù)制SSLEngine off到原來(lái)的終端 的/etc/httpd/conf.d/vhost.conf內(nèi)容中并把SSLEngine off改成SSLEngine on 端口改成443繼續(xù)在ssl.conf中查找SSLCertificateFileSSLCertificateFile /etc/pki/tls/certs/localhost.crtSSLCertificateKeyFile /etc/pki/tls/private/localhost.keySSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt復(fù)制到/etc/httpd/conf.d/vhost.conf中在host上:準(zhǔn)備拿題目中的KEY但是因?yàn)榄h(huán)境問(wèn)題需要進(jìn)入host改權(quán)限cd /var/www/html/materialsls lchmod 644 domain11.crt system1.*在system1上:mkdir /cacd /ca 進(jìn)到CA目錄 并下載證書(shū)文件wget http:/host.rhce.cc/materials/system1.crtwget http:/host.rhce.cc/materials/system1.keywget http:/host.rhce.cc/materials/domain11.crt編輯虛擬機(jī)證書(shū)文件:vim /etc/httpd/conf.d/vhost.conf更改證書(shū)路徑:SSLCertificateFile /ca/system1.crt SSLCertificateKeyFile /ca/system1.key SSLCertificateChainFile /ca/domain11.crt更改上下文:chcon R reference=/var/www/html /ca添加防火墻富規(guī)則:firewall-cmd -add-rich-rule rule family=ipv4 source address=/24 service name=https acceptfirewall-cmd -add-rich-rule rule family=ipv4 source address=/24 service name=https accept -permanent重啟httpd服務(wù)systemctl restart httpd物理機(jī)訪(fǎng)問(wèn)https:/system1.rhce.cc注:restorecon -R /var/www/html可以恢復(fù)SELINUX的安全上下文14. 配置虛擬主機(jī)在 system1 上擴(kuò)展您的 web 服務(wù)器, 為站點(diǎn) http:/www.rhce.cc 創(chuàng)建一個(gè)虛擬主機(jī), 然后執(zhí)行下述步驟:設(shè)置 DocumentRoot 為 /var/www/virtual從 http:/rhgls.rhce.cc/materials/www.html下載文件并重命名為 index.html 不要對(duì)文件 index.html 的內(nèi)容做任何修改將文件 index.html 放到虛擬主機(jī)的 DocumentRoot 目錄下確保 andy 用戶(hù)能夠在 /var/www/virtual 目錄下創(chuàng)建文件注意: 原始站點(diǎn) http:/system1.rhce.cc 必須仍然能夠訪(fǎng)問(wèn), 名稱(chēng)服務(wù)器 rhce.cc 提供對(duì)主機(jī)名 www.rhce.cc 的域名解析-mkdir /var/www/virtualwget -O /var/www/virtual/index.html http:/rhgls.rhce.cc/materials/www.htmlls -ldZ /var/www/virtual 查看上下文是否正確restorecon -R /var/www/virtualvim /etc/httpd/conf.d/vhost.conf 新增如下一段因?yàn)樾陆艘粋€(gè)根目錄需要修改權(quán)限從 /etc/httpd/conf/httpd.conf 找到granted,并復(fù)制如下一段,再回到vim /etc/httpd/conf.d/vhost.conf中 粘貼,并修改虛擬主機(jī)目錄路徑保存退出。systemctl restart httpd測(cè)試http:/system1.rhce.cchttps:/system1.rhce.ccwww.rhce.cc確保 andy 用戶(hù)能夠在 /var/www/virtual 目錄下創(chuàng)建文件setfacl -m u:andy:rwx /var/www/virtual測(cè)試andy是否能讀寫(xiě)cd /var/www/virtual/touch aa15. 配置 web 內(nèi)容的訪(fǎng)問(wèn)在您的 system1 上的 web 服務(wù)器的 DocumentRoot 目錄下 創(chuàng)建一個(gè)名為 secret 的目錄,要求如下:從 http:/rhgls.rhce.cc/materials/private.html 下載一個(gè)文件副本到這個(gè)目錄, 并且重命名為 index.html。不要對(duì)這個(gè)文件的內(nèi)容做任何修改。從 system1 上, 任何人都可以瀏覽 secret 的內(nèi)容, 但是從其它系統(tǒng)不能訪(fǎng)問(wèn)這個(gè)目錄的內(nèi)容-主機(jī)DocumentRoot目錄創(chuàng)建一個(gè)mkdir /var/www/html/secret虛擬主機(jī)DocumentRoot目錄創(chuàng)建一個(gè)mkdir /var/www/virtual/secretwget O /var/www/html/secret/index.html http:/rhgls.rhce.cc/materials/private.htmlwget O /var/www/virtual/secret/index.html http:/rhgls.rhce.cc/materials/private.html從 system1 上, 任何人都可以瀏覽 secret 的內(nèi)容, 但是從其它系統(tǒng)不能訪(fǎng)問(wèn)這個(gè)目錄的內(nèi)容編輯vim /etc/httpd/conf.d/vhost.conf復(fù)制權(quán)限一段 4yy,再粘貼,修改目錄路徑,修改require 為localsystemctl restart httpd在system1測(cè)試curl -s http:/system1.rhce.cc/secret/index.htmlcurl -s http:/system1.rhce.cc/secret/index.htmlcurl -s http:/www.rhce.cc/secret/index.html是否為private在system2測(cè)試 應(yīng)該顯示403 Forbiddencurl -s http:/system1.rhce.cc/secret/index.htmlcurl -s http:/system1.rhce.cc/secret/index.html16. 實(shí)現(xiàn)動(dòng)態(tài) Web 內(nèi)容在 system1 上配置提供動(dòng)態(tài) Web 內(nèi)容, 要求如下:老段工作室 www.rhce.cc動(dòng)態(tài)內(nèi)容由名為 dynamic.rhce.cc 的虛擬主機(jī)提供虛擬主機(jī)偵聽(tīng)在端口 8998從 http:/rhgls.rhce.cc/materials/webapp.wsgi 下載一個(gè)腳本, 然后放在適當(dāng)?shù)奈恢茫?無(wú)論如何不要求修改此文件的內(nèi)容客戶(hù)端訪(fǎng)問(wèn) http:/dynamic.rhce.cc:8998/ 時(shí) 應(yīng)該接收到動(dòng)態(tài)生成的 web 頁(yè)面此 http:/dynamic.rhce.cc:8998/ 必須能被 rhce.cc 域內(nèi)的所
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 廣州民航職業(yè)技術(shù)學(xué)院《總譜讀法》2023-2024學(xué)年第二學(xué)期期末試卷
- 鄭州信息工程職業(yè)學(xué)院《spss大數(shù)據(jù)分析》2023-2024學(xué)年第二學(xué)期期末試卷
- 修繕工程施工合同
- 大型不銹鋼廣告牌施工合同
- 工程代建服務(wù)合同書(shū)
- 建筑工程合作合同協(xié)議書(shū)
- 商業(yè)活動(dòng)策劃與執(zhí)行合同書(shū)及付款方式說(shuō)明
- 房地產(chǎn)交接合同協(xié)議書(shū)
- 增資擴(kuò)股協(xié)議書(shū)合同
- 酒店物業(yè)管理合同書(shū)
- 北師大版心理健康六年級(jí)上冊(cè)第十四課欣賞我自己 課件
- 小班語(yǔ)言繪本《報(bào)紙上的洞洞》
- 河北石家莊旅游PPT介紹石家莊幻燈片模板
- 宴席設(shè)計(jì)與菜品開(kāi)發(fā)第二版勞動(dòng)版宴席菜肴與菜單設(shè)計(jì)課件
- 2023學(xué)年完整公開(kāi)課版積極情緒
- 軸向拉壓桿的強(qiáng)度計(jì)算
- 安徽寶鎂輕合金有限公司年產(chǎn)30萬(wàn)噸高性能鎂基輕合金項(xiàng)目環(huán)境影響報(bào)告書(shū)
- 2160kn溢洪道雙向門(mén)機(jī)安裝使用說(shuō)明書(shū)
- 振動(dòng)篩安裝作業(yè)指導(dǎo)書(shū)
- 正弦交流電的-產(chǎn)生
- 《教育學(xué)原理》教材第一章-教育及其本質(zhì)課件
評(píng)論
0/150
提交評(píng)論