当前位置:网站首页>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
边栏推荐
- Installation and use of MySQL under MySQL 19 Linux
- 软件测试-面试题分享
- 解决扫描不到xml、yml、properties文件配置
- Kubesphere - deploy the actual combat with the deployment file (3)
- Asp access Shaoxing tourism graduation design website
- Kubernetes - problems and Solutions
- Use dapr to shorten software development cycle and improve production efficiency
- csdn-Markdown编辑器
- Swagger、Yapi接口管理服务_SE
- Swagger, Yapi interface management service_ SE
猜你喜欢
![[Thesis Writing] how to write function description of jsp online examination system](/img/f8/13144e0febf4a576bbcc3290192079.jpg)
[Thesis Writing] how to write function description of jsp online examination system

学习问题1:127.0.0.1拒绝了我们的访问

打开浏览器的同时会在主页外同时打开芒果TV,抖音等网站

windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止

CSDN question and answer tag skill tree (I) -- Construction of basic framework

安装numpy问题总结
![[free setup] asp Net online course selection system design and Implementation (source code +lunwen)](/img/ac/b518796a92d00615cd374c0c835f38.jpg)
[free setup] asp Net online course selection system design and Implementation (source code +lunwen)

CSDN问答标签技能树(一) —— 基本框架的构建

Postman Interface Association

One click extraction of tables in PDF
随机推荐
A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon
Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)
Mysql22 logical architecture
Django running error: error loading mysqldb module solution
Install MySQL for Ubuntu 20.04
TCP/IP协议(UDP)
一键提取pdf中的表格
学习问题1:127.0.0.1拒绝了我们的访问
CSDN问答模块标题推荐任务(二) —— 效果优化
Tcp/ip protocol (UDP)
Ubuntu 20.04 安装 MySQL
Kubernetes - problems and Solutions
Postman environment variable settings
虚拟机Ping通主机,主机Ping不通虚拟机
LeetCode #461 汉明距离
安全测试涉及的测试对象
IDEA 导入导出 settings 设置文件
Postman uses scripts to modify the values of environment variables
Navicat 導出錶生成PDM文件
Redis的基础使用