Академический Документы
Профессиональный Документы
Культура Документы
Control-d to conti:
Emergency /boot/file
Control-d to conti:
-
Managing Individual Processes
Process listing
1. Top command will output a continually updating list of process
2. Kill signals : kill signals are inter process communication kill –l
3. Pgrep :its showing process id
4. Niceness:The priority a given process is assigned it is “nice level”
a. Example ps axo pid,nicelvel,command
b. Renice –n -20 6053
c. Renice –n -20 $(pgep httpd)
5. Top and w and uptime : load average all display something labeled “load average” Lecture:
Lecture: Configure Local Storage
Create physical volume
i. Pvcreate /dev/sda1 /dev/sd2 /dev/sda3
ii. pvdisplay
6. Create volume group
i. Vgcreate myvg /dev/sda1
ii. Vgdisply
7 create logical volume
-Lvcreate -L 100m myvg –n firstlv
Mkfs.xfs /dev/myvg/weblv
Mkdir /mnt/web
Mount /dev/myvg/wedlv /mnt/web
Df –h
blkid
Lecture: Network File Systems
NETWORK file system is a way f mounting directories over a network
a. mkdir /nfs
b. chmod 77 /nfs
c. vi /etc/exports
d. /nfs *(rw,
e. Systemctl start {rpcbind,nfs_server,rpc-statd,nfs-idmapd}
f. Showmout –e localhost
g. Exportfs -a
h. Systemctl start rpcbind
i. client
j. Rpm –q nfs-utils
k. Showmount -e 172.131.119 .211
l. Mount -t nfs 172.31.119 :/nfs /mnt/nfs
m. Cd /mnt/nfs
n. Touch file
o. Ls
Lecture: Network Configuration
There are lots of ways to configure network devices.
Nmcli:
1. yum insall bash-completion –y
2. ll /sys/class/net
3. Nmcli dev status
4. Nmcli con show
5. Ll /etc/sysocnfg/network-scripts/ifcfg-
6. Nmcli con add con-name mycon autoconnect no type enthenet ifname et1
7. Nmcli con show
8. Nmcli con up mycon
9. Nmcli con show –active
10. Nmcli con down mycon
11. Nmcli con add con-name mycon autoconnect no type enthenet ifname eth1 ip4 gw 10.0.0.1
The main difference between ip and ncmli is thatchanges made with the ip command are not
persistent
12. Ip its shows ip address
13. Ip addr add 10.0.0.2 dev etho0
14. Ip a s
15. Ip addr del ip adres
16. Cat /etc/resolve.config (name sever shows) DNS is the foundation of the internet
17. Nmcli con mod system\ eth0 –ipv4.dns 8.8.8.8
18. Nmcli con mod system\ eth0 +ipv4.dns 8.8.8.8
19. Cat /etc/resov.conf
20. Host www
21. DNS Resoultion
a. /etc/nsswith.conf
b. /etc/hosts
i. 10.0.050 www www.linux.com
ii. Nslookup ww
Lecture: Network Time Protocol
22. Time is important for more than just counting days until
a. Timedatectl we use to mange things hving to do with date
b. Timedatectl set-timezome (set time zome)
c. Set-ntp –trun ntp
d. Clock skew
e. Ntp service
i. Chrony (NTP on your server)
ii. Systemctl status chrony
iii. Systemctl status chrony –l
iv. Chrony c tracking
v. Chronyc sources –v
Lecture: Modifying the System Bootloader
23. Uname –a kernel information
24. Yum list kernel
25. Rpm –qa | grep kernel-[1..10]
26. Grubby –info=all
27. Grub2-set-defalut
28. Grubby --set-default 2
29. Grubby –set-default-index
30. Uname –a
31. Grubby –set-default –index 0
Lecture: Updating and Installing Packages
32. Rpm(RED HAT PACKAGE MANAGER) How software is installed on redht server
a. I insall and h give progess information v- verbose U-Upgrde e-erse
33. YUM (yellow dog update manager) software repositories
a. Yum repolist
b. Yum install epel(noting to do
c. Yum search httpd
d. Cd /etc/yum.repo.d/
e. Vim centos-base.repo
f. Vi epel-repo
Lecture: Manipulating User Accounts
1. Id
2. Id cloud_user
3. Grep cloud_user /etc/password
4. Grep cloud_user /etc/shadow
5. Etent psswor cloud_user
6. Getent shadow cloud_user
Lecture: Configuring the Firewall
1. Yum instll firewalld firewall –config –y
2. Systemctl restart firewalld
3. Systemctl restart httpd
4. Curl localhost
5. Second server curl –k 10.0.0.120
6. Firewall-cmd –get-zones
7. Firewall-cmd –get-default-zone
8. Firewall-cmd –list-all ==zone=public
9. Firewall-cmd –add-serice=httpd
10. Firewalld-cmd –list-all
11. Firewall-cmd –reload
12. Firewall-cmd –add-port=80/tcp --permanet
13. Firewall-cmd –list-all
14. Firewall –reload
15. Rpm –q xorg-x11-apps
16. Ssh –Y CLOUD_USER@REBOARTIC
17. EXPORT XAUTHORITY=/HOME/CLOUD_USER/.XAUTHORITY
18. Sudo firewall-conig
Lecture: Disk Compression (Virtual Disk Optimizer)
Virtual data optimizer(vdo) is a method f providing deduplication, compression and thin provisioning
VDO Device-similar to how LVM works (although LVM Can then be layered on top of VDO)
(ONLY IF PHYSICAL STORAGE IS 16TB OR GREATHER)
For the VDO logical size your should use 10 times multiplier of your physical space if the deivce will be a vm
container storage or 3 time for other object storage
1. VDO does have some memory requirements ram 268MB
2. Fdisk –l
3. Yum install vdo kmod-kvdo
4. Systemcl start vdo.service
5. Vdo create –name=myvdo –device=/dev/nvmeln1 –vdologi calsize=
=60gb –deduplication=disabled
6. Mkfs.xfs –k /dev/mapper/myvdo
7. Udevadm settle
8. Mkdir /mnt/vdo
9. Mount /dev/mapper/myvdo /mnt/vdo/
10. Df -h
11. Vdostats
12. Vdostats ---human-readable
Lecture: Using the AppStream (yum modules)
1. The AppStream is a new tool added by Red Hat in RHEL8. It allows admins to install different versions of
popular software, in addition to different profiles for different packages (for example, a
minimal httpd server)
2. Yum install postgresql
3. Yum module enable postgresql:9.6(before 10 versin now 9 version)
4. Yum install postgresql
5. Yum module list
6. Managing process schedulers
a. Chrt –p <pid>
b. Chrt -f –p <pio> <pid>
Lecture: AutoFS
1. AutoFS can mount network shares only when they're being used, and dismount them when
they aren't.
2. Nfs server /etc/auto.master
3. /mis/ /etc/auto.misc –timeout 60
Lecture: Extending Virtual Disks (LVM/VDO)
1. Pvcreate /dev/sdc1
2. Vgextend vdodevo /dev/nvme31
3. Lvextend –r –l + 100% free /dev/vdodev/vdolv
4. Vgdisplay
5. Vdostats
6. Vdostats –human-readable
7. Vdo growphysical –name=LA
8. Vdostats –human-reable
9. Df –h
10. Vdo growlogical –name=LA –vdoLogicalsize=180g
11. Vdostatus –human-reable
12. Df –h
13. Xfs_gowfs /mnt/vdo
14. Df –h
Learning Objectives
check_circleAdd the /dev/nvme3n1 disk to the vdoLV Logical Volume.keyboard_arrow_up
This task has multiple steps.
1. pvcreate /dev/nvme3n1
2. vgextend vdoDev /dev/nvme3n1
3. lvextend -l +100%FREE /dev/vdoDev/vdoLV
check_circleExtend the VDO Physical Disk to 60GB, and the Logical Size to 180GBkeyboard_arrow_up
To extend the physical size, we'll run:
vdo growPhysical --name=LA
xfs_growfs /mnt/vdo