Table of Contents#
- Prerequisites
- Insert the Installation Media
- Enable the Installation Repositories
- Install the Gnome 3 Packages
- Configure the System to Boot into GUI Mode
- Reboot and Verify the Installation
1. Prerequisites#
- You should have a RHEL/CentOS 7 installation CD/DVD. Make sure it's a valid and up-to-date media.
- You need to have administrative (root) privileges on the system. You can log in as the root user or use
sudocommands if your user has been granted appropriate sudo rights.
2. Insert the Installation Media#
- Insert the RHEL/CentOS 7 CD/DVD into your server's optical drive.
- If your server has an auto-mount feature disabled (which is common in some server setups), you may need to manually mount the CD/DVD. For example, if your CD/DVD is detected as
/dev/sr0(this can vary depending on your system's hardware), you can mount it using the following command:
mount /dev/sr0 /mntThis will mount the CD/DVD contents to the /mnt directory.
3. Enable the Installation Repositories#
- Edit the repository configuration file. For RHEL, it's usually in
/etc/yum.repos.d/(the exact name might be something likerhel-media.repo). For CentOS, it could beCentOS-Media.repoin the same directory. - Open the file with a text editor (e.g.,
viornano). For example:
vi /etc/yum.repos.d/CentOS-Media.repo- In the file, find the section related to the media (CD/DVD) repository. Uncomment the lines (remove the
#at the beginning) that enable the repository. It might look something like this:
[media]
name=CentOS-$releasever - Media
baseurl=file:///mnt
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
- Save and close the file.
4. Install the Gnome 3 Packages#
- Now, you can install the Gnome 3 packages using the
yumpackage manager. Run the following command:
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"- This command will install the core Gnome 3 desktop environment along with some useful graphical administration tools. The installation process may take some time as it downloads and installs multiple packages. You'll be prompted to confirm the installation (type
yand press Enter).
5. Configure the System to Boot into GUI Mode#
- By default, RHEL/CentOS 7 may boot into a text-based (command-line) mode. To change it to boot into GUI mode, you need to configure the system's default target.
- Edit the
grub2configuration file. Open/etc/default/grubwith a text editor:
vi /etc/default/grub- Look for the line that starts with
GRUB_CMDLINE_LINUX. Addrd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet(if it's not already there) and also addsystemd.unit=graphical.targetat the end. So it might look like this:
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet systemd.unit=graphical.target"
- Then, update the
grub2configuration:
grub2-mkconfig -o /boot/grub2/grub.cfg6. Reboot and Verify the Installation#
- Reboot your system using the command:
reboot- After the system restarts, you should see the Gnome 3 login screen. Enter your username and password (if you have user accounts set up) or use the root credentials (not recommended for regular use but for initial testing).
- Once logged in, explore the Gnome 3 desktop. Check that applications like file managers (e.g., Nautilus), terminal emulators (e.g., Gnome Terminal), and system settings work as expected.
Reference#
That's it! You've successfully installed the Gnome 3 GUI on RHEL/CentOS 7 using a CD/DVD.