制作習題rhce模擬練習_第1頁
制作習題rhce模擬練習_第2頁
制作習題rhce模擬練習_第3頁
制作習題rhce模擬練習_第4頁
制作習題rhce模擬練習_第5頁
已閱讀5頁,還剩36頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

RHCEv2.0::YUM: #rht-vmctlrestartall sshroot@server0-X[root@server0~]#getensshroot@desktop0-X[root@desktop0~]#geten如果selinuxvim/etc/selinux/config配置server0和desktop0上的控制,域中的主機因題意可知 配置server0和desktop0配置自定義命令psnew,執(zhí)行該命令是將執(zhí)行psAoaliaspsnew="ps-Ao [root@server0~]#vim/etc/profile[root@server0~]#./etc/profile /smb1,共享名smb1,僅允域中主機。samba用戶ldapuser1可以,tianyun;desktop0自動掛接環(huán)境準備:labnfskrb5setup[root@server0~]yumyinstallsamba [root@server0~]mkdir [root@server0~]#semanagefcontext-a-tsamba_share_t"/smb1(/.*)?"[root@server0~]#restorecon-RFvv/smb1配置放行[root@server0~]#setfacl-mu:ldapuser1:rx/smb1[root@server0~]#vim/etc/samba/smb.confworkgroup=STAFFpath=hostsallow=環(huán)境準備:labnfskrb5[root@desktop0~]#yum-yinstall [root@desktop0~]#vim 00[root@desktop0~]#mkdir/mnt/smb1[root@desktop0~]#mount-a 僅允許用戶ldapuser1,ldapuser2讀寫,都為tianyun;desktop0以multiuser方式自動掛接[root@server0~]#setfacl-mu:ldapuser1:rx/smb2[root@server0~]#setfacl-mu:ldapuser2:rwx/smb2[root@server0~]#vim/etc/samba/smb.confpath=validusers=ldapuser1ldapuser2writelist=ldapuser2[root@server0~]systemctlrestartsmbnmb[root@desktop0~]#vim defaults,username=ldapuser2,password=tianyun,multiuser00[root@desktop0~]#mount–a 域中主機;desktop0自動掛載[root@server0~]#vim [root@server0~]#mkdir設(shè)置策略[root@desktop0~]#systemctlrestartnfs[root@desktop0~]#vim/etc/fstab defaults00[root@desktop0~]#mount-

