I, Menaka De Alwis, am a Linux enthusiast who loves working with open source technologies. I strongly believe in sharing knowledge that I have gained through my education and experience.
Upgrading to GUI can be done with minimal installation in two different ways: the upgrade to “Server with GUI” or “Workstation”. To upgrade, you need to have at least the following system requirements. Otherwise, there may be an issue during the virtual machine installation.
Minimum System Requirements for CentOS 8
2 GB RAM
2 GHz or Higher Processor
20 GB Hard Disk
64-bit x86 System
First of all, update the minimal installation, then check the options that we have for upgrading my “dnf grouplist all”.
Then, select one of the options, either “Server with GUI” or “Workstation”.
After completing the installation, do the following changes from the multi-user.target to graphical.target and reboot the system.
Then you can see the that it will divert to graphical.target rather than multi-user.target.
This isn’t a virus scanning software, but you can use this script for scanning viruses with ClamAV, an open source antivirus available on multiple platforms. After defining the path variable, the script automatically generates a report corresponding to your destination path. Not only that, but it can also be used as a cron job for scanning the system against viruses routinely. There are no background processes when running with this script for updating the virus signatures, so it does not unnecessarily consume resources. However, it updates the virus signatures with ClamAV before scanning.
Step 1
#Define the virus backup path(s)
BKP_PATH=/tmp/clamav
#Define the process report destination
REP_DEST=/var/log/clamav
#Define the scan target path(s)
SCAN_PATH=/home/john /var/pub/ftp
It is not necessary to define the backup path destination(BKP_PATH) if you have selected option three. When it identifies the virus, it will copy or move it into the defined path destination. (Eg:-/tmp/clamav)
The scan’s output is transferred to the report destination(REP_DEST). It explains the scanning result and updates information. If you are planning to define this path as a special path make sure that (assuming you are not root) you have necessary permission do so. (Eg:-/var/og/clamav)
Scan path (SCAN_PATH), does not mean that it scans the whole folder path that you defined recursively, but it scans the last folder in that defined path. In my example, the John folder and FTP are scanned recursively but not the home or pub. However, if you need to scan the whole machine, define the path as root (/). You can define the number of the paths with space.
Step 2
Option 1
The safest option as it gives us an indication of a virus and extracts it into the defined path. But, it does not remove the virus from its original location. Later, we can decide what actions are needed to mitigate the issue.
This is a relatively safe option, even though there can be issues if the virus affects the boot or any other system files. It moves all the infected into the backup destination, but there may be issues on the next reboot.
It is very unsafe if it identifies the infected files on boot or other systems files, which clears them all without inquiring. Think twice before selecting this option.
I have selected option 3 and I got the following report for my scan. The first part of the report indicates that the database is up to date. The second section of the report which shows that the decision that has made against found viruses. Further, it gives the summary that includes in scan base against how many viruses, number of files, directories and the files infected. Finally, the script gives us an indication of the termination of the scanning process at the end.
Step 4
We can deploy this script regularly automatically with a cron job. I deployed this script as root, but you can do it as any other user, as long as you have the correct permissions.
ClamAV is an open-source antivirus that is compatible with many operating systems, including CentOS 8. Linux is resistant to viruses most of the time, but it’s still susceptible to attacks. So, installing an antivirus on Linux gives it an additional layer of protection, especially on mail servers and other commercial servers.
Before installing ClamAV, make sure to download and enable the EPEL repositories on the machine. If not, use the following command below.
Then install ClamAV and its update tool, ClamAV-update.
Make sure to adjust the SELinux Booleans appropriately, as mentioned below.
To enable the antivirus program to scan no secure content in the system, we will need to enable the “antivirus_can_scan_system” boolean as follows. However, it is disabled by default.
In addition to that, to enable JIT (just-in-time) compile setup, it is important to enabling “antivirus_use_jit” boolean as shown in below. By default, it is also disabled.
Now Make sure the database is updating (DatabaseMirror database.clamav.net), and logs are writing (LogSyslog yes) by checking (correct configurations) the “/etc/freshclam.conf.” And then update the database as follows.
If you need to, download the virus signature from EICAR (European Institute of Computer Anti-virus Research) as I have done here for testing purposes.
Finally, scan for viruses. Once you have finished, ClamAV will notify you about the result of the scan. For further configurations, refer to the related man pages for “clamscan.”
Here, it scans infected files recursively throughout the machine (/).
Scan results show that there is one infected file on the system.
This article will show you how to set up initial keyboard configurations that see frequent use in day-to-day life. You can set it up with a GUI, but I tend to prefer a command-line interface.
Let’s see what default configurations exist in the machine.
Let’s explore some of the options that are in the language settings. Change the LANG=en_US.UTF-8 (language setting) to en_GB.UTF8.
The same configuration is possible by edition “/etc/locale.conf” file. In here, I have changed the language setting back to en_US.tf8
In this section, I have changed the virtual console keymap setting from “US” to “UK”. It is also possible to make these changes via a CLI as well as by editing the configuration file. (“/etc/vconsole.conf”).
Finally, I have changed the X11 layout from “Gb” to “us” by editing the config file (/etc/X11/xorg.conf.d/00-keyboard.conf), though it does not recommend.
(i) For changing X11 Layout from “us” to “gb” in CLI
(ii) And also, we can be changing back to X11 layout back to, from “us” to “gb.”
OpenSSL is not necessary to install in most cases as it updates alongside operating system updates. However, in some cases, the latest version (OpenSSL-3.0.0-alpha2) of the packages might not be up to date with the operating system. In this case, we’ll have to use these steps to update it to its latest version. However, it should not be used in the production environment.
First of all, update the system before every installation.
[root@localhost ~]# dnf update
Install the following supporting packages to install OpenSSL.
[root@localhost ~]# dnf install make gcc perl pcre-devel zlib-devel
Last metadata expiration check: 0:00:30 ago on Sun 24 May 2020 13:12:12 BST.
Package make-1:4.2.1-9.el8.x86_64 is already installed.
Package gcc-8.3.1-4.5.el8.x86_64 is already installed.
Package zlib-devel-1.2.11-10.el8.x86_64 is already installed.
First, install and configure the postfix server (which is in the article published on 19 May 2020). Then download SquirrelMail by going to http://rpmfind.net and search for squirrel mail rpm packages. Alternatively, go to my GitHub link and download the rpm plus the dependencies (using git).
First of all, we have to create the necessary kickstart installation file or configuration file. I have mentioned the configuration file on GitHub as well, so you can download it there, and amend as you need. For the initial boot process, you download the minimal version (easy to download) of CentOS 8 or RHEL 8 iso image. Then, follow the steps that I have provided.
Step 1
Mount the iso file to the virtual machine as follows. If you don’t want to mount the file, you must have a bootable cd/DVD or USB, ..etc.
Step 2
Press the tab key at the boot screen and give the path as I mentioned below. (NB:-Pointing to the raw file)
The Kickstart Configuration file is as follows. It is import to direct the http server to the Linux base repositories, not the iso files.
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'uk'
# Root password
rootpw --iscrypted $1$/V27Qc/N$xi6PcrfmvghGOI9/Yo70t0
# Use network installation
url --url="http://mirror.ox.ac.uk/sites/mirror.centos.org/8-stream/BaseOS/x86_64/os/"
# System language
lang en_US
# Firewall configuration
firewall --enabled
# System authorization information
authselect --useshadow --passalgo=sha512
# Use graphical install
graphical
firstboot --disable
# SELinux configuration
selinux --enforcing
# Reboot after installation
reboot
# System timezone
timezone Europe/London
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all
# Automatic partitioning
autopart --type=plain --fstype=ext4
%packages
@^minimal-environment
@core
chrony
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb=auto
%end
%anaconda
pwpolicy root --minlen=6 --minquality=50 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=50 --notstrict --nochanges --notempty
pwpolicy luks --minlen=6 --minquality=50 --notstrict --nochanges --notempty
%end
%post
#!/bin/bash
dnf update -y
dnf install epel-release -y
%end
Step 3
You can see the following screen during the installation process. At the end, you will have to unmount the iso image and let it to boot normally. When you’re at the login, the login screen will appear. Then, enter the username as root and password as 123456 to complete the process.