当前位置:网站首页>Rhcsa certification exam exercise (configured on the first host)
Rhcsa certification exam exercise (configured on the first host)
2022-07-06 11:12:00 【avater sse】
I use the simulation environment. If you need to send me a private message
Examination requirements :
- stay mars.domain250.example.com Perform the following tasks on the .
- ○ Reexamine ○ complete Configure network settings
- ○ Reexamine ○ complete Configure your system to use the default repository
- ○ Reexamine ○ complete debugging SELinux
- ○ Reexamine ○ complete Create user accounts
- ○ Reexamine ○ complete To configure cron Homework
- ○ Reexamine ○ complete Create collaboration Directory
- ○ Reexamine ○ complete To configure NTP
- ○ Reexamine ○ complete To configure autofs
- ○ Reexamine ○ complete To configure /var/tmp/fstab jurisdiction
- ○ Reexamine ○ complete Configure user accounts
- ○ Reexamine ○ complete Find files
- ○ Reexamine ○ complete Find string
- ○ Reexamine ○ complete Create Archive
- stay venus.domain250.example.com Perform the following tasks on the .
- ○ Reexamine ○ complete Set up root password
- ○ Reexamine ○ complete Configure your system to use the default repository
- ○ Reexamine ○ complete Resize logical volume
- ○ Reexamine ○ complete Add swap
- ○ Reexamine ○ complete Create logical volumes
- ○ Reexamine ○ complete establish VDO volume
- ○ Reexamine ○ complete Configure system tuning
- ○ Reexamine ○ complete Configure container
The first question is
First step : View connection information
[[email protected] ~]# nmcli connection show
NAME UUID TYPE DEVICE
Wired connection 1 46da4a6a-06c3-6fae-eea1-ac0ca900f213 ethernet eth0
The second step : Configure the network configuration as required :
[[email protected] ~]# nmcli connection modify Wired\ connection\ 1 ipv4.method manual ipv4.addresses 172.25.250.100/24 ipv4.gateway 172.25.250.254 ipv4.dns 172.25.250.254 autoconnect yes
The third step : Set host name
[[email protected] ~]# hostnamectl set-hostname mars.domain250.example.com
Step four : View host name
[[email protected] ~]# hostname
mars.domain250.example.com
The second question is
First step : Configure the default repository used by the system
Because... Is not configured yet yum The source cannot be used vim, So it is used here vi
[[email protected] ~]# vi /etc/yum.repos.d/rhce8.repo
[BaseOS]
name=BaseOS
baseurl=http://content/rhel8.2/x86_64/dvd/BaseOS
gpgcheck=0
[AppStream]
name=AppStream
baseurl=http://content/rhel8.2/x86_64/dvd/AppStream
gpgcheck=0
Then check whether the configuration is correct and can pass
yum install vim -y
If it can be installed normally, the configuration is correct
Third question
First step :
First of all, the port used in the title is non-standard port 82
Inquire about 80 Port open
[[email protected] ~]# semanage port -l | grep 80
http_port_t tcp 80, 81, 443, 488, 8008, 8009, 8443, 9000
The second step : change selinux Strategy
[[email protected] ~]# semanage port -a -t http_port_t -p tcp 82
The third step : Reopen a terminal to view /var/www/html
We will find that the first problem needs to be changed
[[email protected] ~]# ls -lZ /var/www/html/
total 12
-rw-r--r--. 1 root root system_u:object_r:default_t:s0 14 Dec 5 10:24 file1
-rw-r--r--. 1 root root system_u:object_r:httpd_sys_content_t:s0 14 Dec 5 10:24 file2
-rw-r--r--. 1 root root system_u:object_r:httpd_sys_content_t:s0 14 Dec 5 10:24 file3
change command : ( notes :-R Search for recursion )
[[email protected] ~]# chcon -t httpd_sys_content_t -R /var/www/html/
Look again :
[[email protected] ~]# ls -lZ /var/www/html/
total 12
-rw-r--r--. 1 root root system_u:object_r:httpd_sys_content_t:s0 14 Dec 5 10:24 file1
-rw-r--r--. 1 root root system_u:object_r:httpd_sys_content_t:s0 14 Dec 5 10:24 file2
-rw-r--r--. 1 root root system_u:object_r:httpd_sys_content_t:s0 14 Dec 5 10:24 file3
Change complete
Step four : Turn on httpd service
After startup, it starts automatically
[[email protected] ~]# systemctl start httpd
[[email protected] ~]# systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
Or merge the two commands :
[[email protected] ~]# systemctl enable --now httpd
Check : There are problems before the visit file1
[[email protected] ~]# curl http:/mars:82/file1
EX200 Testing
optional :
Release at the firewall 82 port
[[email protected] ~]# firewall-cmd --permanent --add-port=82/tcp
success
Effective immediately now
[[email protected] ~]# firewall-cmd --reload
success
Fourth question
First step :
Create a sysmgrs Group
[[email protected] ~]# groupadd sysmgrs
The second step :
user natasha , Subordinate to as a secondary group sysmgrs
[[email protected] ~]# useradd natasha -G sysmgrs
The third step :
user harry , As a secondary group, it also belongs to sysmgrs
[[email protected] ~]# useradd harry -G sysmgrs
Step four :
user sarah , You do not have access to interactive on the system shell It's not sysmgrs Members of
[[email protected] ~]# useradd sarah -s /bin/false
Step five :
natasha 、 harry and sarah All passwords should be flectrag
Changing password for user natasha.
passwd: all authentication tokens updated successfully.
[[email protected] ~]# echo flectrag | passwd --stdin harry
Changing password for user harry.
passwd: all authentication tokens updated successfully.
[[email protected] ~]# echo flectrag | passwd --stdin sarah
Changing password for user sarah.
passwd: all authentication tokens updated successfully.sh
Fifth question
Representation format : Time sharing day month week
[[email protected] ~]# crontab -u natasha -e
*/2 * * * * logger "EX200 in progress"
It may also be investigated in another way :
example : Every day 14:23 branch natasha perform echo “Hi rhcsa”
crontab -eu natasha
23 14 * * * echo "Hi rhcsa"
Sixth question
First step : Create directory
[[email protected] ~]# mkdir /home/managers
The second step : Add group permissions
[[email protected] ~]# chgrp sysmgrs /home/managers/
see /home/managers Permissions owned
[[email protected] ~]# ll /home/managers/ -d
drwxr-xr-x. 2 root sysmgrs 6 Dec 5 15:29 /home/managers/
The third step : Group users have all permissions , Other users don't
meanwhile /home/managers Files created in automatically set group ownership to sysmgrs Group
[[email protected] ~]# chmod g+ws /home/managers/
[[email protected] ~]# chmod o=- /home/managers/
[[email protected] ~]# ll /home/managers/ -d
drwxrws---. 2 root sysmgrs 6 Dec 5 15:29 /home/managers/
Question seven
First step : Check whether the package is installed :
[[email protected] ~]# rpm -q chrony
chrony-3.5-1.el8.x86_64
If not installed
yum install chrony -y
The second step : Modify the configuration file
[[email protected] ~]# vim /etc/chrony.conf
Divide by the last server Are commented out
The third step : Remember to configure self startup when encountering Services
[[email protected] ~]# systemctl restart chronyd.service
[[email protected] ~]# systemctl enable chronyd.service
Step four : See if the configuration is successful
[[email protected] ~]# chronyc sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* classroom.example.com 8 6 77 36 +70us[+2031us] +/- 1749us
The eighth question
First step : install autofs
[[email protected] ~]# yum install autofs -y
The second step : Write file
[[email protected] ~]# vim /etc/auto.master
Add the upper interface directory
#
/misc /etc/auto.misc
/rhome /etc/auto.nfs
The third step : Write a sub configuration file
[[email protected] ~]# vim /etc/auto.nfs
remoteuser1 -fstype=nfs,rw materials.example.com:/rhome/remoteuser1
Open another terminal
[[email protected] ~]# vim /etc/auto.misc
cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
Copy the uncommented ones to the sub configuration and change
Save and exit
Step four : Set power on self start
[[email protected] ~]# systemctl enable --now autofs
Step five : Test success , Remote login
[[email protected] ~]$ ssh [email protected]
[email protected]'s password:
Activate the web console with: systemctl enable --now cockpit.socket
This system is not registered to Red Hat Insights. See https://cloud.redhat.com/
To register this system, run: insights-client --register
Question 9
First step : Copy the file
[[email protected] ~]# cp /etc/fstab /var/tmp/fstab
Check the file permissions :
[[email protected] ~]# ll /var/tmp/fstab
-rw-r--r--. 1 root root 534 Dec 5 16:32 /var/tmp/fstab
It is found that the first three are configured
The second step : To configure natasha
[[email protected] ~]# setfacl -m u:natasha:rw /var/tmp/fstab
The third step : To configure harry
[[email protected] ~]# setfacl -m u:harry:- /var/tmp/fstab
Question 10
[[email protected] ~]# useradd manalo -u 3533
[[email protected] ~]# echo flectrag | passwd --stdin manalo
Changing password for user manalo.
passwd: all authentication tokens updated successfully.
Eleventh questions
First step : Check whether the user and directory exist
[[email protected] ~]# id jacques
uid=1003(jacques) gid=1003(jacques) groups=1003(jacques)
[[email protected] ~]# ll /root/
total 16
-rw-------. 1 root root 6503 Apr 23 2020 anaconda-ks.cfg
-rw-------. 1 root root 6251 Apr 23 2020 original-ks.cfg
[[email protected] ~]#
Found that the directory does not exist
So create a directory
[[email protected] ~]# mkdir /root/findfiles
The second step : Find the file and put it in the new directory
[[email protected] ~]# find / -user jacques -type f -exec cp -a {} /root/findfiles \;
[[email protected] ~]# ls /root/findfiles/
gamelan jacques libWedgeit.so.1.2.3
Twelfth questions
[[email protected] ~]# grep ng /usr/share/xml/iso-codes/iso_639_3.xml > /root/list
Thirteenth questions
[[email protected] ~]# tar czf /root/backup.tar.gz /usr/local
tar: Removing leading `/' from member names
边栏推荐
- SSM integrated notes easy to understand version
- Idea import / export settings file
- Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)
- CSDN question and answer module Title Recommendation task (I) -- Construction of basic framework
- Have you mastered the correct posture of golden three silver four job hopping?
- Generate PDM file from Navicat export table
- Armv8-a programming guide MMU (2)
- Ansible实战系列三 _ task常用命令
- [BMZCTF-pwn] 12-csaw-ctf-2016-quals hungman
- Remember a company interview question: merge ordered arrays
猜你喜欢
【博主推荐】C#MVC列表实现增删改查导入导出曲线功能(附源码)
Asp access Shaoxing tourism graduation design website
Basic use of redis
Use dapr to shorten software development cycle and improve production efficiency
1. Mx6u learning notes (VII): bare metal development (4) -- master frequency and clock configuration
Knowledge Q & A based on Apache Jena
[recommended by bloggers] background management system of SSM framework (with source code)
MySQL19-Linux下MySQL的安装与使用
windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止
neo4j安装教程
随机推荐
35 is not a stumbling block in the career of programmers
neo4j安装教程
[BMZCTF-pwn] 11-pwn111111
Django running error: error loading mysqldb module solution
Record a problem of raspberry pie DNS resolution failure
C语言标准的发展
CSDN问答标签技能树(一) —— 基本框架的构建
Ansible practical Series III_ Task common commands
Tcp/ip protocol (UDP)
QT creator design user interface
When you open the browser, you will also open mango TV, Tiktok and other websites outside the home page
Deoldify project problem - omp:error 15:initializing libiomp5md dll,but found libiomp5md. dll already initialized.
Other new features of mysql18-mysql8
Picture coloring project - deoldify
Basic use of redis
软件测试-面试题分享
[recommended by bloggers] C WinForm regularly sends email (with source code)
Unable to call numpy in pycharm, with an error modulenotfounderror: no module named 'numpy‘
QT creator shape
JDBC原理