0% found this document useful (0 votes)
470 views27 pages

Rhce Question and Answer

This document provides instructions for completing the RHCSA exam on a virtual machine. It includes steps to: 1) Modify the root password and enter single-user mode. 2) Configure networking and test connectivity. 3) Provide additional system information. 4) Connect to the virtual machine over SSH to begin the exam tasks.

Uploaded by

Raj Shukla
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
470 views27 pages

Rhce Question and Answer

This document provides instructions for completing the RHCSA exam on a virtual machine. It includes steps to: 1) Modify the root password and enter single-user mode. 2) Configure networking and test connectivity. 3) Provide additional system information. 4) Connect to the virtual machine over SSH to begin the exam tasks.

Uploaded by

Raj Shukla
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 27

If you want to abuse complaints, please go to Baidu library Complaint Center ; like to ask a question 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 new amendment changed version ) (4 Evaluation) | 381 people read | 67 times Download |Report Documents For the former there 's into line the wrong error repair changed , added plus of a few simple single- note interpretation , parties will manage solution 1/16 RHCSA Officially done RHCSA Ago, includes 1 In accordance with the requirements of the subject, to enter single-user mode to modify root Password 1) Press any key to boot 2) Press e 3) Then select the kernel Press e 4) Tail added 1, Enter 5) Press b Into single-user mode 6) Use runlevel View is running in single-user mode 7) Use getenforece View status 8) Use setenforce 0 Instead permission Mode 9) passwd Change Password 10) exit Exit without restart 2 , Configure the network information 1) Will / Etc / init.d / NetworkManager stop This service is disabled 2) chkconfig NetworkManager off Turn off power automatically start 3) iptables

F Empty firewall 4) service iptables save After the firewall modifications must be saved 5) setup Modify network information, select Network configuration 6) Select DNS configuration Modify hostname And the main DNS 7) Select Device configuration Modify eth0 Of ip , netmask , GW Lord DNS 8) service network restart After the restart modify network information card 9) ping host.domain90.example.com Testing can ping Through 10)

host host.domain90.example.com Test DNS Can resolved 3 , Additional Information 1) System is based on DNS Domain domain90.example.com Membership runs. In DNS Domain domain90.example.com All systems are Is part of 172.24.90.0/255.255.255.0 This subnet, the subnet belong to this domain 2)Hostname: station.domain90.example.com 3)IP address: 172.24.90.10 4)Netmask: 255.255.255.0 5) Gateway: 172.24.90.254 6) Name server: 172.24.90.254 7) Virtual system used root The password is nimsdreg 4 , Examination by ssh [email protected] -

X Connected to the virtual systems do title

RHCSA Exam Use on a physical machine ssh [email protected] X Connect to a virtual machine, be doing title 1 , Configure your system to use the default source. A YUM Source has been provided in http://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

# Create repo , The name of free

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 yum Source, while the title for the next use

2 , Adjust the size of the logical volume. Logical adjustment vo Size, It's the size of the file system should be 290M . To ensure that the contents of the file system is still intact. NOTE: Partition rarely precise requirements to the same size, so the range 260M To 320M

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 of sharegrp The group b) User natasha Use sharegrp As a subsidiary of the group c) User harry Also used sharegrp As a subsidiary of the group d)

User sarah , Can not access the system can interact shell And not sharegrp Member natasha , harry , sarah Passwords are nimsdreg Answer:

groupadd sharegrp

# Add Group

useradd G sharegrp natasha # To natasha Add to subsidiaries sharegrp Group

useradd G sharegrp harry

# To harry Add to subsidiaries sharegrp Group

useradd s / sbin / nologin sarah # Add users, and set shell passwd natasha

# Set Password

passwd harry passwd sarah 4 , Configuration / Var / tmp / fstab Permission. Copy the file / Etc / fstab To / Var / tmp / fstab . Configuration / Var / tmp / fstab Permissions are as follows: a) File / Var / tmp / fstab The owner is root b) File / Var / tmp / fstab Belong root Group

3 / 16 c) File / Var / tmp / fstab Can not be executed by any user d) User natasha Readable and writable / Var / tmp / fstab e) User harry Neither read nor write / Var / tmp / fstab f) All other users (present and future) has read / Var / tmp / fstab Ability Answer: Use access control lists setfacl m u: natasha: rw-/ var / tmp / fstab setfacl m u: harry: --- / var / tmp / fstab 5 , Configuration cron Tasks. User natasha You must configure a cron job , Local daily

14:23 Run, Execution: * / Bin / echo hiya Answer: crontab e u natasha 23 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 / shared Group belongs sharegrp b)

This directory for group sharegrp The members have readable, writable and executable, but not for any other user: ( root You can access the system All files and directories) c) In / Home / shared Any file belongs to the group created automatically set to the next sharegrp Answer: 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 sharegrp chmod g+ w / home / shared

# To the directory group, increased w Competence chmod o-rx / home / shared

# The other deleted rx Competence chmod g+ s / home / shared # Implemented in any file belongs to the group of the directory created automatically set to sharedgrp 7 , Installing the kernel update. From ftp://server.domain90.example.com/pub/updates Install 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 firefox kill -9 3816

# During the installation yum Process, appeared

3816 Lead to an unsuccessful installation process runs through the command pid 3816 The process is closed. If it still fails to install, you can try to restart the computer, but to ensure that the subject has been saved before firefox

# Open firefox In firefox The subject of the address bar URL provided, Then open the page in two cores downloaded, Select Save Link As, Save to root Home directory rpm ivh kernel-*

