The new RHEL descendant, Rocky Linux, is the distribution to watch. They are the successor to CentOS, as the situation with RHEL has changed. Producing a lot of hype for the new replacements. Rocky Linux, named after the person who started CentOS. So, you can expect the DNF package manager using .rpm. You can get it in a Gnome Workstation flavor, or you can choose a very robust Server flavor. There is some logic in using their full DVD installation media. You get to view the choices better, this includes adding software during installation that will improve your installation result.
So, we will cover how we installed Rocky Linux to test it out today. Just briefly, as we have a blog about VirtualBox. We will check out the DNF package manager, set up a user, work with a small project, and finally give you a straight-up honest review. If you are a huge fan of RHEL, CentOS or even Fedora server distributions, then you may have a new friend named Rocky. Let’s see how much of a contender this Rocky Linux is!
To test out Rocky, we decided to use VirtualBox. This was a little different, as you need to install it using the Red Hat template. That took a few installations to figure out. So make sure you do that. Save yourself some time. You can also make a live boot USB and fire up a home server just for fun. Also, more commonly you would be installing Rocky on a VPS, easing any issues. Be sure to give Rocky a few gigabytes of RAM to operate in, two gigabytes should be sure to run smooth. More for the workstation, as you may want to be able to watch a tutorial or something. Next, you want to make sure you give your VDI (Virtual Drive Image) enough room to install your workstation or server. You can set your VDI size to 16gb. Installing to a hard drive should not be a problem. Once again, using a VPS is easier. Mainly because, your service will provision a server with a local image you don’t have to produce.
During installation, you will see that the License Agreement is only inclusive of the operating system and that the packages themselves also come with their own agreements. The agreement is, like so many open-source EULA, without liability. It is always good to check the license of the product you are using in the open-source world. You may need to change your business model to respect them. Most of the time, you just have to provide it in the documentation with whatever changes you have made.
The installation media works like many other GUI installers. You are greeted with a screen asking about locales. Then you will see a million choices of what kind of configuration you want on a server or workstation. This is where using the full DVD image comes in handy. You have numerous choices, were as the mini ISO is not as rich with choices. The DVD is huge, like CentOS, you will really be able to install all they offer. If you have limited bandwidth, then go for the minimal. Overall, you can expect everything to be there like any other RHEL descendant.
Once your installation is complete, you need to update DNF. Making sure you have all the newest updates coming down the pipeline. Let’s go ahead and demonstrate that.
dnf update -y
This will give you fresh packages, making sure your installation is up-to-date. Now you might need to see what packages they have available to see if you need to add any.
Now, you might want to get away from using the root user by making an account to use as your admin user. You can also add a password during this. Not to mention sudo user privileges.
adduser linux && passwd linux && usermod -aG wheel linux
The first command makes the user and home directory. The next prompts a password for the user. Finally, we will add the user to the wheel group. Giving the user elevated privileges when sudo is used. We are just using linux as our username, but you can change that to your desired name. You are welcome to have fun, and be creative with your usernames. Just don’t forget them.
We wanted to try out a tried and true web server to see how easy that can be. This will work best from a home lab server or VPS, though it is possible using VirtualBox, it just takes extra configuration. We will use installing Apache as a hello world type of project. Furthermore, we will just be doing this for demonstration purposes. You will need to work on this to make it production ready.
sudo dnf install httpd -y
Now we will want to tell the system to run httpd at boot.
sudo stemctl start httpd
sudo systemctl enable httpd
Now let’s work with the firewall rules to get firewalld the program used, to allow for incoming web traffic.
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --permanent --zone=public --add-port=80/tcp
Next, we need to reload firewalld to make sure the changes have taken effect.
sudo firewall-cmd --reload
Now you should be able to confirm everything went right by going to the IP of your server in the browser, seeing the default page. On a VPS, you should be able to see the page confirming your installation instantly. On a home lab, you should see the same page confirming your installation. Using a VM means you have to route your IP to be accessible on your home network to get this result. This is out of the scope of this blog. We will have to detail that process another time. Let’s take a look.
Coming from the Ubuntu server community and trying on Rocky Linux has its differences. In most cases, you might just say the package manager is different. But, in this bloggers experience, this is a different ecosystem. The applications are very different. This is not a bad thing. After all, Linux distribution are named as such because they are so very different. Running Rocky Linux as a VM in VBox was not the greatest experience. It was a little hard to get it to run, having to use the Red Hat template at the start to get proper functionality or even a bootable operating system. The coolest thing about Rocky Linux, particularly for beginners, is the ease in which you can get cockpit running. In the opening terminal screen, the command is present to help you. This is a browser-based GUI for managing your server. We think this could be a game changer for a newer admin who does not yet have their terminal skills built up yet. Or perhaps to just speed the process without scripts. Rocky Linux is a strong replacement for CentOS. You should totally keep your eyes on it. Thanks for reading!