/var/run/utmp (virtual file)
who, w and uptime commands
who command
<username> <devicefile for this terminal> <date> <time when user logged in> <Ip from where user logged in>
vvdn tty7 2020-11-15 15:02 (:0)
What is difference between pts and tty?
tty- Virtual Terminals
https://www.youtube.com/watch?v=vAr9PM9dEtE
Used for executing commands and offering inputs
You cannot use mouse with virtual terminal.
Enables different users to work on different program at the same time on same computer.
Enter into virtual terminal : Ctrl+Alt+F1
There are 6 virtual terminal : Ctrl+Alt+F1 to F6
To go back to main screen : Ctrl+Alt+F7
tty is the teletype number
Some useful commands
reset: reset the terminal
history: list of commands executed by the user
Ctrl+d: logout of terminal
Ctrl+Alt+del : Reboot the system
Virtual IP:
VRRP : Virtual Router Redundancy Protocol
keepalived is the software which allows us to do VRRP
/etc/keepalived/keepalived.conf
vrrp_instance httpd2{
state BACKUP
interface eth0
virtual_router_id 101
priority 100
authentication{
auth_type PASS
auth_pass 1234
}
virtual_ipaddress{
192.168.254.100
}
}
Installing pcs cluster...
Check the selinux status: sestatus
yum repo:
[rhel]
name=redhatrepo
baseurl=file:///directory
enabled=1
gpgcheck=0
createrepo /directory
yum install pcs pacemaker fence-agents lvm2-cluster resource-agents psmisc policycoreutils-python gfs2-utils -y
Check password expiry of a user:
chage -l <username>
pcs cluster auth ip-172-31-14-80.ap-south-1.compute.internal ip-172-31-1-112.ap-south-1.compute.internal
give===>
username: hacluster
password: redhat
Create cluster
pcs cluster setup --start --name dheerajPCScluster ip-172-31-14-80.ap-south-1.compute.internal ip-172-31-1-112.ap-south-1.compute.internal --force
pcs cluster start --all
Checking status
systemctl status pacemaker
systemctl status corosync
pcs status
crm_mon -r1
pcs cluster destroy
No comments:
Post a Comment