CentOS 7 Install

on VM @ Hyper-V (
  • Network

    • Ethernet (eth0)
    • Host name: HOSTNAME.LANDOMAIN

    All else defaults:

              MAC: 00:15:5D:4E:BB:32  
            Speed: 1000 Mb/s   
       IP Address: 192.168.1.10   
      Subnet Mask: 255.255.255.0   
    Default Route: 192.168.1.1   
              DNS: 192.168.1.1   
    
  • Software Selection

    • Base Environment
      • Server with GUI
        (or whatever)
    • Add-Ons
      • Network File System Client
      • Virtualization Platform
      • Development Tools
      • System Administration Tools
  • Security Policy

    • "Standard Docker Host Security Profile"
      (or whatever)
  • Configure User Settings

    • Root Password
    • User Creation
      • Name
      • Password
      • "Make this user Administrator" (check-box)
        Else per root acct login; add the user to wheel group:
        usermod -aG wheel TARGET_USERNAME

    Admin

    # Config client (user acct) mkdir ~/.ssh chmod 700 ~/.ssh touch ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys # Config server (sshd) sudo vim /etc/ssh/sshd_config PubkeyAuthentication yes # required by ssh-copy-id (to receive pub key): PasswordAuthentication yes
    • ssh ... Pubkey login WILL FAIL if owner|perms|SELinux-context is wrong.
      Debug login issues:

      ls -ZA ~/.ssh
      systemctl status sshd -l     
      grep AVC /var/log/{secure,audit.log}
      
  • @ Client (Remote machine)

  • SSH access (thereafter)

    Backup /home

    Backup /home to ~/etc/platforms/$_HOST/

    Update home

    Other install/search

    su
    yum check-update
    yum update
    # EPEL [Extra Packages for Enterprise Linux]  https://fedoraproject.org/wiki/EPEL
    yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    # And to better handle dependencies (though does not work @ Hyper-V, nor containers):
    #subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"
    yum list install httpd 
    shutdown now     # poweroff
    shutdown -r now  # reboot 
    reboot           # works too
    
    # Install VS Code
    rpm --import https://packages.microsoft.com/keys/microsoft.asc
    sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
    
    yum check-update
    sudo yum install code