# In root Home directory under execution, upgrade the kernel, the command is to upgrade the kernel and the preservation of the original Nuclear vim / boot / grub / grub.conf

# Check whether the kernel update, there are new kernel and the kernel on uname r

# View the kernel's name

8 , Bind an external authentication service. System host.domain90.example.com Provides a LDAP Authentication service, your system should be based on the following The requirement to bind to this service: a) Authentication service benchmark DN Be dc = domain90 , , dc = example , , dc = com Annotation [Li1]: This displays the currently running version This can be verified after the restart, etc.

4 / 16 b) LDAP Used to provide account information and authentication information c) Located connection should be used ftp://host.domain90.example.com/pub/domain90.crt Certificate Encryption Note: When properly configured, ldapuser90

You can log on to your system, but no home directory Until you complete autofs Topic ldapuser90 Of The password is ' password ' Answer: wget ftp://host.domain90.example.com/pub/domain90.crt # Download the certificate, if wget Command is not installed, use yum install wget Installation

setup

# Use the dialog box operation Select Authentication Configuration Select the User Information LDAP And verification of information LDAP Fill in the server ldap :/ / host.domain90.example.com # URLs can be pasted directly, but must add agreement Baseline information to fill

dc = domain90, dc = example, dc = com # You can paste directly from the subject of the request Select the Use TLS Download a copy of the completed certificate to the address of the pop-up prompt dialog box

id ldapuser90

# Check if the user exists

9 , Configuration NTP . Configure your system so that it is server.domain90.example.com A NTP Client Answer:

system-config-data

# Use graphical interface settings

In the open interface Select The date and time synchronization on network

The original NTP Server deletes (public network)

Click Add Enter server.domain90.example.com 10 , Configuration autofs Automatically mount LDAP The user's home directory, the following requirements: a) host.domain90.example.com (172.24.90.250) Use NFS Shared / Netdir To your system. This file system contains preSet a good user ldapuser90 Home directory b) ldapuser90 The home directory is host.domain90.example.com :/ netdir/ldapuser90 c) ldapuser90 The home directory should automatically mount to the local / Netdir The following / Netdir/ldapuser90 d) Home directory must have write access to the user e) ldapuser90 The password is

' password ' Answer:

vim / etc / auto.master

/ / Etc / auto.aa

# In / Misc Add this line below If it is written / Netdir / Etc / auto.aa, Then the following auto.aa Will be written ldapuser90

cp / etc / auto.misc / Etc / auto.aa # Copy

vim / etc / auto.aa

# Editor

/ Netdir/ldapuser90

fstype = nfs, rw host.domain90.example.com :/ netdir/ldapuser90 # In cd The following join , If Requirements set autofs Version vers = 3 , Then rw After inserting vers = 3

service autofs restart

# Restart autofs Service

su ldapuser90

# Validation switch to ldapuser90 To see if a home directory

df h

# Verify to see if the mount successful

chkconfig autofs on

# Set boot

11 , Configuration FTP Access. As station.domain90.example.com Implement ftp Service that allows anonymous From / Var / ftp / pub Download file Answer: Annotation [Li2]: Note the examination requirements

5 / 16

yum install vsftpd y

# Installation ftp

Service

service vsftpd start

# Start the service

chkconfig vsftpd on

# Set boot

touch / var / ftp / pub / aa.txt

# Create one aa.txt For test use

In the physical machine browser input ftp:// station.domain90.example.com/pub / , And then download the file

# Test ftp Normal, Can No download file

12 , Implementing a web Server. For the site

http://station.domain90.example.com Implementing a web Services, then complete the following Steps: a) Download ftp://server.domain90.example.com/pub/rhcsa/station.html b) Rename the downloaded file As index.html c) Copy index.html To you web Services DocumentRoot Directory d) Do not index.html The contents of any changes Answer:

yum install httpd \ *-y

# Installation web Service

vim / etc / httpd / conf / httpd.conf # Editor

ServerName station.domain90.example.com: 80 # Modification ServerName OK, read this

service httpd restart

# Restart Service

chkconfig httpd on

# Set boot

wget ftp://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 machine http://station.domain90.example.com

Note:

restorecon Command and chcon Similar commands, but it is based on current policy settings the default file context files and documents relating to the object of security Hereinafter, therefore, the user does not specify a security context, on the contrary, restorecon Use file context file entries that match the file name, and then apply Specific security context, in some cases, it is to restore the correct security context

13 , Configure user accounts. Create a user aclan , uid As 3895 . The password for the user nimsdreg . Answer:

useradd u 3895 aclan

#-U Is set uid No. 3895 Add aclan User

passwd aclan

# Set Password

14 , Adding a swap Partition. On your system to add an extra size 756M Swap, the swap partition at boot It should be able to automatically mount. Do not remove, and change the existing swap partition on your system. Answer:

dd if = / dev / zero of = file bs = 1M count = 756 # Generating a size 756M File

mkswap file swapon file vim / etc / fstab

# Edit the files, settings automatically mount

/ Root / file swap swap defaults 00 # Insert the statement in the final set to mount

cat / proc / swaps

# Validation check will find the new file . Also available free l Or swapon s Verification

15 , Find the file. Identify all owners are julia Files and copy them to / Root / findresults Catalog. Answer:

mkdir / root / findresults

# Create findresults Folder

find /-user julia exec cp a {} / root / findresults / \; # Find / Next, Users

julia Document And copied to / Root / findresults Annotation [Li3]: Context

You might also like