Upload
raj-shukla
View
236
Download
0
Embed Size (px)
Citation preview
7/22/2019 Rhce Question and Answer
1/27
If you want to abuse complaints, please go to Baidu library Complaint Center ; like to ask aquestion or comment feature suggestions, please click here for feedback.R H C E 6 exam test questions library and A. Case ( 2 0 1 3 . 1 2 months most newamendment changed version )(4 Evaluation) | 381 people read | 67 times Download |Report DocumentsFor the former there 's into line the wrong error repair changed , added plus of a few simplesingle- note interpretation , parties will manage solution
1/16
RHCSAOfficially doneRHCSAAgo, includes 1In accordance with the requirements of the subject, to enter single-user mode to modifyroot
Password1) Press any key to boot2) Press e3) Then select the kernel Press e
4) Tail added 1, Enter5) Press b Into single-user mode6) Use runlevel View is running in single-user mode7) Use getenforece View status
8) Use setenforce 0 Instead permission Mode9) passwd Change Password
10)
exitExit without restart
2,
Configure the network information
1)
Will
/ Etc / init.d / NetworkManager stopThis service is disabled
2)
chkconfig NetworkManager offTurn off power automatically start
3)
iptables
7/22/2019 Rhce Question and Answer
2/27
-FEmpty firewall
4)
service iptables saveAfter the firewall modifications must be saved
5)
setupModify network information, selectNetwork configuration6)
SelectDNS configurationModifyhostname
And the mainDNS7)
SelectDevice configurationModifyeth0Ofip,
netmask,GWLordDNS8)
service network restart
After the restart modify network information card
9)
ping host.domain90.example.comTesting canpingThrough
10)
7/22/2019 Rhce Question and Answer
3/27
host host.domain90.example.comTestDNSCan resolved
3,
Additional Information
1)
System is based onDNSDomaindomain90.example.com
Membership runs.InDNSDomain
domain90.example.comAll systems areIs part of172.24.90.0/255.255.255.0This subnet, the subnet belong to this domain
2)Hostname: station.domain90.example.com3)IP address: 172.24.90.104)Netmask: 255.255.255.05)
Gateway: 172.24.90.2546)
Name server: 172.24.90.2547)
Virtual system usedroot
The password isnimsdreg4
,
Examination by
ssh
-
7/22/2019 Rhce Question and Answer
4/27
XConnected to the virtual systems do title
RHCSAExam
Use on a physical machine
-XConnect to a virtual machine, be doing title
1,
Configure your system to use the default source. A
YUMSource has been provided inhttp://server.domain90.example.com/pub/x86_64/Server,Configure your system
Use this address as the default source
Answer:
cd / etc / yum.repos.d /
#Open
vim aa.repo
#Createrepo
, The name of free
7/22/2019 Rhce Question and Answer
5/27
name = aa
baseurl = http://server.domain90.example.com/pub/x86_64/Server
enabled = 1
gpgcheck = 0
2/
16
yum clean all
#Empty the cache
yum install system-config-lvm-y
#Installation Testing
yumSource, while the title for the next use
2,
Adjust the size of the logical volume.
Logical adjustmentvoSize,
It's the size of the file system should be290M.To ensure that the contents of the file system is still intact.NOTE: Partition rarely precise requirements to the same size, so the range
260MTo320M
7/22/2019 Rhce Question and Answer
6/27
Between acceptable.
Answer:
system-config-lvm
#Into graphical modifications
Select the logical view---
Select Edit Properties
3,
Create a user account. Create the following users, groups and group memberships:
a)
Name ofsharegrpThe group
b)
UsernatashaUsesharegrpAs a subsidiary of the group
c)
UserharryAlso usedsharegrpAs a subsidiary of the group
d)
7/22/2019 Rhce Question and Answer
7/27
Usersarah, Can not access the system can interactshellAnd notsharegrpMembernatasha,
harry,sarahPasswords arenimsdregAnswer:
groupadd sharegrp
#Add Group
useradd-G sharegrp natasha
#To
natashaAdd to subsidiariessharegrpGroup
useradd-
G sharegrp harry
#ToharryAdd to subsidiariessharegrp
Group
7/22/2019 Rhce Question and Answer
8/27
useradd-s / sbin / nologin sarah
#Add users, and setshell
passwd natasha
#Set Password
passwd harry
passwd sarah
4,
Configuration/ Var / tmp / fstabPermission. Copy the file/ Etc / fstabTo/ Var / tmp / fstab
. Configuration/ Var / tmp / fstabPermissions are as follows:
a)
File/ Var / tmp / fstab
The owner isrootb)
File/ Var / tmp / fstabBelongroot
Group
7/22/2019 Rhce Question and Answer
9/27
3/
16
c)
File/ Var / tmp / fstab
Can not be executed by any user
d)
UsernatashaReadable and writable
/ Var / tmp / fstabe)
User
harryNeither read nor write/ Var / tmp / fstabf)
All other users (present and future) has read/ Var / tmp / fstabAbility
Answer:
Use access control lists
setfacl-m u: natasha: rw-/ var / tmp / fstabsetfacl-m u: harry: --- / var / tmp / fstab
5,
ConfigurationcronTasks. Usernatasha
You must configure acron job, Local daily
7/22/2019 Rhce Question and Answer
10/27
14:23Run,
Execution:* / Bin / echo hiyaAnswer:
crontab-
e-u natasha23 14 *** / bin / echo hiya
#
Use "i"Insert editing, use the": X
"Finished editing
crontab-l-u natasha
#Verification
6,
Create a shared directory. Create a collaborative directory/ Home / shared, So that it has the following characteristics:
a)
/ Home / sharedGroup belongs
sharegrpb)
7/22/2019 Rhce Question and Answer
11/27
This directory for groupsharegrpThe members have readable, writable and executable, but not for any other user:(root
You can access the systemAll files and directories)
c)
In/ Home / sharedAny file belongs to the group created automatically set to the nextsharegrpAnswer:
mkdir / home / shared
#Create a directory
ls-ld / home / shared
#View the properties of the directory
chgrp sharegrp / home / shared
#Change belongs to the group of the directory
sharegrpchmod g+ w / home / shared
#To the directory group, increasedwCompetence
chmod o-rx / home / shared
7/22/2019 Rhce Question and Answer
12/27
#The other deletedrxCompetence
chmod g+ s / home / shared
#
Implemented in any file belongs to the group of the directory created automatically set tosharedgrp
7,
Installing the kernel update.
Fromftp://server.domain90.example.com/pub/updatesInstall the appropriate kernel update.The following requirements must be met:
a)
Updated kernel as the default kernel boot
b)
The original is still valid and bootable kernel at boot time
Answer:
yum install firefox-y
#Installation
firefoxkill -9 3816
#
During the installationyumProcess, appeared
7/22/2019 Rhce Question and Answer
13/27
3816Lead to an unsuccessful installation process runs through the commandpid 3816The process is closed. If it still fails to install, you can try to restart the computer, but toensure that the subject has been saved before
firefox
#OpenfirefoxIn
firefoxThe subject of the address bar URL provided,Then open the page in two cores downloaded,Select Save Link As,
Save torootHome directory
rpm-ivh kernel-*
#
InrootHome directory under execution, upgrade the kernel, the command is to upgrade the kerneland the preservation of the originalNuclear
vim / boot / grub / grub.conf
#Check whether the kernel update, there are new kernel and the kernel on
uname-r
7/22/2019 Rhce Question and Answer
14/27
#View the kernel's name
8,
Bind an external authentication service. System
host.domain90.example.comProvides aLDAPAuthentication service, your system should be based on the followingThe requirement to bind to this service:
a)
Authentication service benchmarkDNBe
dc = domain90,,dc = example,,dc = comAnnotation[Li1]:
This displays the currently running versionThis can be verified after the restart, etc.
4/
16
b)
LDAPUsed to provide account information and authentication information
c)
Located connection should be usedftp://host.domain90.example.com/pub/domain90.crtCertificate Encryption
Note: When properly configured,ldapuser90
7/22/2019 Rhce Question and Answer
15/27
You can log on to your system, but no home directory
Until you completeautofsTopicldapuser90OfThe password is'
password'
Answer:
wgetftp://host.domain90.example.com/pub/domain90.crt
#Download the certificate, ifwget
Command is not installed, useyum install wgetInstallation
setup
#Use the dialog box operation
Select Authentication Configuration
Select the User InformationLDAP
And verification of informationLDAPFill in the server
ldap :/ / host.domain90.example.com
#URLs can be pasted directly, but must add agreement
Baseline information to fill
7/22/2019 Rhce Question and Answer
16/27
dc = domain90, dc = example, dc = com
#You can paste directly from the subject of the request
Select the UseTLSDownload a copy of the completed certificate to the address of the pop-up prompt dialog box
id ldapuser90
#Check if the user exists
9,
ConfigurationNTP. Configure your system so that it isserver.domain90.example.comANTPClient
Answer:
system-config-data
#Use graphical interface settings
In the open interface
Select
The date and time synchronization on network
The originalNTPServer deletes (public network)
7/22/2019 Rhce Question and Answer
17/27
Click
Add
Enterserver.domain90.example.com
10,
ConfigurationautofsAutomatically mountLDAP
The user's home directory, the following requirements:
a)
host.domain90.example.com (172.24.90.250)UseNFSShared/ NetdirTo your system. This file system contains pre-Set a good userldapuser90Home directory
b)
ldapuser90The home directory ishost.domain90.example.com :/ netdir/ldapuser90c)
ldapuser90The home directory should automatically mount to the local
/ NetdirThe following/ Netdir/ldapuser90
d)
Home directory must have write access to the user
e)
ldapuser90The password is
7/22/2019 Rhce Question and Answer
18/27
'password'
Answer:
vim / etc / auto.master
/ -
/ Etc / auto.aa
#In/ Misc
Add this line belowIf it is written/ Netdir
/ Etc / auto.aa,Then the followingauto.aaWill be writtenldapuser90
cp / etc / auto.misc
/ Etc / auto.aa
#Copy
vim / etc / auto.aa
#Editor
/ Netdir/ldapuser90
7/22/2019 Rhce Question and Answer
19/27
-fstype = nfs, rw host.domain90.example.com :/ netdir/ldapuser90
#IncdThe following join,IfRequirements set
autofsVersionvers = 3, ThenrwAfter inserting
vers = 3
service autofs restart
#RestartautofsService
su-
ldapuser90
#Validation switch toldapuser90
To see if a home directory
df-h
7/22/2019 Rhce Question and Answer
20/27
#Verify to see if the mount successful
chkconfig autofs on
#Set boot
11,
ConfigurationFTPAccess. As
station.domain90.example.comImplementftpService that allowsanonymousFrom/ Var / ftp / pubDownload file
Answer:
Annotation[Li2]:Note the examination requirements
5/
16
yum install vsftpd
-y
#Installationftp
7/22/2019 Rhce Question and Answer
21/27
Service
service vsftpd start
#Start the service
chkconfig vsftpd on
#
Set boot
touch / var / ftp / pub / aa.txt
#Create oneaa.txtFor test use
In the physical machine browser input
ftp:// station.domain90.example.com/pub /
, And then download the file
#TestftpNormal,
CanNo download file
12,
Implementing awebServer. For the site
7/22/2019 Rhce Question and Answer
22/27
http://station.domain90.example.comImplementing awebServices, then complete the followingSteps:
a)
Download
ftp://server.domain90.example.com/pub/rhcsa/station.html
b)
Rename the downloaded file
As
index.htmlc)
Copy
index.htmlTo youwebServicesDocumentRootDirectory
d)
Do notindex.html
The contents of any changes
Answer:
yum install httpd \ *-y
#Installation
webService
vim / etc / httpd / conf / httpd.conf
#Editor
7/22/2019 Rhce Question and Answer
23/27
ServerName station.domain90.example.com: 80#ModificationServerNameOK, read this
service httpd restart
#Restart Service
chkconfig httpd on
#Set boot
wgetftp://server.domain90.example.com/pub/rhcsa/station.html
#Download the file
mv station.html / var / www / html / index.html
#Renamed and moved to the specified directory
restorecon
-R / var / www / html /
Test, enter the URL on a physical machinehttp://station.domain90.example.com
Note:
7/22/2019 Rhce Question and Answer
24/27
restoreconCommand andchconSimilar commands, but it is based on current policy settings the default file context files anddocuments relating to the object of securityHereinafter, therefore, the user does not specify a security context, on the contrary,restoreconUse file context file entries that match the file name, and then applySpecific security context, in some cases, it is to restore the correct security context
13,
Configure user accounts. Create a user
aclan,uid
As3895. The password for the usernimsdreg.
Answer:
useradd-
u 3895 aclan
#-UIs setuidNo.
3895Addaclan
User
passwd aclan
7/22/2019 Rhce Question and Answer
25/27
#Set Password
14,
Adding a
swapPartition. On your system to add an extra size756MSwap, the swap partition at bootIt should be able to automatically mount. Do not remove, and change the existing swappartition on your system.
Answer:
dd if = / dev / zero of = file bs = 1M count = 756
#Generating a size756MFile
mkswap file
swapon file
vim / etc / fstab
#Edit the files, settings automatically mount
/ Root / fileswap
swapdefaults00
#Insert the statement in the final set to mount
cat / proc / swaps
7/22/2019 Rhce Question and Answer
26/27
#Validation check will find the newfile. Also availablefree-
lOrswapon-sVerification
15,
Find the file. Identify all owners arejuliaFiles and copy them to/ Root / findresultsCatalog.
Answer:
mkdir / root / findresults
#CreatefindresultsFolder
find /-user julia-exec cp
-a {} / root / findresults / \;
#Find
/Next,Users
7/22/2019 Rhce Question and Answer
27/27
juliaDocumentAnd copied to/ Root / findresultsAnnotation[Li3]:
Context