[root@server0~]#wget /pub/keytabs/server0.keytab-O[root@server0~]#vim [root@server0~]#mkdir/nfs2[root@server0~]#mkdir[root@server0~]#chown-Rldapuser5:ldapuser5[root@server0~]#vim/etc/sysconfig/nfsFSDARGS="-V4.2"[root@desktop0~]#wget/pub/keytabs/desktop0.keytab-[root@desktop0~]#vimdefaults,sec=krb5p,v4.20[root@desktop0~]#mount-驗證方式:sshldapuser5@localhost[root@desktop0~]#sshldapuser5@localhost[ldapuser5@desktop0~]$cd/mnt/nfs2/private/[ldapuser5@desktop0private]$touch1.xserver0:desktop0:[root@server0~]#nm-connection-[root@server0~]#systemctlrestart配置server0端口轉(zhuǎn)發(fā),從/24網(wǎng)段server0端口6666/tcp時,轉(zhuǎn)發(fā)到本地的22/tcp[root@server0~]#firewall-config注意重啟配置server0和desktop0上的IPv6,使用接口eth0,相互可以通,原IPv4仍然有效server0:20X:ac18::1205/64desktop020X:ac18::120a/64 [root@server0~]#nm-connection-[root@server0~]#systemctlrestart[root@server0~]#yum-yinstall[root@server0~]vim myhostnamemyhostname=myorigin=relayhost=[]inet_interfaces=loopback-mydestinationlocal_transport=error:localmaildeliveryis[root@server0~]#systemctlrestartserver0配置iscsitarget,卷san10,大小為1G,iscsitarget名為.tianyun:server,僅允許de 主機;desktop0配置iscsiinitiator,創(chuàng)[root@server0~]#fdiskn---->p---->1----->----- [root@server0~]#yum-yinstall[root@server0~] [root@server0~]#/>/backstores/blockcreatesan1/>/iscsi /iscsi/iqn.20...n:server/tpg1>acls/ /iscsi/iqn.20...n:server/tpg1>luns/create/iscsi/iqn.20...n:server/tpg1>portals/create/iscsi/iqn.20...n:server/tpg1>配置[root@desktop0~]#yum-yinstalliscsi*[root@desktop0~]#vim/etc/iscsi/initiatorname.iscsi [root@desktop0~]#iscsiadm--modediscoverydb--typesendtargets--portalserver0-- 重啟服務(wù)以掛接[root@desktop0~]#partprobe[root@desktop0~]#mkfs.ext4/dev/sda1[root@desktop0~]#mkdir _netdev00[root@desktop0~]#mount–a配置server0Web服務(wù), 。域。網(wǎng)頁文件: /content/exam/webs/注:命名為index.,勿修改網(wǎng)頁內(nèi)容因為考試環(huán)境沒有b文件,從主機進行[root@foundation0Desktop]#scp- RHCE/webs/[root@server0~]#yum-yinstall[root@server0~]yumyinstallmod_sslmod_wsgi[root@server0~]#systemctlenablehttpd[root@server0~]#systemctlstarthttpd設(shè)置策略[root@server0~]#cd/etc/httpd/conf.d/[root@server0conf.d]#vim <Directory"/var/www/html">AllowOverrideNoneRequireallRequirenotip<VirtualHostRoot/var/www/html部署文件[root@server0~]#cp [root@server0conf.d]#systemctlrestart測試配置server0Web服務(wù), TLSprivatekeyTLSCA [root@server0conf.d]#mkdirtls[root@server0conf.d]#cdtls/[root@server0tls]#pwd:wgetwgetwget[root@server0conf.d]# <DirectoryAllowOverrideRequireallRequirenotip<VirtualHostRoot/var/www/htmlSSLEngineonSSLProtocolall-SSLv2SSLCipherSuiteSSLHonorCipherOrder File KeyFile ChainFile/etc/httpd/conf.d/tls/example-[root@server0conf.d]#systemctlrestarthttpdwget 配置server0Web服務(wù), ,為網(wǎng)頁文件: /pub/webs/server.html [root@server0conf.d]#mkdir[root@server0conf.d]#cp/root/webs/server.html[root@server0conf.d]#cp .confs [root@server0conf.d]#vims <Directory"/var/www/virtual">AllowOverrideNoneRequireallgranted<VirtualHostRoot/var/www/virtualServerNames[root@server0conf.d]#systemctlrestart配置server0Web服務(wù), ,端口為Pythonapplication /content/exam/webs/webapp.wsgi創(chuàng)建 ,部署默認文檔[root@server0conf.d]#mkdir[root@server0conf.d]#cp/root/webs/*.wsgi[root@server0conf.d]#cps [root@server0conf.d]#vim Listen<Directory"/var/www/webapp">AllowOverrideNoneRequireall<VirtualHostRoot/var/www/webappServerNamewWSGIScriptAlias/[root@server0conf.d]#journalctl更改selinux[root@server0conf.d]#semanageport-a-thttp_port_t-ptcp8888[root@server0conf.d]#systemctlrestarthttpd設(shè)置允許8888端口通訊配置server0Web服務(wù),http://s 網(wǎng)頁文件: /content/exam/webs/private.html[root@server0conf.d]#mkdir[root@server0conf.d]#cp/root/webs/private.html/var/www/virtual/private/index.html[root@server0conf.d]#restorecon-RF/var/www/修改 .conf文<Directory AllowOverride Require<DirectoryAllowOverrideNoneRequireallgranted<VirtualHostRoot/var/www/virtualServerNames[root@server0conf.d]#systemctlrestart在本地在desktop0問配置server0S 執(zhí)行/root/script1.shfoo,輸出bar執(zhí)行/root/script1.shbar輸出if[$#-eq0if[$#-eq0echo"Usage/root/script1.shif[$1=="foo"echoelif[$1=="bar"echoecho"Usage/root/script1.sh配置server0 script: [root@server0~]#vimif[$#-eq0-o!-e$1echo"error:Lackofuserfiles"exit2foriin$(cat$1)useradd-s/bin/falseecho"user$iAdded配置server0Mariadb安裝配置root戶只能從本地登錄,為禁用用創(chuàng)建數(shù)據(jù)庫導入數(shù)據(jù)到 /content/exam/mariadb/mariadb.dumpLuigi用戶可以從本地以select方式數(shù)據(jù)庫Concats中的表,tianyun[root@server0~]#yum-ygroupinstallmariadb[root@server0~]#/usr/bin/mysql_secure_installation:/usr/bin/mysql_secure_installation:line379::commandnotNOTE:RUNNINGALLPARTSOFTHISSCRIPTMENDEDFORALLSERVERSINPRODUCTION PLEASEREADEACHSTEPInordertologintoMariaDBtosecureit,we'llneedthepasswordfortherootuser. Ifyou'vejustinstalledMariaDB,andyouhaven'tsettherootpasswordyet,thepasswordwillbeblank,soyoushouldjustpressenterEntercurrentpasswordforroot(enterfornone):OK,successfullyusedpassword,movingon...SettingtherootpasswordensuresthatnobodycanlogintotheMariaDBrootuserwithouttheproperauthorisation.Setrootpassword?[Y/n]yNewpassword:Re-enternewpassword:Passwordupdatedsuccessfully!Reloadingprivilegetables.....Bydefault,aMariaDBinstallationhasananonymoususer,allowinganyonetologintoMariaDBwithouthavingtohaveauseraccountcreatedfor Thisisintendedonlyfortesting,andtomaketheinstallationgoabitsmoother. Youshouldremovethembeforemovingintoaproductionenvironment.Removeanonymoususers?[Y/n]...Normally,rootshouldonlybeallowedtoconnectfrom'localhost'. ensuresthatsomeonecannotguessattherootpasswordfromthenetwork.Disallowrootlog

溫馨提示

  • 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)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論