Some links in this post may be affiliate links. We may get paid if you buy something or take an action after clicking one of these, but without addictional costs for you compared to direct buying.
CentOS RPI featured image new

How To Install CentOS 8 in Raspbery PI

Check my RPI articles in Best Raspberry PI projects article or peppe8o.com home page. Or subscribe my newsletter (top right in this page) to be notified when new projects are available! Also interested to start 3D printing with a cheap budget? Visit my cheap 3D printers list
5
(1)

For people wanting to test different Linux distributions in our credit card sized computer, CentOS linux is a valid alternative enabling you to access a different repository from Debian one.

Derived from the sources of Red Hat Enterprise Linux (RHEL), it uses yum as package manager.

Like CentOS, also Fedora is owned by Red Hat. The main difference between the two disrtibutions is in their updates relase frequency: CentOS (like RHEL) is more focused on long-term support with advanced security features. On the other hand Fedora releases more frequent updates. This is one of biggest reason why CentOS is preferred to Fedora for server environments.

In this guide, I’m going to show you how to install CentOS in your Raspberry PI. This tutorial has been tested with Raspberry PI 3 Model B+, but will work also to install CentOS 8 in Raspberry PI 4.

If you want to know more about this distro, please refer to CentOS project home page.

What We Need

Raspberry PI 3 Model B+ image

As usual, I suggest adding from now to your favourite ecommerce shopping chart all needed hardware, so that at the end you will be able to evaluate overall costs and decide if continuing with the project or removing them from shopping chart. So, hardware will be only:

CentOS offers also different ARM based ISO. I’m opting to use the KDE version to test the delicious Desktop Environment performance on our hardware.

You also need a Windows PC with Etcher installed (to flash SD card) and Putty (if you want remote ssh access). Also a Windows compression program compatible with “.xz” files (like Winrar) is required.

Step-by-Step Procedure

Obtain ISO

With Windows PC, download ARM CentOS iso from CentOS ARM iso download page (selecting latest armhfp version and downloading Raspberry PI KDE iso) inside the PC where Etcher is installed. I’m using CentOS 7.7.1908.

Exctract the contet of downloaded file inside a directory at your choice. You will have a “.raw” file containing ISO image. Edit file name changing extension from “.raw” to “.img”. Confirm when Windows popups of risks about changing file extension.

Flash SD Card

This part will be done in your Windows PC.

Open Balena Etcher. Note: sometimes Etcher has problems flashing SD cards without administrative permissions, for this reason I suggest to run it as administrator.

Click select image button and select the file just renamed.

CentOS RPI Etcher step 02

Insert SD Card in your Windows PC. If not automatically recognised by Etcher, click “Select target” and select partition letter related to your inserted SD Card.

CentOS RPI Etcher step 03

Click “Flash!” button and wait for flashing operation to be finished.

Now you can close Etcher and extract your SD Card from Windows PC.

First Boot on Raspberry PI and First Setting

Insert SD card in your Raspberry PI, connect it to keyboard and HDMI (monitor). Power on the Raspberry PI.

The first screen shows system loading (will last about less than a minute).

Once prompted for login, insert default user credentials:

  • user: root
  • password: centos

Then you will go directly to desktop screen and your CentOS installation is finished!

Post Installation Tunings

Once installed, a few common tunings can be useful.

Update Your System

Make your OS up to date. From Terminal:

yum -y update
yum -y upgrade

Setup WiFi

This can be done in a very simple manner with icon in bottom-rigt side of your desktop:

CentOS KDE RPI Connections

From this panel, select your WiFi network and insert your password.

Remember to flag System Connection option if you want this WiFi network up after each reboot. Otherwise, you will need to login from Desktop Environment and manually enable connection.

Remote SSH

Once connected to a network (Wired or WiFi), remote SSH is enabled by default with default root user cedentials used to logon in Desktop environment. Find CentOS IP address from its terminal (with “ip addr” terminal command, since from CentOS 7 “ifconfig” terminal command is no more available) or from its networking settings.

Shrink Disk

By default, CentOS uses only a limited part of your disk. To use all available space in your SD Card, from terminal type the following command:

rootfs-expand

Final Considerations

CentOS with KDE surprised me for being so responsive and fast on Raspberry PI. In past (many many many years ago…) I already tested KDE on low end PC, but I found it heavy and abandouned for lighter Desktop Environments. I have to say that today I reconsidered it.

From CentOS side, it is a strong and stable OS. It derives from Red Hat Enterprise Linux (RHEL), an OS focused on large enterprises and critical businesses. So it has an important backend at its basis.

Enjoy!

How useful was this post?

Click on a star to rate it anonymously!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

1 thought on “How To Install CentOS 8 in Raspbery PI”

  1. Pingback: What Raspberry PI OS (Operating System) to use? - peppe8o

Leave a Comment

Your email address will not be published. Required fields are marked *

I accept the Privacy Policy