Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
35 views2 pages

CentOS - RHEL

Uploaded by

ShynevilShynevil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views2 pages

CentOS - RHEL

Uploaded by

ShynevilShynevil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

# Add User Accounts

useradd centos
passwd centos

usermod -aG wheel centos


vi /etc/pam.d/su

# uncomment the following line


auth required pam_wheel.so use_uid

# Remove a user accounts


userdel centos
userdel -r centos

# Set HostName
hostnamectl set-hostname dlp.srv.world

# display devices
nmcli device

# set IPv4 address


nmcli connection modify enp1s0 ipv4.addresses 10.0.0.30/24

# set gateway
nmcli connection modify enp1s0 ipv4.gateway 10.0.0.1

# set DNS
# for multiple DNS, specify with space separated ⇒ ipv4.dns "10.0.0.10 10.0.0.11
10.0.0.12"
nmcli connection modify enp1s0 ipv4.dns 10.0.0.10

# set DNS search base (your domain name -for multiple one, specify with space
separated)
nmcli connection modify enp1s0 ipv4.dns-search srv.world

# set [manual] for static setting (it's [auto] for DHCP)


nmcli connection modify enp1s0 ipv4.method manual

# restart the interface to reload settings


nmcli connection down enp1s0; nmcli connection up enp1s0

# confirm settings
nmcli device show enp1s0

# confirm state
ip address show

# disable IPv6
grubby --update-kernel ALL --args ipv6.disable=1

# verify kernel parameters


grubby --info DEFAULT
reboot

# if falling back to enable, run like follows


grubby --update-kernel ALL --remove-args ipv6.disable

# the list of services that are active now


systemctl -t service
# list of all services
systemctl list-unit-files -t service

systemctl stop nis-domainname


systemctl disable nis-domainname

# to disable and stop with a command, run like follows


systemctl disable --now nis-domainname

dnf -y upgrade

# Add EPEL that Fedora


dnf -y install epel-release epel-next-release

nano /etc/yum.repos.d/epel.repo
# [enabled=1] = repository enabled, [enabled=0] = repository disabled
enabled=1
# to add [priority=*], it can set priority to repository
# it can specify [1-99], [1] is highest, default without the line is [99]
priority=10

# Add Remi's RPM repository


dnf -y install https://rpms.remirepo.net/enterprise/remi-release-9.rpm

# also possible to use Moduler Repository


dnf --enablerepo=remi-modular --disablerepo=appstream module list

# Use Web Admin Console


systemctl enable --now cockpit.socket
ss -napt
firewall-cmd --list-service
firewall-cmd --add-service=cockpit
firewall-cmd --runtime-to-permanent

You might also like