Lab 2: CentOS 8 - adaley0518/Tech_Journal GitHub Wiki

Lab 2: CentOS 8. This lab is to help us get an understanding that there will be new OS's and is beneficial to learn about them. In our career, there are going to be constantly new technology we will have to use and understand. This one is about CentOS 8.

Network Configuration

  • use nmtui to set up network configuration
    • IP: 10.0.5.123/24
    • Gateway: 10.0.5.2
    • DNS: 10.0.5.5
    • Domain: amber.local
    • Hostname: test-amber
  • restart system
    • systemctl restart NetworkManager.service
  • ip addr to check if IP changed, if not reboot
  • set up secured SSH so root fails ssh login
  • Also, create an admin user

Changing IP Addresses with nmcli

  • the commands are as followed:
    • nmcli connection show (this will show all devices with an IP)

    • nmcli con mod ens192 ipv4.address 10.0.5.234/24 (set/change the IP)

    • nmcli con mod ens192 autoconnect yes (enables the device interface to start automatically on the system boot

    • nmcli con down ens192

    • nmcli con up ens92 (these commands restart the interface)

    • ifconfig ens192 (check IP change) or nmcli device show ens192 (will show even more interface information)

    • May need to reboot system

Setting Up Cockpit

  • Install cockpit
    • sudo yum install cockpit
  • Enable cockpit
    • sudo systemctl enable --now cockpit.socket
  • add to firewall
    • sudo firewall-cmd --permanent --add-service=cockpit
  • Now, access Cockpit
    • https://(Server_ip):9090
    • sign in with admin credentials
    • Once in Cockpit check user account and make sure 'Server Administrator' is checked off

Join Domain and Sudoers

  • First, join domain
    • sudo -i
    • dnf -y install realmd sssd oddjob oddjob-mkhomedir adcli samba-common-tools krb5-workstation
    • nmcli connection modify ens192 ipv4.dns 10.0.5.5
    • nmcli connection down ens192; nmcli connection up ens192
    • realm discover amber.local (should show domain information)
    • realm join amber.local (join Active Directory Domain)
    • id [email protected] (verify getting an AD user info or not)

Dashboard with New Test System

  • download the dashboard
    • sudo yum install cockpit-dashboard.service
    • may need to restart system for dashboard to show up on the GUI
    • 'click on dashboard'
    • add a new machine
      • Hostname: web01-amber
      • login and should connect to web01