Quick Installation Guide

Interactive Installation

This section describes the simple procedure to install CentOS after you have created and booted from an installation USB drive.

Prerequisites: Create an installation USB drive and boot it. For details, see:

After booting the installation USB drive:

  1. Select Install CentOS in the boot menu and press Enter.

    boot screen
  2. After Anaconda, the CentOS installer, started, select your language and region, and click Continue.

    langselection GUI
  3. The Installation Summary is the central screen to set configuration options:

    preinstall hub

    You can display and modify the individual options in any order. If a configuration option was automatically configured correctly, no further action is required. However, if items are marked with an exclamation point icon, you must complete the configuration for these items before you can begin the installation.

    Nothing will be written to the disk until you click the Begin Installation button.

  4. Select Date & Time:

    1. Set your region and the nearest city in your time zone.

    2. Click Done to return to the Installation Summary.

      timezone
  5. Select Keyboard Layout:

    1. Use the + and - buttons to add and remove keyboard layouts.

    2. If you enable multiple keyboard layouts, move your preferred layout to the top of the list using the button to set it as default.

    3. Click Done to return to the Installation Summary.

      keyboard
  6. Select Installation Destination:

    1. Select the target disk. A check mark is displayed next to the selected target.

      The selected disk is partitioned automatically.

    2. Click Done to return to the Installation Summary.

      disk setup x86
  7. Select Network and Hostname:

    1. Click the Ethernet sliding switch in the top right corner to enable the network configuration.

    2. Optional, select the device and click Configure to update the network interface configuration.

    3. Click Done to return to the Installation Summary.

      networkconfig

      Anaconda applies the network settings immediately. They are used during the setup and after the installation.

  8. On the Installation Summary screen, click Begin Installation.

    write changes
  9. The installation starts and the Configuration screen is displayed:

    installing packages

    During the installation:

    1. Select Root Password:

      1. Enter the password for the root user and confirm it.

      2. Click Done to return to the Configuration screen.

        rootpassword
    2. Select User Creation:

      1. Enter the user’s full name.

      2. Optionally, update the automatically generated user name.

      3. Set the password and confirm it.

      4. Optionally, check the Make this user administrator check box. This will add the user to the wheel group and allow this account to use sudo without any further configuration.

      5. Click Done to return to the Configuration screen.

        createuser
    3. Wait until the installation completes and click Reboot.

  10. After the installed system has been started:

    • If you installed the server using the Server with GUI base environment, the Initial Setup application is started automatically. Review and accept the license agreement to exit Initial Setup and start using your system. For details, see Initial Setup.

Automatic Installation

This section describes a simple procedure on how to add a Kickstart file to the installation USB drive, which automatically installs CentOS. You can use this procedure to deploy CentOS on multiple machines.

Generating the USB Boot Media

  1. Record an installation in a Kickstart file:

    1. Manually install CentOS once. For details see Interactive Installation.

    2. Boot the installed system. During the installation, Anaconda created a Kickstart file with the settings in the /root/anaconda-ks.cfg file.

  2. Download the CentOS installation DVD ISO file to the /tmp/ directory.

  3. Mount the installation ISO file to the /mnt/ directory. For example:

    mount -o loop /tmp/CentOS-server-7-x86_64-dvd.iso /mnt/
  4. Create a working directory and copy the DVD content to it. For example:

    mkdir /root/CentOS-install/
    shopt -s dotglob
    cp -avRf /mnt/* /root/CentOS-install/
  5. Unmount the ISO file:

    umount /mnt/
  6. Copy the Kickstart file generated during the installation to the working directory:

    cp /root/anaconda-ks.cfg /root/CentOS-install/
  7. Display the installation DVD volume name:

    isoinfo -d -i CentOS-server-7-x86_64-dvd.iso | grep "Volume id" | \
    sed -e 's/Volume id: //' -e 's/ /\\x20/g'
    CentOS-7\x20Server.x86_64
  8. Add a new menu entry to the boot /root/CentOS-install/isolinux/isolinux.cfg file that uses the Kickstart file. For example:

    label kickstart
    menu label ^Kickstart Installation of CentOS 7
    kernel vmlinuz
    append initrd=initrd.img inst.stage2=hd:LABEL=CentOS-7\x20Server.x86_64 inst.ks=hd:LABEL=CentOS-7\x20Server.x86_64:/anaconda-ks.cfg

    Set the inst.stage2=hd:LABEL= option and inst.ks=hd:LABEL= options to the DVD volume name retrieved in the previous step

  9. Before you create the /root/CentOS-ks.iso file from the working directory, execute the following steps for a USB UEFI boot or for a CDROM UEFI boot:

    • For a USB UEFI boot, follow the steps:

      1. Mount the volume:

        mount /root/CentOS-install/images/efiboot.img /mnt/

        Edit the file /mnt/EFI/BOOT/grub.cfg:

      2. Add a new menu entry:

        'Kickstart Installation of CentOS-7' --class fedora --class gnu-linux --class gnu --class os {
                linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS-7\x20Server.x86_64 inst.ks=hd:LABEL=CentOS-7\x20Server.x86_64:/anaconda-ks.cfg
                initrdefi /images/pxeboot/initrd.img
        }
      3. Unmount the volume:

        umount /mnt
    • For a CDROM UEFI boot, follow the steps:

      1. Edit the file /root/CentOS-install/EFI/BOOT/grub.cfg:

      2. Add a new menu entry to the file:

        'Kickstart Installation of CentOS-7' --class fedora --class gnu-linux --class gnu --class os {
                linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS-7\x20Server.x86_64 inst.ks=hd:LABEL=CentOS-7\x20Server.x86_64:/anaconda-ks.cfg
                initrdefi /images/pxeboot/initrd.img
        }
  10. Create the /root/CentOS-ks.iso file from the working directory:

    mkisofs -J -T -o /root/CentOS-ks.iso -b isolinux/isolinux.bin \
    -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table \
    -R -m TRANS.TBL -graft-points -V "CentOS-7 Server.x86_64" \
    /root/CentOS-install/

    Set the -V option to the DVD volume name retrieved in an earlier step and replace \x20 in the string with a space.

  11. Make the ISO image created by the command mkisofs bootable:

    isohybrid --uefi /root/rhel-ks.iso
  12. Create an installation USB drive. For details, see Making Installation USB Media on Linux.

Install CentOS Using the Kickstart File

  1. Boot the installation USB drive. See Booting the Installation on 64-bit AMD, Intel, and ARM systems.

  2. Select the entry with the Kickstart configuration that you created in Generating the USB Boot Media.