
Getting Google Chrome on Your CentOS 8 System
For users running CentOS 8, installing a popular web browser like Google Chrome involves adding its official repository to your system’s package manager. While CentOS 8 has reached End-of-Life (EoL), understanding this process remains valuable for those still using it or transitioning to successor distributions like AlmaLinux or Rocky Linux, where the steps are largely similar. This guide outlines the standard procedure to install Google Chrome Stable on CentOS 8 using the command line.
1. Open Your Terminal
The installation process is performed via the command line. Open your terminal application. You’ll need root privileges to perform these steps, so you can either log in as root or use sudo
before commands.
2. Create the Google Chrome Repository File
Google provides a dedicated software repository for Linux distributions. To use it, you need to create a new repository file in your system’s configuration directory.
Use a text editor like nano
or vim
to create the file. For example, using nano
:
sudo nano /etc/yum.repos.d/google-chrome.repo
This command opens the nano
editor to create and edit the file /etc/yum.repos.d/google-chrome.repo.
3. Add Repository Details
Inside the editor, add the following configuration lines to the google-chrome.repo
file. This block defines the repository for the stable version of Google Chrome.
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
enabled=1
gpgcheck=1
gpgkey=https://dl.google.com/linux/linux_signing_key.pub
Let’s quickly break down the key lines:
[google-chrome]
: Defines the repository ID.name=google-chrome
: A human-readable name for the repository.baseurl=...
: Specifies the URL where the package files are located.$basearch
is a variable representing your system’s architecture (e.g., x86_64).enabled=1
: Ensures this repository is active and considered by the package manager.gpgcheck=1
: Mandates checking the GPG signature of packages downloaded from this repository. This is a crucial security step to ensure the integrity and authenticity of the software you install.gpgkey=...
: Specifies the URL where the public GPG key used to sign the packages is located.
After adding the content, save the file and exit the editor (Ctrl+X, then Y, then Enter if using nano
).
4. Import the GPG Key
You configured gpgcheck=1
, so you must import the Google signing key that was specified in the repository file. This key allows your system to verify the authenticity of the Chrome packages.
Import the key using the RPM package manager:
sudo rpm --import https://dl.google.com/linux/linux_signing_key.pub
This command downloads the key from the specified URL and adds it to your system’s list of trusted keys. Always verify the source when importing GPG keys.
5. Update Package Cache
Now that the new repository is configured and the key is imported, update your system’s package list to include the packages available from the Google Chrome repository.
Use the DNF package manager:
sudo dnf update
This command refreshes the package cache and makes Google Chrome available for installation.
6. Install Google Chrome Stable
With the repository enabled and updated, you can now install the stable version of Google Chrome.
Execute the installation command:
sudo dnf install google-chrome-stable
Your system’s package manager will calculate dependencies and prompt you to confirm the installation. Type y
and press Enter to proceed.
7. Launch Google Chrome
Once the installation completes successfully, Google Chrome should be available in your application menu under “Internet” or “Web Browser”. You can also launch it from the terminal by typing google-chrome
and pressing Enter.
By following these steps, you can successfully install the Google Chrome web browser on your CentOS 8 system, gaining access to its features and web compatibility.
Source: https://kifarunix.com/install-google-chrome-browser-on-centos-8/