nedeľa 6. februára 2022

rhcsa 11-13

my next study





 11. use the appropriate utility to create a 5TiB thin provisioned volume 


dnf install vdo kmod-kvdo

 vdo create --name=vdo1 --device=/dev/sdc --vdoLogicalSize=5T --writePolicy=auto


[root@localhost ~]# !141

fdisk -l /dev/mapper/vdo1

Disk /dev/mapper/vdo1: 5 TiB, 5497558138880 bytes, 1342177280 sectors

Units: sectors of 1 * 4096 = 4096 bytes

Sector size (logical/physical): 4096 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes12,


12.configure a basic web server that displays "welcome to web server " once conceted to it. Ensure the firewall allows the http/https services.


a) dnf install -y httpd

b) systemctl enable --now httpd

c) [root@localhost ~]# vi /var/www/html/index.html

[root@localhost ~]# wget localhost/index.html

d)cat index.html


[root@localhost ~]# cat index.html

<h1> Welcome to the web server </h1>

[root@localhost ~]#


e) firewalld!


[root@localhost ~]# firewall-cmd --get-active-zone

public

  interfaces: enp0s3 enp0s8


[root@localhost ~]# firewall-cmd --list-services

cockpit dhcpv6-client ssh

[root@localhost ~]# firewall-cmd --zone public --add-service http --permanent

success

[root@localhost ~]# firewall-cmd --zone public --add-service https --permanent

success


[root@localhost ~]# systemctl restart firewalld

[root@localhost ~]# firewall-cmd --list-services

cockpit dhcpv6-client http https ssh



13. find all files that are larger than 5MB in /etc directory and copy to them /find/lagerfiles

[root@localhost ~]# find /etc/ -size +5M -exec cp {} /find/largefiles/ \;

[root@localhost ~]# ll /find/largefiles/

total 19236

-r--r--r-- 1 root root 11120017 Feb  3 11:38 hwdb.bin

-rw-r--r-- 1 root root  8573401 Feb  3 11:38 policy.31




find /etc/ -size +5M -exec ls -lh {}  \;


find in /etc 


- size +5M = find files bigger than 5M

- exec = execute


ls -lh = list +5m files in /etc/ directory




Žiadne komentáre:

Zverejnenie komentára