Fedora – Linux Hint https://linuxhint.com Exploring and Master Linux Ecosystem Wed, 10 Mar 2021 03:27:31 +0000 en-US hourly 1 https://wordpress.org/?v=5.6.2 How to List Startup Services at Boot Time in Fedora Linux? https://linuxhint.com/list-startup-services-at-boot-time-in-fedora-linux/ Tue, 09 Mar 2021 02:05:23 +0000 https://linuxhint.com/?p=93064 Red Hat invented the ‘systemd’ as a manager for system and service on Linux OS. It is compatible with the old SysV and LSB init scripts with more features such as simultaneous start-up of system services at boot time, daemon (background process) activation on-demand, or service control logic based on dependency.

Systemd brings the concept of systemd units in Linux. For e.g., service unit, target unit, mount unit etc. are unit types with file extension as .service, .target, .mount respectively. The configurational file representing these units are stored inside the directories: /usr/lib/systemd/system/, /run/systemd/system/, /etc/systemd/system/

Earlier versions of Red Hat Enterprise Linux (RHEL) used init scripts. These scripts were written in BASH and were located in the directory “/etc/rc.d/init.d/”. These are scripts used to control the services and daemons. Later in RHEL 7, service units were introduced to replace the init scripts. Fedora, which is an upstream OS of Red Hat Enterprise Linux, has started using the systemd from the Fedora version 15.

Service units have .service file extensions and have similar roles as init scripts. “Systemd” uses the “systemctl” utility to manage system services. It can be used to view, start, stop, restart, enable or disable these services.

Advantages of Systemd Over Init System

  1. With systemd, we can prioritize necessary services over less significant services.
  2. Cgroups are used by systemd to keep track of processes and control the execution.environment.
  3. Systemd still supports the old init process and has more control.
  4. Systemd is capable of dealing with dynamic system configuration modifications.

What Will We Cover?

In this guide, we will learn about managing systemd processes. We will see how to enable and disable startup services at boot and how to do service operations like start, stop, restart, etc. We have performed the below exercises on Fedora 30 workstations, which will be most applicable to other Linux OSes.

List Startup Services at Boot in Fedora Linux

The old SysV method uses the service and chkconfig commands to manage the services. These commands are now replaced with the systemd commands like systemctl. Let us see some of the operations of “systemctl” on various services in Linux.

1. To list all the services running on your system, along with their states (enabled or disabled), use the command below:

$ sudo systemctl list-unit-files --type=service

A service can have three states: 1) enabled 2) disabled 3) static

An enabled service has a symlink in a .wants directory, whereas a disabled service does not have one. A static service does not have an install section in the corresponding init script. So, it cannot be enabled or disabled.

To get more details of the services, the below command should be used.

$ sudo systemctl -at service

Summary of the above column names:

UNIT — systemd unit name (here a service name).
LOAD — Specify if the systemd unit was loaded correctly or not.
ACTIVE — State of the unit (here service).

SUB — A sub-state of a unit activation.
DESCRIPTION — A short info of the unit.

We can also use the following command:

$ sudo ls /lib/systemd/system/*.service

or

$ sudo /etc/systemd/system/*.service

The “/etc/inittab” is now replaced by “/etc/systemd/system/” in systemd. This directory now contains the symlinks to the files in the directory “/usr/lib/systemd/system”. The init scripts are placed in the “/usr/lib/systemd/system”. A service must be mapped to “/etc/systemd/system/” for starting it at system boot. For this purpose, the systemctl command is used in Fedora and other latest Linux systems.

2. Let us see the below example of enabling the httpd service:

$ sudo systemctl enable httpd.service

Also, we can use the command below to filter all the enabled services:

$ sudo systemctl list-unit-files | grep enabled

or use the command:

$ sudo systemctl | grep running



3.
To list all the active (running) services, use the command:

$ sudo systemctl -t service --state=active

4. To see which services are enabled to start automatically on system boot, we can also use the following command:

$ sudo systemctl list-unit-files --type=service --state=enabled --all

5. Similarly, we can check the services disabled to start at boot with the command:

$ sudo systemctl list-unit-files --type=service --state=disabled --all

6. We can also see what time each service is taking at startup:

$ sudo systemd-analyze blame

7. To check if a service is enabled for autostart at boot, use the command:

$ sudo systemctl is-enabled xxx

Put the name of service in place of xxx. E.g., in the case of httpd service, the command will be:

$ sudo systemctl is-enabled httpd.service

or

$ sudo systemctl is-enabled httpd

8. To check the status of a service, use the command:

$ sudo systemctl status xxx.service

For example, to check the status of the sshd service:

$ sudo systemctl status sshd.service

9. To check if a service is running or not, just run the below command:

$ sudo systemctl is-active xxx.service

For example, to check the telnet status:

$ sudo systemctl is-active telnet.service

10. To start a dead or inactive service, use the command:

$ sudo systemctl start xxx.service

For example, to start an sshd service:

$ sudo systemctl start sshd



11.
To disable a service at system boot

$ sudo systemctl disable xxx

For example, to disable the httpd service:

$ sudo systemctl disable httpd.service

or

$ sudo systemctl disable httpd

12. To restart a running service

$ sudo systemctl restart xxx.service

To restart the sshd service, use the command:

$ sudo systemctl restart sshd

If the service is not already running, it will be started.

13. To reload a running service

$ sudo systemctl reload xxx.service

For example, reload the httpd service with:

$ sudo systemctl reload httpd.service

This command reloads the configuration of a specific service. To reload the unit configuration file of systemd, we need the command:

$ sudo systemctl daemon-reload

14. To list all the dependencies of a service:

$ sudo systemctl list-dependencies xxx.service

In the case of httpd service, the command will be:

$ sudo systemctl list-dependencies httpd.service

Conclusion

In this guide, we have seen various ways of managing services with systemd utility like enabling services at boot time, starting and stopping them, etc. If you were used to the service command of old Sysvinit, you should switch to systemd as it has more features and it is the default init system in newer versions of Fedora, RHEL, and most of the other major Linux distributions.

]]>
Installing Apache CouchDB on Fedora https://linuxhint.com/installing-apache-couchdb-on-fedora/ Fri, 05 Mar 2021 10:33:00 +0000 https://linuxhint.com/?p=92891

Developed by Apache software foundation, CouchDB is a database management system that stores data in JSON documents. We can access our data using the HTTP protocol. Similarly, we can manipulate the data with JavaScript. CouchDB database has RESTful HTTP API for managing database documents

What Will We Cover?

In this guide, we will tackle how we can install Apache CouchDB’s latest version on Fedora 30 workstation. We will also use the source code from the official website for this guide. Before we can start, ensure the following requirements are met.

Prerequisites:

  1. User account with “sudo” privileges
  2. Internet connection to download various files
  3. Basic knowledge of running commands on Linux

Installing Apache CouchDB:

Apache CouchDB requires various dependencies before it can be installed. The official site of CouchDB list these dependencies and their exact version number to be installed:

Erlang OTP (19.x, 20.x >= 21.3.8.5, 21.x >= 21.2.3, 22.x >= 22.0.5)

ICU

OpenSSL

Mozilla SpiderMonkey (1.8.5)

GNU Make

GNU Compiler Collection

libcurl

help2man

Python (>=2.7) for docs

Python Sphinx (>=1.1.3)

These dependencies can be installed from the official repository of Fedora 30. Let us install them:

Install the above-mentioned dependencies from the following command below:

$ sudo dnf install autoconf autoconf-archive automake curl-devel erlang-asn1 erlang-erts erlang-eunit gcc-c++ erlang-os_mon erlang-xmerl erlang-erl_interface help2man js-devel-1.8.5 libicu-devel libtool perl-Test-Harness

Once these dependencies are installed, we can continue to the process of installing Apache CouchDB, as shown below:

Step 1. Download the tarball file for Apache CouchDB using the ‘wget’ command:

$ wget https://mirrors.estointernet.in/apache/couchdb/source/3.1.1/apache-couchdb-3.1.1.tar.gz

Step 2. Extract the downloaded tarball file with the command given:

$ tar -xf apache-couchdb-3.1.1.tar.gz

Step 3. Move the extracted folder to /opt folder and change the directory there:

$ sudo mv apache-couchdb-3.1.1 /opt/

$ cd /opt/apache-couchdb-3.1.1/

Step 4. To configure the package for your system, use the configure script, as shown below:

$ ./configure

If you want to see options available with the configure script, use the command:

$ ./configure --help

At the end of the script, if you see the message:

You have configured Apache CouchDB, time to relax.

It means that you have correctly configured the package.

Step 5. Now we will build the source code by running the command below:

$ make release

Or use gmake if make does not work.

In case you got the below error:

ERROR: Reltool support requires the reltool application to be installed!ERROR: generate failed while processing

IT means that you must install the erlang-reltool package to build the CouchDB. Use the command below for this:

$ sudo dnf install erlang-reltool

Now, run the ‘make release’ again with the command below:

$ make release

If the above command finishes successfully, then you should see the message shown below:

“… done

You can now copy the rel/couchdb directory anywhere on your system.

Start CouchDB with ./bin/couchdb from within that directory.”

Step 6. Registering CouchDB user

CouchDB suggests creating a separate user (couchdb) for running its services. This is because of security considerations. Create the user with the command below:

$ sudo adduser --system -m --shell /bin/bash --comment "CouchDB Administrator" couchdb

The above command will create a user named as “couchdb”, together with a home directory and bash shell.

Step 7. Now use the cp command to copy the directory “rel/couchdb” to the couchdb’s home directory (/home/couchdb):

$ sudo cp -R /opt/apache-couchdb-3.1.1/rel/couchdb /home/couchdb

Note: Use the path “rel/couchdb” relative to your path of extraction for couchdb.

Step 8. We now need to change the ownership of the CouchDB directories using the command below:

$ sudo chown -R couchdb:couchdb /home/couchdb/couchdb

Step 9. Similarly, change the permission of the CouchDB directories with the command given below:

$ find /home/couchdb/couchdb -type d -exec chmod 0770 {} \;

Step 10. To modify the permissions for the ini files, open a new terminal window and run the below commands:

$ sudo -i

# chmod 0644 /home/couchdb/couchdb/etc/*

Step 11. Create an admin user before starting couchdb (required in CouchDB version 3). For this, open the file local.ini file in the directory “/home/couchdb/couchdb/etc/local.ini”.

# vi /home/couchdb/couchdb/etc/local.ini

Now go to the admin’s section and uncomment the admin line, then put your password in the following way:

admin = YourPassword

In place of YourPassword, put the password you want to use. You can add any admin user in the format of “username = password”. See the reference picture below:

Now return to the normal user terminal by typing exit:

# exit

Step 12. We will start the CouchDB server with the command given below:

$ sudo -i -u couchdb /home/couchdb/couchdb/bin/couchdb

The above command starts the CouchDB as the couchdb user, as shown in the following picture:

Step 13. Open a web browser and browse the below address to access the admin panel:

http://127.0.0.1:5984/_utils/index.html

To verify the installation, go to:

http://localhost:5984/_utils/verify_install.html

CouchDB can be configured as a single node or clustered. Let’s see the setup for a single node:

Step 1. Go to http://127.0.0.1:5984/_utils#setup

Step 2. Login with your admin account

Step 3. For the first-time setup, click on the setup icon and select the option “Configure a Single Node”.

Step 4. Create a new admin user for this setup. We can also continue with the previous “admin” user. In our case, we have created a new user: admin2 and password: 123. Now click the configure Node button:

Step 5. When you click the database icon, it will show you two system databases:

Note: Always restart the couchdb after creating an admin account

Step 6. After restarting the couchdb, create a new database in the admin2 account, as follows:

You should see a “database created successfully” message, as shown in the image below:

Conclusion:

In this guide, we learn how to install CouchDB using the source code on Fedora 30 workstation. We have managed to configure various aspects of the installation process and troubleshoot some of the errors. We have also learned to set up the single-node configuration from GUI. What you can do next is:

  • To manually configure CouchDB for a single node; and
  •  Create a clustered setup for CouchDB
]]>
How to install Enlightenment Desktop in Fedora 30 Workstation https://linuxhint.com/install-enlightenment-desktop-fedora-workstation/ Tue, 02 Mar 2021 13:38:14 +0000 https://linuxhint.com/?p=92435 Enlightenment is a desktop environment like GNOME, KDE, MATE, Cinnamon, and others. The first release appeared in early 1997. It is a graphical desktop environment maintained by the Enlightenment project. It has a typical UNIX/X11-based desktop style.

It has a rather elegant desktop interface and a different central philosophy of design.

Enlightenment desktop can manage windows and files. It can do compositing. It can also start applications as well as handle UI and manipulate system settings. In fact, Enlightenment was the first Window Manager to bring themes into the X11 window system.

Enlightenment is in existence before GNOME and is hardly younger than KDE. Its first release was version 0.1 in the first part of 1997. Initially, it was launched as a simple window manager. Despite the limited capability of computers to handle a user interface’s complex functionality, it proved to be very flexible in terms of behavior and visuals features.

Enlightenment has too many features along with too much flexibility. One can configure it to be a simple GUI desktop or make it more dazzling with various activity options.

What will we cover

In this guide, we will see how to install the Enlightenment Desktop environment on Fedora 30 OS. We will see the installation method via the official repository and via source code. Let’s get started with the installation process of Enlightenment Desktop.

Prerequisites

  1. Fedora 30 OS with Gnome desktop installed on your system.
  2. Basic idea of running commands on Linux command-line interface.
  3. Root user account or a normal user account with sudo privileges.
  4. Good Internet connectivity to download various files.

Method 1. Installing Enlightenment Desktop Using official Fedora Repositories

Step 1. Installation using this method is pretty easy. You only need to install the enlightenment group package to get things working.

$ sudo dnf install @enlightenment

That’s all. The above command installs all the required packages and dependencies. Your new desktop environment is installed and ready to use. We only need to logout and login again to apply the changes.

We will see the configuration steps after Method 2. If you are not interested in installing the Enlightenment Desktop from source code, you can skip to the configuration section.

Method 2. Installing Enlightenment Desktop from the source code

Installing an enlightenment desktop from source code is a bit complex. We need to install several needed packages before running the install scripts. Without these packages, we might get an error like the one below:

Package requirements (eeze >= 1.20.5 ecore >= 1.20.5 eina >= 1.20.5) not found

Let us first install these dependencies:

1. Install the efl-devel package:

$ sudo dnf install efl-devel-1.21.1-4.fc30

2. Install the xcb-util-keysyms-devel package:

$ sudo dnf install xcb-util-keysyms-devel

Now we can continue with the further process of installation:

Step 1. Download the archive binary of enlightenment from the below command:

$ wget https://download.enlightenment.org/rel/apps/enlightenment/enlightenment-0.22.4.tar.xz

Step 2. Extract the downloaded file with the command:

$ tar -xf enlightenment-0.22.4.tar.xz

Step 3. Now move to the extracted folder with the change directory command:

$ cd enlightenment-0.22.4/

Step 4. Now to configure the package for your system, run the configure script as below:

$ sudo ./configure

You might get some error after running the above script like:

config.status: error: Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).

To fix such error, add the option –disable-dependency-tracking to the configure script as shown below:

$ sudo ./configure --disable-dependency-tracking

Step 5. To compile the code, we need to install the make utility with the command:

$ sudo dnf install make

If the configure script finishes without any error, we can compile the source code:

$ make

Step 6. Now install the enlightenment package with the command:

$ sudo make all install

After the above command is finished successfully, our enlightenment desktop is installed, and we can continue to configure it.

Configuration

Follow the below steps to configure the enlightenment desktop environment:

Step 1. Logout from your current session as shown below:

Step 2. Now at the start screen, select the ‘Enlightenment’ session from the setting icon as shown below:

Step 3. Now login with your credentials. A startup screen might appear and will quickly fade out. On the next screen, it will ask you to select the language for installation. You can use a usb mouse or keyboard to select the required language. Now hit the Next button to continue.

If you are not sure, you can stick to the system default language.

Step 4. Select the Keyboard layout of your choice and hit the Next button to move further:

If you are not sure, you can stick to a commonly used English(US) keyboard.

Step 5. The next step will ask to select a profile from three options: 1. Mobile 2. Computer 3. Tiling. We are selecting the Computer (Standard Enlightenment) profile:

Step 6. Now it will display different sizes of titles to select from. We have chosen the default highlighted 1.0 Title size. You can select as per our choice:

Step 7. After the above window, the configuration process will ask to select a behavior for window focus. If you select the first option, the window will be focused only when a mouse is clicked on it. In the second option, the window is selected whenever the mouse enters it or hovers upon it. We are sticking with the already checked second option.

Step 8. In this part, you can choose the way you want to bind the mouse actions (move, resize, open) with the keyboard buttons ( shift, ctrl, alt, win, altgr). The default option is the alt key. We are just entering the Next button without checking any option to use the default setting (alt key).

Step 9. If the next screen says ‘Connman network service not found’, just skip the message and hit the Next button:

Step 10. In the next screen, we have not disabled the Compositing feature.

Step 11. Here it will ask for automatic checking of new versions, updates, etc. Simply mark the checkbox (already checked by default) and continue.

Step 12. Enable the taskbar and hit the Next button:

Lastly, enter the Next button to launch and explore the new desktop environment.

Conclusion

Congratulations, you have successfully installed the Enlightenment desktop on Fedora 30 workstation. Enjoy the numerous features and customize them as per your choice. While following this guide, you may have observed that installing from source code is a bit more typical than installing it. If you are a Linux beginner, we will recommend you to use the first method.

]]>
How to Install and Configure Git on Fedora? https://linuxhint.com/install-and-configure-git-on-fedora/ Fri, 26 Feb 2021 06:28:53 +0000 https://linuxhint.com/?p=91756 Git is one of the popular Distributed Version Control Systems (DVCS) among programmers. It lets you manage the incremental changes you make to your code. We can also easily revert to the earlier version of a code. Multiple developers can work simultaneously on the same project. Team members can see the changes to a project, message associated with the changes, their collaborators, project timeline, progress of the work, etc.

Benefits of Using Git

Git is an open-source tool and is free for anyone to use. Almost all the changes are done locally and there is no need for propagating those changes to any central server as well. A project can be edited locally and can be later saved to a server, in which every contributor can see and track these changes. Unlike centralized VCS, Git does not have a single point of failure.

Since Git has distributed architecture, everyone can get the latest snapshot of the work, as well as the entire repository contents and its history. If for some reason the server goes down, a copy from the client can be used as a backup and restore to the server.

To store and identify objects within its database, Git uses a cryptographic hash function known as the SHA-1 hash. Before storing any data, Git checks summed it and uses this checksum to refer to it.

It is very easy to install and does not require high-end hardware on the client-side. Many online hosting services like GitHub provide services to host your Git project online for remote access. One can get an entire backup of a repository on their local computer. Changes made by a contributor to a repository become its part after a commit operation.

The commit operation makes a snapshot of the current state in the repository or the database. After we have worked on our project locally, we can publish local commits to our remote Git database or repository using the push command.

What Will We Cover?

In this guide, we will see how we can install and configure Git on Fedora 33 OS. We will install Git from the official repository on Fedora, as well as from the source code downloaded from the Git official website. Let’s get started with the Git installation process.

Method 1. Installing Git from Fedora Repositories Using dnf/yum

This is a very simple method of installing Git. You just need to run the commands below:

Step 1. Update the available system packages with the following command:

$ sudo dnf -y update

Step 2. Now install git with the below command:

$ sudo dnf -y install git

After the above command finishes, use the following command to check the installed version of Git:

$ git --version

That’s all! As you can see, Git already comes installed on Fedora 33, but if it is not, you can install it from the above command.

In this case, you want to uninstall Git, simply run the appended command below:

$ sudo dnf  -y remove git

Method 2. Building Git from source code on Fedora

Git can also be installed on Fedora from the available source code on the Git website. To install them from source code, follow the below procedure:

Step 1. Git requires several packages to be installed before we can install it from source code. Run the below command to install these dependencies:

$ sudo dnf install dh-autoreconf curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel

Step 2. Once we have all the required dependencies in place, we can move on to download the source code. Run the following command to download the compressed tarball of Git source code:

$ wget https://www.kernel.org/pub/software/scm/git/git-2.30.1.tar.gz

Alternatively, you can also visit this link and manually download the file to your system. This is shown here:

Step 3. Extract the downloaded tar file with the below command:

$ tar -zxf git-2.30.1.tar.gz

Step 4. Now move to the extracted folder on the command line window:

$ cd git-2.30.1

Step 5. Run the make command:

$ make configure

Step 6. Run the config script:

$ ./configure --prefix=/usr

Step 7. Run the make all command:

$ make all

Step 8. Run the make install command:

$ sudo make install

Now, Git is installed on your system. Check the version from here:

$ git --version

Configuring Git settings on Fedora

After installing Git, we will need to add our username and email address to our Git account. This will enable us to commit our code properly. This information is used by Git with every commit we make.

Note: The Git username is not the same as that for GitHub.

To set these details, run the following commands:

$ git config --global user.name "your-username"
$ git config --global user.email "your@emailID"

Here replace “your-username” with a username of your choice and “your@emailID” with your email id. The global keyword will make this information be used by every change on your system. If you want to use different information for a project, then simply remove the global keyword when you are inside that specific project.

Let’s add a sample username and email as:

User-name = linuxhint
User-email = mail@me.com

Run the following command to check if these settings worked correctly:

$ git config --list

This is shown below:

Conclusion

Congratulations, you have now successfully installed Git on your Fedora OS. If you have followed this tutorial properly, you will have noticed that Method 1 is very straightforward for installing Git. You only need to run a simple command to get the Git on your system. Meanwhile, Method 2 is a long way route for installing Git, and it is recommended only for advanced users and system administrators. The benefit of using this method is that you can get its latest available version. For example, in Method 1, the version of Git installed from the official repository is 2.28.0, whereas in Method 2 we have version 2.30.1.

]]>
How to configure a static IP address on Fedora? https://linuxhint.com/configure-static-ip-address-fedora/ Fri, 26 Feb 2021 02:02:29 +0000 https://linuxhint.com/?p=91707 IP address configuration is one of the normal tasks system administrators do on a System.
IP address is used for identifying a device on a network. There are basically two types of IP addresses: 1) Public 2) Private. We can further divide these IP addresses into IPv4 and IPv6.

By default, Fedora uses DHCP-provided IP addresses when it is connected to a DHCP server. We can use the below methods to use static IP addressing and other networking options like vlans, bonds, bridges, teams, etc.

What will we cover?

In this guide, we will see two methods for setting a static IP on Fedora 33 workstation. Although this guide is performed on Fedora 33, it should also work on other Fedora versions. Let’s get started with this process.

Before you start

Please note that we have assumed that you have

  1. a basic understanding of IPv4 addressing and other computer networks basics
  2. knowledge of Linux command-line interface
  3. root access on the system or a user with root privileges.
  4. Fedora 33 OS installed on your system

Method 1. Using nmcli command-line utility for setting a static IP address on Fedora 33

Nmcli or NetworkManager Command Line Interface is a command-line utility for managing network connections. Users and scripts both use the nmcli utility to control NetworkManager. For e.g., you can edit, add, remove, activate or deactivate network connections. We can also use it to display the status of a network device.

The syntax of a nmcli command is as follows:

nmcli [OPTIONS] OBJECT { COMMAND | help }

Step 1. To check the overall status of NetworkManager, use the command:

$ nmcli general status

You can also use the below command to see a terse output about the connection state:

$ nmcli -t -f STATE general

As you can see, it is showing a connected state for now. If you turn off the wired connection, it will change to a disconnected state. This is shown in below picture:

Step 2. Now, after connecting to a network, we can see the active connections on our system using:

$ nmcli con show -a

You can also use the command below to see active and inactive interfaces:

$ nmcli dev status

As you can see, right now, only one connection is active on device enp0s3. To see the current network configuration for enp0s3, use the command:

$ ifconfig enp0s3

You can also use the ip command:

$ ip addr | grep enp0s3

Please note that our current IP is 10.0.2.15; we need to set it to 10.0.2.27.

Step 3. To change the IP of enps03 to a static IP, use the following command format:

$ sudo nmcli connection modify network_uuid IPv4.address new_static_IP/24

Where network_uuid is as obtained in Step 2. ‘new_static_IP’ is the new IP we want to assign statically. If our new IP address is 10.0.2.27, then the command will be:

$ sudo nmcli connection modify f02789f7-9d84-3870-ac06-8e4edbd1ecd9 IPv4.address 10.0.2.27/24

If you are feeling uncomfortable with the network UUID, you can also the connection name (Wired connection 1) as shown below:

$ sudo nmcli connection modify 'Wired connection 1' IPv4.address 10.0.2.27/24

NOTE: To avoid IP conflict, do not use an already assigned IP.

Step 4. Now configure the default gateway for our IP with the command:

$ sudo nmcli connection modify 'Wired connection 1' IPv4.gateway 10.0.2.11

Step 5. Now Set network DNS address using:

$ sudo nmcli connection modify 'Wired connection 1' IPv4.dns 8.8.8.8

Step 6. Now we need to change the IP addressing scheme from DHCP to static:

$ sudo nmcli connection modify 'Wired connection 1' IPv4.method manual

Step 7. Now turn off and then turn on the connection to apply changes:

$ sudo nmcli connection down 'Wired connection 1.'
$ sudo nmcli connection up 'Wired connection 1.'

All the above steps are shown in the below picture:

Now again, check the Gateway and IP with the command:

$ route -n
$ ip addr | grep enp0s3

You can see the Gateway and IP addresses are both changed to the values we have set in the above steps.

Method 2. Using a graphical method for setting a static IP address on Fedora 33

This is a very straightforward way to set a static IP address on Fedora 33 OS; follow the steps below:

Step 1. On the Gnome desktop, go to the activities tab and search for Settings and launch it:

Step 2. In the left panel, you will see the network tab. Inside the network tab, click on the Settings icon as shown below:

Step 3. A new window will open, displaying the already configured IP addresses, Gateway, DNS as shown below:

Step 4. In the above window, select the IPv4 option from the top bar:

Step 5. Inside the IPv4 method segment, select the radio button corresponding to the manual option:

Step 6. When you select the manual method, it will open some text boxes for filling the IP addresses, DNS, Routes, and other information related to network configuration, as shown in the above image. We are adding the following details:

IP addresses: 10.0.1.27
Netmask: 255.255.255.0
Gateway: 10.0.1.0
DNS: 8.8.8.8

We are leaving the Route segment row to be set automatically. See the reference picture below:

Step 7. Now we only need to stop and then restart the network connection using the connection switch in the main Network Tab as shown below:

  1. Switch Off
  2. Switch On

Step 8. Now we will verify if the new IP address, DNS, and Gateway are assigned properly. Go to the main Network Tab and click the settings icon as depicted in the picture below:

Step 9. I noticed that IP address, Gateway, and DNS are all changed to the new values that we have selected in the above steps:

Conclusion

That’s all for now; we have successfully set a static IP address on Fedora 33 workstation. We have seen both the command line and graphical methods. The CLI method is the only way to set the static IP address on non-gui or headless servers. The graphical method is more convenient for desktop users and novice Linux users.

]]>
Adding a New Disk Device to Fedora Linux https://linuxhint.com/add-new-disk-device-fedora-linux/ Wed, 24 Feb 2021 00:33:45 +0000 https://linuxhint.com/?p=91169 Storage is one of the cheapest IT commodities in today’s market. Running low on disk space? Just grab a brand new high-capacity storage device from the market. Need high-performance storage? Then grab a high-performance SSD.

After the device is connected, it should be recognized in the system. However, at the software level, it still requires some configuration to use it properly. In this guide, check out how to add a new disk device to Fedora Linux.

Disk precautions

When you connect the new device to the computer, assuming the unit is functional, it should be recognized by the BIOS. If not, then here are a few possibilities to look for.

  • Ensure that the device is connected properly. Often, that’s a major source of headache, especially with external storage devices.
  • While it’s uncommon, you may also have a dead device at hand.
  • Sometimes, certain storage devices aren’t supported by some computers. It’s dependent on multiple factors like brand, model, etc.

Finding the disk device

Finding the new drive using CLI

Assuming that the device is functional and connected properly, let’s get started.

In Linux, all the disk devices are assigned a unique device name that begins with “hd” or “sd”. For example, “/dev/sda” is the first device label, “/dev/sdb” is the second device label.

Launch the terminal, and run the following command. It should list all the connected disk devices.

$ ls -l /dev/sd*

As the output suggests, the disk “/dev/sda” has two partitions, “/dev/sda1” and “/dev/sda2”.

Now, connect the new storage device, and run the command again.

$ ls /dev/sd*

Here, the new disk “/dev/sdb” has a single partition “/dev/sdb1”. If the device had no partition, there’d be only “/dev/sdb” in the result.

Finding the new drive using GUI

If you prefer using GUI, then it’s suggested to use the GNOME Disks. It’s a part of the GNOME desktop.

An alternative tool is to use GParted. It’s one of the most powerful tools for managing disk devices. GParted can handle disk formatting, partitioning, UUIDs, and even data rescue. Install GParted right away.

$ sudo dnf install gparted

Launch GParted. To check the partitions of a certain disk, select it from the drop-down menu on the top-right corner.

Creating partitions

A partition in disk drives is a logical separation of the disk space. Depending on the disk space and partition table type, the number of partition varies. Generally, high-capacity disks are split into multiple partitions.

If the disk is already partitioned properly, then you may skip this part. Following this step will erase any existing data from the disk, ensuring that there’s nothing valuable stored.

Ensure that the disk isn’t in use. If any of the disk partitions are mounted, make sure to unmount them. Learn how to unmount partitions using umount command.

Creating a partition using CLI

Fdisk is a powerful tool for managing disk partitions. One major benefit of fdisk is, all the changes you make aren’t immediately applied to the disk. All the changes are stored in memory and only applied when you tell the fdisk to do so. Launch the fdisk tool in interactive mode for our target device.

$ sudo fdisk <device_label>

It’s an interactive mode with lots of options available. To see all the available options, enter “m”.

Enter “p” to print all the partitions in the current partition label. It’ll also report the partition table type (GPT/DOS/SGI/Sun).

If there’s no need for the partition table type to change, then proceed with deleting the partition. Enter “d” to prompt fdisk to delete the partition.

To change the partition type, enter “g” (GPT), “G” (SGI (IRIX)), “o” (DOS), or “s” (for SUN). In this case, I’m going to create a new empty GPT partition table.

Enter “w” to write the new partition table. Note that it’ll remove any existing partitions.

At this point, the fdisk will exit. The disk will contain all its free space. To make the space usable, it has to be partitioned. Re-launch fdisk for the disk.

$ sudo fdisk /dev/sdb

The device must contain a partition or more to use the available storage space. To create a partition, enter “n”.

Fdisk will ask for various information, for example, the partition number, first/last sector, partition size, etc. Unless there’s something custom necessary, hit “Enter”. Fdisk will use the default values and the entire disk space for the new partition.

To write the changes to the disk, enter “w”.

Creating a partition using GUI

GParted another powerful solution for managing disk devices. Launch GParted.

From the top-left corner, ensure that the correct device is selected.

If the disk has any partition mounted, performing any alteration is going to be problematic. Right-click the partition(s) and select “Unmount”.

If the partitioning is fine, then there’s no need to touch anything. If not, consider re-partitioning the drive. Right-click the partition(s) and select “Delete”.

To create a new partition, right-click the “unallocated” space, and select “New”.

Change the values as you see fit. For this demonstration, the entire disk space will be under a single partition.

To take the changes into effect, click the “Apply All Operations” button. All the changes will be written to the disk, so ensure that everything is configured properly.

Once the process is finished, GParted will show the following window.

Creating a filesystem

The disk is properly partitioned. The next step is to create a Linux filesystem on the partition so that the operating system can use the space for storing data.

Creating a filesystem using CLI

Depending on the desired filesystem type, the command to run will change. By default, it’s recommended to make an EXT3/EXT4 filesystem for the best experience. If the disk is a portable one and used cross-device, then FAT16/FAT32 filesystem is recommended. However, FAT16 and FAT32 filesystems have a fixed value of the highest single file size.

Determine the new partition label.

$ lsblk

In this demonstration, our target partition is “/dev/sdb1”. Note the mount point. Then, unmount the partition using the following command.

$ sudo umount -v <mount_point >

To format the partition, run the following command.

$ sudo mkfs -v -t <filesystem> <partition>

As for the filesystem, the mkfs tool supports the following values.

  • ext3
  • ext4
  • fat16
  • fat32
  • ntfs
  • apfs
  • hfs

Creating a filesystem using GUI

Launch GParted and select the target device. Right-click the partition, go to “Format to”, and select your desired filesystem.

Once selected, click the “Apply All Operations” button.

Mounting filesystem

Finally, the filesystem is ready to be used. It has to be mounted to be accessible from the operating system.

Mounting a filesystem using CLI

Here’s a guide on how to use the Linux mount command for mounting partitions. To mount our desired partition, first, create a directory. This directory will act as the mount point.

$ sudo mkdir -v /my_partition

Now, mount the partition to the mount point we just created.

$ sudo mount --source <partition> --target <mount_point>

Verify if the mounting was successful.

$ mount

Mounting a filesystem using GUI

While GParted is capable of mounting a partition, it won’t allow the action unless the partition is declared under “/etc/fstab”.

An alternative is to use the GNOME Disks utility. Launch GNOME Disks. From the left panel, navigate to the target device. Select the partition and click “Mount selected partition”. Disks will automatically create a mount point for the partition.

Final thoughts

This guide demonstrates adding a new disk device to Fedora. It isn’t anything difficult. It’s a slightly time-consuming process. The good news is, it’s mostly a one-time process. However, it’s common that you may need to perform these actions once again.

Happy computing!

]]>
How to Install Official Wallpaper Packs on Fedora? https://linuxhint.com/install-official-wallpaper-packs-on-fedora/ Mon, 22 Feb 2021 11:19:23 +0000 https://linuxhint.com/?p=90722

Wallpapers are great for improving the user experience of any operating system. In the case of Fedora, one of its iconic features is the wallpapers it comes with. Every single Fedora release gets its own set of wallpaper, and these are some of the most anticipated components of any of its releases.

In this guide, check out how to install official wallpaper packs on Fedora.

Fedora Official Wallpapers

Fedora releases wallpaper packs for all the supported desktop environments.

It’s also possible to install the official Fedora wallpapers of a different release. For example, if you’re running Fedora 33, you can enjoy wallpapers from releases before that, such as Fedora 32.

Identifying Wallpaper Packages

Identifying desktop environment

Launch a terminal, and run the following command. It’ll print the name of the desktop environment running on the system.

$ echo $DESKTOP_SESSION

Identifying Fedora official wallpaper packages

The wallpapers are directly available from the official Fedora repos. The package name of the official wallpapers has a certain pattern and looks something like this:

$ f<fedora_version>-backgrounds-<desktop_environment>

For example, this is the package name for the official Fedora wallpapers for Fedora 32 running on the XFCE desktop:

$ f32-backgrounds-xfce

In addition to that, there are also additional wallpapers that come with every Fedora release. These are the supplement backgrounds that are selected from the community, driven by the guidelines that the Fedora project outlines.

The supplement wallpapers also have a similar pattern for the package name. It looks something like this:

$ f<fedora_version>-backgrounds-extras-<desktop_environment>

For example, the supplement background package from Fedora 32 for the GNOME desktop would have the following package name:

$ f32-backgrounds-extras-gnome

For easier demonstration, Fedora also has all the wallpapers displayed on the Fedora project wiki.

Check out Fedora wiki on official wallpapers.

Installing Official Wallpaper Packages

Ready with the package name for your desired wallpapers? Launch a terminal and install the package right away. Fedora supports both YUM and DNF as package managers. Thankfully, both share similar ways of installing a new package.

Installing wallpaper packages using YUM

Let’s grab the Fedora 32 official wallpapers for the GNOME desktop along with the extras.

$ sudo yum install f32-backgrounds-gnome f32-backgrounds-extras-gnome

Installing wallpaper packages using DNF

Use the following DNF command to install the official wallpapers of Fedora 32 for the GNOME desktop with the extras.

$ sudo dnf install f32-backgrounds-gnome f32-backgrounds-extras-gnome

Changing Backgrounds

Now that the backgrounds are installed, it’s time to change the backgrounds to the new ones. In this section, I’ve demonstrated how to change the backgrounds for GNOME, Cinnamon, MATE, and Xfce desktop environments.

Changing backgrounds on GNOME

Right-click on the desktop and select “Change Background”.

This option is also available from Settings >> Background.

Changing backgrounds on KDE Plasma

Right-click on a space in the background, and select “Configure Desktop and Wallpaper”. Alternatively, use the keyboard shortcut “Alt + D, Alt + S”.

Changing backgrounds on Cinnamon

On Cinnamon desktop, right-click and select “Change Desktop Background”.

Alternatively, you can also search “background” from the menu.

Changing backgrounds on MATE

On the MATE desktop, right-click on any space and select “Change Desktop Background”.

Alternatively, use the “Application Finder” to launch “Appearance”.

Final Thoughts

This guide demonstrates how to personalize Fedora with wallpaper for a better user experience.

Keeping the system packages up-to-date is an important task. It keeps the system secure, free of bugs/glitches, better performing, and having access to all the latest features. Learn how to update a Fedora Linux system.

Happy computing!

]]>
How to Install Spotify in Fedora Linux https://linuxhint.com/install-spotify-fedora-linux/ Mon, 22 Feb 2021 10:49:27 +0000 https://linuxhint.com/?p=90685

Spotify is a popular audio and video streaming service used by millions of people. Spotify is available for download on smartphones, tablets, and desktops for Windows, Mac, and Linux. Though Spotify works in Linux, this application is not actively supported, as it is on Windows and Mac. You can also enjoy Spotify on wearable gadgets. For example, if you have a Samsung smartwatch, you can listen to and control Spotify using the watch only. You need only install the app on your smartphone from the Play Store to start listening to tracks on Spotify.

The free version of the application provides access to limited audio streaming services with advertisements. The premium service offers many features, including the ability to download media, ad-free browsing, better sound quality, and more. There are also other plans offered to specific individuals and groups. Spotify also supports various devices, such as Wireless Speakers, Wearables, Smart TVs, and Streamers.

This guide shows you how to install Spotify in Fedora Linux using three different methods of installation.

Method 1: Install Fedora Using the Fedora Snap Repository

Snap is the easiest way to install Spotify and many other popular Linux applications. Snap applications are packaged with all the required dependencies. In Linux, you can simply search for and install the application from the Snap Store.

First, install Snap in Fedora. To do so, open the terminal by hitting the shortcut Ctrl+Alt+T and issue the following command:

$ sudo dnf install snapd

To verify whether the Snap’s path has been properly updated, either log out and log in again or restart the system.

Next, create a symbolic link to enable classic support, as shown below:

$ sudo ln -s /var/lib/snapd/snap /snap

Now that Snap has been installed on your system, install Spotify with the following command:

$ snap install spotify

This process is shown below:

If you obtain the following error after entering the command above, simply log in and log out:

error: too early for operation, device not yet seeded or device model not acknowledged.


Then, reboot your system and run the following command again:

$ snap install spotify

And that is all! Now, you can see how it is easy to use Snap to install Spotify.


You can launch Spotify from the system menu or directly from the terminal.


If you want to remove the Spotify application, issue the following command to uninstall Spotify if it was installed from the Snap store:

# snap remove spotify --purge

Method 2: Install Spotify Using the Fedora RPM Fusion Repository

RPM Fusion provides software for Fedora, Red Hat, and clone versions of Fedora. RPM Fusion provides third-party software as precompiled RPMs. This software is not officially supported by the Fedora Project due to some legal issues.

As in the previous method, first, you will install and enable the RPM Fusion repository before installing Spotify. Enter the following command to enable the non-free RPM Fusion repositories:

# dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

‘lpf-spotify-client’ requires the non-free version of RPM Fusion repositories.

To install the free version of the RPM Fusion repositories, do so by issuing the following command:

# dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

If you prefer to use the graphical method to install the RPM Fusion repo, do so by downloading the file from the official RPM Fusion website, as shown below:

Now that the RPM Fusion repository has been installed, install the Spotify application using the following command:

$ sudo dnf install lpf-spotify-client


Once the above command has been executed successfully, launch the “lpf-spotify-client” in the Applications list from the following path:

Activities -> "lpf spotify-client"

For the first time it will prompt a window saying: “You must be a member of the pkg-build group to run lpf (log out and in again to mute this dialog). OK to add group pkg-build to your current user muhammadsadaan?

Enter Yes and log out and log in again. Then, launch the “lpf-spotify-client” from the Applications list.


You will be prompted to accept the EULA terms for using the Spotify client in Linux. Simply read and accept the terms and click OK.


A new window will open that will show the dependencies and sources that are required to install the Spotify client.


After the above process has been completed, you will see the following window appear:

Now, you can launch Spotify from the Applications list, as shown below:


If the gnome shortcut does not work for you because of the following error:

GPU process isn't usable

Then, launch Spotify from the command-line using the following command:

# spotify --no-zygote

Method 3: Install Spotify Using Flatpak in Fedora

Flatpak, formerly known as xdg-app, is an app bundling framework focused on improving the Linux desktop experience by simplifying the installation process for many Linux applications. Applications created using Flatpak for one Linux distro can be distributed to others.

To install Flatpak in Fedora, issue the following command:

# dnf install  flatpak -y

Flatpak comes already installed with the Fedora 33 gnome. Once Flatpak has been installed, use the following command to install Spotify:

# flatpak install -y --from https://flathub.org/repo/appstream/com.spotify.Client.flatpakref

To run Spotify, issue the following command.

# flatpak run com.spotify.Client

Again, if the gnome shortcut or the above command does not work for you due to the following error:

GPU process isn't usable

Then, launch Spotify from the command-line using the command below:

# flatpak run com.spotify.Client --no-zygote

This process is shown below:

Conclusion

That concludes today’s guide on installing the Spotify application. In this tutorial, you learned three methods for installing Spotify on your Fedora Linux system. If you are an absolute beginner in the Linux operating system, then you should follow Method 1 to install Spotify on your system. This is a very straightforward and easy-to-use method for most beginners. However, any of the above methods will work perfectly well for installing the Spotify application.

]]>
Install Adobe Reader on Fedora Linux https://linuxhint.com/install-adobe-reader-fedora-linux/ Sun, 21 Feb 2021 01:15:29 +0000 https://linuxhint.com/?p=90357 Adobe Acrobat Reader DC or simply Adobe Reader is a popular software for document viewing, printing, and adding comments. It can also add signs and annotate portable document format or PDFs. It is primarily built for handling PDF documents. The premium version, Adobe Acrobat Pro DC, has more features than Adobe Acrobat Reader DC. For example, you can create PDFs, convert to other formats, edit and protect them.

Adobe now also provides online document cloud services for Adobe Acrobat Reader for managing your work from anywhere and from any device.

Adobe Inc develops the Adobe Acrobat family. The Adobe reader is available for direct download on Windows and Mac OS. It can be installed on Android and IOS as well. There are multiple languages available for installing Adobe Reader. Adobe does not provide a direct download option on the Linux systems as it used to do earlier. In this guide, we will see some workaround for installing Adobe Reader on the Fedora operating system.

What we will cover

This guide will show you two different ways to install Adobe Acrobat Reader on Fedora 33 OS. So let’s get started with this HowTo.

Method 1. Installing Adobe Acrobat Reader using Snap repository for Fedora

Snap is the easiest way to install Adobe Acrobat Reader like many other popular Linux applications. Snap applications are packaged with all required dependencies. You only need to discover and install them from the Snap Store. We need first to install snap on Fedora. Open a terminal (alt+ctrl+T) and type the below command:

$ sudo dnf install snapd

Or

# dnf install snapd

To confirm if snap’s path is properly updated, you can either log out and log in again or restart the system. If you did not log out and log in again, you might get the error:

error: too early for operation, device not yet seeded or device model not acknowledged

Now create a symbolic link as shown below to enable classic support:

# ln -s /var/lib/snapd/snap /snap

Now that snap is installed on our system; we can install Adobe Acrobat Reader with the command below:

# snap install acrordrdc

This process may take some time to download various files like snapd, core18, acrordrdc, etc. Open System monitor on your Fedora OS and go to the Resources tab. Here you can see the downloaded data at the bottom left side of the System monitor as shown here:

Once the above process is completed, it will display the following message on the terminal window:

Now run the below command to start Adobe Acrobat Reader:

# acrordrdc

Hold on for some time as it will initialize and download various files for wine, like winetricks and others:

During the installation, it will ask for the language of installation for Adobe Acrobat. Simply select English or any other language you want and click install to continue. See the below screenshot for reference:

Once you click install, it will start downloading the AcroRdrDCxxx.exe file as shown below:

It will later ask to open Adobe Acrobat Reader in Protected mode or not. This feature is used to prevent attacks from sandboxing application processes. You can select “Always Open with Protected Mode Disabled.” This will help the Adobe Acrobat Reader to run with your system configuration smoothly:

Once you enter OK, it will launch the Adobe Acrobat Reader main window. A new window will also prompt up, asking you to accept the Adobe Acrobat Reader Distribution License Agreement. This is shown in the screenshot below:

Some text might not be visible, as in the above picture of the Adobe license window. It might be because of the missing fonts for wine. Accept the license agreement to continue.

Now let us check if we can open a PDF file with this installed Adobe Acrobat Reader. Go to the ‘File’ menu in the top bar and hit ‘Open’ in the submenu. Now select the ‘Welcome.pdf’ file from the list in the new window:

You can see the file is successfully opened as shown here:

To uninstall Adobe Acrobat Reader installed from snap repository, use the following command:

# snap remove acrordrdc

Method 2. Installing Adobe Acrobat Reader on Fedora Using Tarball

Step 1. Download the tar file of Adobe Reader using the following command:

# wget ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i486linux_enu.tar.bz2

Step 2. Now extract this file using the tar command as shown below:

# tar -xf AdbeRdr9.5.5-1_i486linux_enu.tar.bz2

Step 3. Now enter the extracted folder with the command:

# cd AdobeReader

Step 4. Once you are inside the extracted folder, run the below install script to install Adobe Reader:

# ./INSTALL

Or

$ sudo ./INSTALL

It will print some text on the terminal and ask you to enter the installation directory. You can choose the default (/opt) or enter a new one. We are pressing the enter key to select the default directory.

This installation requires 136 MB of free disk space.
Enter installation directory for Adobe Reader 9.5.5 [/opt]

After the above script finishes, Adobe Reader is installed on your system. Now at this point, we need to configure the installation process further to launch the Adobe Reader.

Step 5. Now run the below command, to try to launch Adobe Reader:

$ /opt/Adobe/Reader9/bin/acroread

Note: If you were earlier logged in as root (#) or using the sudo keyword, you will need to come to the normal user account and remove the ‘sudo’ from the above command. If you continue to use the root account or ‘sudo’, you will get the below error:

Adobe Reader does not need to be run as a privileged user. Please remove ‘sudo’ from the beginning of the command.

When you run the above command, it might show errors like the one below:

To remove these errors, we need to install some packages from the following command:

$ sudo dnf install libgdk_pixbuf_xlib-2.0.so.0 libxml2.so.2 https://download-ib01.fedoraproject.org/pub/fedora/linux/updates/33/Everything/x86_64/Packages/g/gtk2-2.24.33-1.fc33.i686.rpm -y

When all the dependencies are installed, again run the below command:

$ /opt/Adobe/Reader9/bin/acroread

It will ask to select the language of installation and to accept the Adobe License agreement:

Now accept this license agreement to launch the Adobe Acrobat Reader as shown here:

Now we can open any file from the ‘File’ menu at the top bar as shown here:

Conclusion

This finishes our today’s guide on installing Adobe Acrobat reader on Fedora 33 OS. In this tutorial, we have learned two ways of installing Adobe Reader on the Fedora Linux system. If you have properly followed the guide, you will have noticed that although Method 1 is easier than Method 2, the Adobe Reader is more stable if you use Method 2. Now might need to install more packages to use the Adobe Reader smoothly. Also, in Method 2, we can easily browse local files, but in Method 1, it is not easy as we are confined inside the Wine environment.

We recommend that you use native applications on Linux for managing PDF files. This is because Adobe has stopped supporting Linux for a long time, so you may have to waste a lot of time finding many dependencies and settling the conflicts between them.

]]>
How to Install Microsoft Teams on Fedora? https://linuxhint.com/install-microsoft-teams-fedora/ Thu, 18 Feb 2021 14:16:57 +0000 https://linuxhint.com/?p=90139 The success of a team is incredibly dependent on effective communication. Microsoft Teams is a powerful solution for that. It’s a team collaboration tool that includes everything in a single package. The service includes messaging, chats, video conferences, and file sharing. In addition, Teams also integrates seamlessly with other services like Git, CI/CD pipelines, etc.

One of the biggest benefits of Microsoft Teams is that it’s a cross-platform tool, available for both Windows and Linux. In this guide, we are going to check out how to install Microsoft Teams on Fedora.

Microsoft Teams on Fedora

Microsoft Teams is a cross-platform solution. The official clients are both Windows and Linux (Ubuntu, RHEL/CentOS/Fedora, and SUSE Linux) users. It’s also possible to enjoy the service directly from the web browser (without any dedicated client).

Fedora is an RPM-based distro. For easier installation, Microsoft Teams is directly available as an RPM package. Installing the RPM package will also configure the Microsoft Teams repo for YUM/DNF. This takes care of keeping the client up-to-date.

To use Microsoft Teams, it’s recommended to have a Microsoft account. Don’t have one? Click Sign up for a Microsoft account.

Installing Microsoft Teams RPM

The official RPM package for Microsoft Teams is available at the following FTP link:

$ https://packages.microsoft.com/yumrepos/ms-teams/

Download the latest version of Microsoft Teams RPM. Note that the “insiders” builds are the equivalent of “beta” releases, so it’s recommended to avoid those. At the time of writing this article, the latest version available is Teams v1.3.00.958-1.

$ wget https://packages.microsoft.com/yumrepos/ms-teams/teams-1.3.00.958-1.x86_64.rpm

Once the download is finished, use either YUM or DNF to install the RPM package. It’ll ensure that any dependency is taken care of.

To install the RPM package using YUM, run the following command:

$ sudo yum install teams-1.3.00.958-1.x86_64.rpm

To install the RPM package using DNF, run the following command:

$ sudo dnf install teams-1.3.00.958-1.x86_64.rpm

Using Microsoft Teams

The installation is complete. It’s time to start using Microsoft Teams. Now, launch the app.

The app will ask you to log into your account. Enter the credentials to gain access to the Teams’ main functionality.

If your account isn’t signed up for Microsoft Teams, then it will prompt you to sign up. Click “Sign up for Teams”.

It’ll open a link in the default browser. Click “Sign up for free” to start the process.

Enter the email address of your account. While Teams support different email service providers, it’s recommended to use your Microsoft account.

Teams will ask for the purpose of using the service. Here, I’m going with the “For work and organizations” option.

Teams will ask for the full name, company name, and country/region.

Teams should be ready to go! The browser tab will redirect you to the Teams client. If it doesn’t, then close the browser, and restart the client. You’ll have to re-login to your account.

Teams will open up the welcome page. From the drop-down menu, select the organization.

Voila! The Teams dashboard is ready!

As mentioned earlier, Teams can connect to various third-party services for easier team collaboration. To install various service integrations, check the “Apps” section.

Teams support voice/video calls among their members. To make a call, check out the “Calls” section.

Final thoughts

Microsoft Teams is a simple yet powerful service. While it’s demonstrated using the free version, it comes at a price for professional usage.

There are also other awesome tools for team collaboration. Slack is one of the most popular applications, so let’s check out some cool Slack alternative services.

Happy surfing!

]]>
How to Install and configure Apache httpd on Fedora Linux https://linuxhint.com/install-apache-httpd-fedora-linux/ Thu, 11 Feb 2021 04:58:31 +0000 https://linuxhint.com/?p=89598 Apache web server is one of the most used web servers in the world. It is very easy to configure. It is open-source software and maintained by the Apache Software Foundation. Apache supports numerous features. Many of these features are implemented as compiled modules to expand the core functionality.

httpd is an apache web server in Red Hat-based distros, while it is called apache on Debian distros. It depends on the OS you use. For example, in RHEL 6.2, it is called httpd, and in Ubuntu, it is called apache2.

In Fedora Linux, the httpd package provides the Apache webserver application.

What will we cover

In this tutorial, we will see how to install Apache webserver from the source file as well as from the Fedora repository.

It is recommended that you first read this post and then apply it to your system. This will make sure that you correctly configure the apache web server.

Prerequisites

  1. Fedora Operating System installed
  2. User account with root access
  3. Internet connectivity to download various files.

Method 1. Installing from source code

Step 1. Open a web browser and go to the apache download page. At this article’s writing, the latest and stable version available for Apache HTTP Server (httpd) is 2.4.46. Download the file as shown below:

Another way to get the file is using the wget command. Open the terminal and run the following command:

# wget https://mirrors.estointernet.in/apache//httpd/httpd-2.4.46.tar.gz

This is shown below:

The benefit of using the source code is that you always get the latest available version of the software.

Step 2. Once we get the source file, we can start with the commands’ gzip’ and ‘tar’ to extract the file. The exact name of the file depends on the available version you have downloaded. In our case, it is httpd-2.4.46.tar.gz.

# gzip -d httpd-2.4.46.tar.gz

# tar xvf httpd-2.4.46.tar

After running the above command, you can see the extracted folder as here:

Step 3. Now go to the extracted directory with the command:

# cd httpd-2.4.46

Step 4. We now need to run the configure script to configure the apache. This is available inside the root directory of apache, i.e., the current directory. But before running this script, make sure where you want to install apache.

You can install the apache server in the default location. For this, you have to run the script simply:

# ./configure

If you want to install apache in a directory other than the default, use the following syntax:

# ./configure --prefix=/path/of/installation

Inside the ‘–prefix=’ enter the path of installation. In our case, we will install apache inside the /opt/httpd directory. For this, follow the instruction below:

1. Create a directory inside /opt as shown below:

# mkdir /opt/httpd

2. Run the script as shown below:

# ./configure --prefix=/opt/httpd

The configure script will take some time to run and verify the features on your system. It will also prepare Makefiles to compile the apache web server.

Note for several errors when running the ./configure script:

1. You may get the following error “configure: error: APR not found”:

For fixing this error, you need to download the apr-*.tar.gz from here.

Now extract this directory inside the ‘srclib’ directory, which is available in the apache httpd distribution folder. To extract the file, use the command:

# tar xvf apr-util-1.6.1.tar.gz

# tar xvf apr-1.7.0.tar.gz

Now rename these files by removing the version number as here:

# mv apr-util-1.6.1 apr-util

# mv apr-1.7.0 apr

2. If the error is “configure: error: pcre-config for libpcre not found.” Then you just need to install the PCRE devel package as shown below:

# dnf install pcre-devel -y

Now continue to run the configure script as before. In last it would print the summary as shown here:

Step 5. To build the several components that comprise the Apache web server, use the following command:

# make

This may take significant time to run this command as it will compile the base configuration. It largely depends on system hardware and also on the number of modules enabled.

If you get an error like “fatal error: expat.h: No such file or directory”, you will need to download expat from here. Now extract the file inside some directory. We are using /opt/httpd for extraction.

# tar xvjf expat-2.2.10.tar.bz2 -C /opt/httpd

Now go to the extracted directory and run the following command one by one to configure expat:

# cd /opt/httpd/expat-2.2.10

# ./configure

# make

# make install

Now again run the configure script by specifying the path of expat installation:

# ./configure --prefix=/opt/httpd  --with-expat=/opt/httpd/expat-2.2.1

Step 5. Once the make command finishes, we are ready to install the packages. Run the command:

# make install

Step 6. To customize your apache server, use the httpd.conf file located inside:

# nano PREFIX/conf/httpd.conf

Where PREFIX is the path of apache installation. In our case it is /opt/httpd/, so we use:

# nano /opt/httpd/conf/httpd.conf

Inside this file, change the ServerName directive to the IP address of your system.

Step 7. Now apache is ready to use; we only need to start the service from the directory where it is installed. For e.g., if you have installed the apache inside /opt/httpd, then run the command:

# /opt/httpd/bin/apachectl -k start

Method 2. Installing from Fedora Repository

Installing Apache httpd from the Fedora repository is quite easy; just follow the below steps:

Step 1. Open a terminal (ctrl+alt+f2) with root user or at least with superuser privileges.

Step 2. Now use the following command to install apache:

# dnf install httpd

Step 3. Start and check the status of the apache service with the command:

# systemctl start httpd.service

# systemctl status httpd.service

It should show a running status

Step 4. Open a web browser and enter your system IP. It would show the following page:

Conclusion

Congratulations, You have successfully configured the Apache webserver. In this guide, we have learned how to install apache from the source file and Fedora repository.

]]>
How to Manage Startup Services with Systemd in Fedora https://linuxhint.com/manage-startup-services-systemd-fedora/ Mon, 08 Feb 2021 12:17:35 +0000 https://linuxhint.com/?p=89368 Systemd is a software suite that offers an array of system components for Linux systems that can perform service configuration and system behavior management. It consists of an init system, various tools for device management, network connection management, login management, and event logging.

In this guide, check out how to manage startup services with systemd in Fedora.

Systemd on Fedora

Over the traditional init systems (UNIX System V and BSD), systemd offers flexibility and improvements. This is why most of the modern Linux distros have embraced systemd. Fedora is no exception. A key benefit of systemd is because it’s almost like a standard; the commands demonstrated on this guide will also work on any other Linux system that uses systemd.

To ensure that your Fedora system has systemd, run the following command.

$ systemctl --version

The following command will also reveal the location of the systemd on the system.

$ whereis systemd

To find the location of systemctl, run the following command.

$ whereis systemctl

It’s possible to verify whether systemd is currently running.

$ ps -eaf | grep systemd

Managing services using systemd

To manage services, systemctl is an easy-to-use tool. For the most part, systemctl is what you’re going to use when it comes to service management.

List services
Generally, any Linux system has numerous services ongoing. It’s a hard task to keep all of them memorized. Thankfully, systemctl can list all the services on the system.

The following command will list all the services. It includes enabled, disabled, running, and stopped services.

$ systemctl list-units --type=service --all

It’s possible to list services based on their state.

$ systemctl list-units --state=<state>

To list services based on multiple states, use the following command structure.

$ systemctl list-units --state=<state_1>,<state_2>

Here’s a quick list of all the available service states.

  • active
  • inactive
  • activating
  • deactivating
  • failed
  • not-found
  • dead

If you’re interested in “loaded”, “enabled”, “disabled”, and “installed” service files, then it requires the “list-unit-files” command instead. Run the following command.

$ systemctl list-unit-files --type=service

Checking service status
Before performing any action on a service, it’s a good idea to check the target service’s status. The following command will report the status of a service.

$ systemctl status <service>

Alternatively, use the following “service” command.

$ service <service> status

Starting a service
To start a service, run the following command.

$ sudo systemctl start <service>

Alternatively, the following “service” command will do the same task.

$ sudo service <service> start

Stopping a service
To stop a running service, use the following command.

$ sudo systemctl stop <service>

Alternatively, use the following “service” command.

$ sudo service <service> stop

Restarting a service
After making changes, a service requires a restart to put the changes into effect. To restart a service, run the following command.

$ sudo systemctl restart <service>

Alternatively, use the following “service” command.

$ sudo service <service> restart

Reloading a service
In the case of some services, those can load the new configuration without a restart. If that’s the case, then reloading is the better action. To reload a service, use the following command.

$ sudo systemctl reload <service>

Restart and reload
In case you’re not sure whether to restart or reload the service, then issue the “reload-or-restart” command. It’ll reload the configuration files in-place (if available). Otherwise, it’ll restart the service.

$ sudo systemctl reload-or-restart <service>

Enabling and disabling service
Based on whether the service starts at boot, there are two types of services.

  • enabled: The service will start automatically when the system boots.
  • disabled: The service won’t start when the system boots.

Note that any “disabled” service has to be started manually after the system boots.

To enable a service, run the following systemctl command.

$ sudo systemctl enable <service>

To disable a service, run the following systemctl command.

$ sudo systemctl disable <service>

Analyzing boot time
When booting, each service requires time to load completely. To determine how much time services spend during boot, run the following command.

$ systemd-analyze blame

Using systemd-analyze, you can also analyze the critical chain at boot. Run the following command to see the report.

$ systemd-analyze critical-chain

Final thoughts

Systemd makes it easy to manage startup services. This guide only demonstrates some of the simplest methods of manipulating services on Fedora.

However, systemd is more than that. In essence, systemd is the father of all other processes. To understand systemd on a deeper level, check out this guide on how systemd starts the system.

Happy computing!

]]>
How to Install Google Fonts on Fedora https://linuxhint.com/install-google-fonts-fedora/ Mon, 08 Feb 2021 11:08:11 +0000 https://linuxhint.com/?p=89160 Launched back in 2010, Google Fonts is a library of thousands of free licensed font families. It also provides APIs to incorporate the fonts via CSS and Android. For anyone looking for a new font to beautify their works, be it a document or a banner on GIMP, Google Fonts is an excellent place to start looking for.

In this guide, check out how to install Google Fonts on Fedora.

Installing Google Fonts on Fedora

There are multiple ways of installing Google Fonts on Fedora. The default and recommended method are to use the package manager to do the job. This way, the fonts are easier to manage.

It’s also possible to install the fonts manually. However, it may make the font management a bit more complicated.

Let’s get started!

Install Google Fonts using DNF

For Fedora, the RPM Fusion repository hosts all the Google Fonts as an installable package. This way, we can use DNF to manage the Google Fonts package for us.

By default, Fedora doesn’t have the RPM Fusion repo configured. It’s very simple to configure RPM Fusion. Learn more about how to set up RPM Fusion on Fedora.

For a quick review, the following DNF command will automatically install the appropriate RPM Fusion repo configuration packages.

$ sudo dnf install \
$ https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
$ https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Tell DNF to check for updates available. As a new repo is added, DNF will automatically update the repo cache.

$ sudo dnf check-update

Now, we need the package name for the target Google font(s). Using the DNF search utility and grep filtering, we can list all the available Google font packages.

$ dnf search fonts | grep google

Finally, install the desired Google font package.

$ sudo dnf install <google_font_package>

Voila! The Google font is ready to be used! If your target application doesn’t recognize the font, restart the app to take the changes into effect.

Install Google Fonts manually

This method describes how to manually download and install Google Fonts without the help of any package manager.

First, grab the Google Fonts of your choice. Check out Google Fonts. You can download multiple fonts if necessary For demonstration, I’ve chosen Potta One. To download the font, click “Download family” from the top-right corner.

It’ll download the font in a zip archive. From this point on, we’ll be using the command-line interface. Launch a terminal, change the current directory, and extract the zip archive.

$ unzip <zip_archive>

Now, make a copy of the TTF file to the system font’s directory.

$ sudo cp -v <font>.ttf /usr/share/fonts

Verify if the copy was successful.

$ ls /usr/share/fonts

To take the changes into effect, rebuild the font cache. The system will automatically notice the change and incorporate the new font(s).

$ sudo fc-cache -v

Finally, restart the target application where you’re going to use the fonts.

Final thoughts

Google Fonts is an incredible service. It offers tons of fonts to customize your documents. This guide demonstrated how to install Google Fonts on Fedora.

If you’re interested in fonts, then you’re probably also working heavy-duty with text editors. Check out some of the best multi-platform text editors.

Happy computing!

]]>
How to Install Oracle JRE on Fedora https://linuxhint.com/install-oracle-jre-fedora/ Sat, 06 Feb 2021 18:44:49 +0000 https://linuxhint.com/?p=89080

Java is one of the most used programming languages. Due to its object-oriented nature, it is preferred by developers. Java can be used to develop Mobile, Desktop and Web-based applications. Java allows running java programs on many platforms with the help of JVM. JVM has a JRE or Java Run-time Environment that provides resources and class libraries to Java code for execution. JDK is only needed for developing Java applications.

What’s new in Java SE Release 8 for Linux

  • Support for configuration file along with command-line options for installation with cli. The configuration file-based installation has more options as compared to cli based installation.
  • Commands like java, javap, javac and javadoc can be used by users on the command line.
  • Java SE Release 8 users can now also verify which particular RPM package offers Java files.

What we will Cover

This post will explore Oracle JRE, and we will see how to install Oracle JRE on Fedora Linux using i) an archive binary file ii) an RPM binary file.

We also see how to uninstall JRE in both cases.

Oracle has different versions of JRE for Linux platforms based on system architecture. It is very important to download and install the version specific to your system. The following table shows different versions of Oracle JRE and the system architecture they are built for:

JRE Version System Architecture
jre-8u281-linux-x64.tar.gz 64 bit Linux
jre-8u281-linux-i586.tar.gz 32 bit Linux
jre-8u281-linux-x64.rpm 64 bit RPM based Linux
jre-8u281-linux-i586.rpm 32 bit RPM based Linux

Note: The above naming may change with time as it all depends on the JRE update version number

For this guide, we will be using

  1. “jre-8u281-linux-x64.tar.gz” which is actually an archive binary file.
  2. “jre-8u281-linux-x64.rpm” which is an RPM binary file.

So let’s get started with the installation of Oracle JRE.

Method 1. (a) Installation using archive binary file

Step 1. Open a web browser and go to Oracle JRE download page and download the archive binary file. This is shown below:

Review and accept the Oracle license agreement. It will now redirect you to the login page before downloading the file. You will need to create a new account with Oracle. If you already have an account, you can login directly.

Step 2. Once the file is downloaded, we can continue further. Beside the root user, any other user can also install the archive binary in any location. But for installing in system location root user is required. We will go to the file download directory and create a new directory as ‘lh-dir’ and move the archive binary to this folder.

# mkdir lh-dir

# mv  jre-8u281-linux-x64.tar.gz lh-dir/

This is shown in the screenshot below:

You can also use any other location where you would like to install JDK.

Step 3. Now we will unpack the downloaded archive binary in this new directory.

# tar zxvf jre-8u281-linux-x64.tar.gz

Sample Output:


Step 4. Now if you want, you can remove the archive binary (.tar.gz) file as below:

# rm  jre-8u281-linux-x64.tar.gz

This will help us to save disk space.


Step 5. To start using JRE from anywhere on the system, we will specify our Java installation path in the /usr/bin directory. The /usr/bin directory contains executable commands on the system.

# update-alternatives --install "/usr/bin/java" "java" "/root/Downloads/lh-dir/jre1.8.0_281/bin/java" 1

Note: Please do not forget to change the name of the directory ‘lh-dir’ to the one you have created.


Step 6. Once we have specified the java path, we can use the java command from anywhere on the system. Let’s check the java version from the documents folder.

# cd /root/Documents

# java -version

The following screenshot demonstrates this:


To Check the PATH Variable for the JRE, run the following command:

# which java

It will produce output like

/usr/bin/java

(b) Uninstalling Oracle JRE

In case you would like to remove the Oracle JRE from your system, you will need to follow the steps below:

Step 1. Remove all link for the alternatives by running the following command:

# update-alternatives --remove "java" "/root/Downloads/lh-dir/jre1.8.0_281/bin/java"

Please do not forget to change the java file’s location in the above command with your system’s one.

Step 2. Verify if the Oracle JRE has been removed with the below command:

# java --version

It should say: bash: /usr/bin/java: No such file or directory

Method 2. (a) Installation using the RPM binary file

Step 1. Now again go to the Oracle JRE download page and this time download the 64-bit rpm file as shown below:

Note: Make sure that before installing the rpm file you have removed the old JDK installation packages.

Step 2. After you have downloaded the file, open a terminal and get root access. Go to the folder containing the rpm file. Now run the following command:

# rpm -ivh jre-8u281-linux-x64.rpm

The above command will install the JRE rpm file, as shown below:


Step 3. Now again check the version of java from any directory, it will show the following output:

(b) Uninstalling Oracle JRE

Step 1. First, check the installed package of JRE from the following command:

# rpm -qa | grep java

It will show the corresponding jre package:


Step 2. Now uninstall the JRE package with the following command:

# rpm -e jre1.8-1.8.0_281-fcs.x86_64


Step 3. Now again check the version of java, this time it should show:

bash: /usr/bin/java: No such file or directory

Conclusion

In this guide, we have learned how we can install Oracle JRE on Fedora Linux. We have also seen how it can be uninstalled from the system. This guide was successfully tested on Fedora 33 Linux. Since we have installed JRE with .tar.gz file in Method 1, the installation steps will remain the same for all 64 bit Linux distributions.  The same steps should be used for installing Oracle JRE for 32 bit Linux. The only thing to change here is to use the 32-bit version of JRE.

Method 2 is comparatively easy for installing and removing Oracle JRE. The same method should also work on 32-bit Linux by installing the 32-bit version of JRE.

]]>
How to Upgrade Fedora Linux? https://linuxhint.com/upgrade-to-fedora-linux/ Sat, 06 Feb 2021 18:41:58 +0000 https://linuxhint.com/?p=89096

Fedora is a Linux distribution that is sponsored by Red Hat. The best thing is that it is free and open source. It is also available for desktop, server, and IoT systems. It has a different desktop environment like KDE Plasma, XFCE, LXQT, etc.

What will we cover?

In this guide, we will cover how to upgrade Fedora 32 to Fedora 33. We will see three different ways of upgrading Fedora:

  1. Upgrade using Software Center
  2. DNF system upgrade plugin
  3. Upgrade using package manager with dnf only

Things to Do Before Starting

We need to do certain things before starting the process for a smooth upgrade experience.

The first thing is that you should always backup your data before attempting to upgrade. It is highly recommended for any production system.  If you are experimenting with a virtual machine, 0then you don’t have to worry. Second thing, you should have a root account or at least a user account with root access privileges. This is necessary as you cannot run the upgrade commands without the superuser rights.

Method 1. Upgrade using Software Center (recommended for the Fedora Workstation release)

This is the most recommended way to upgrade Fedora Workstation, and it is also the easiest way for beginners. From Fedora 23 Workstation edition, a notification for a new Fedora release starts to appear whenever a new stable release is introduced. Check out the notification or go to Fedora’s graphical software center, you will be presented with a simple update window, as shown below:

When you hit the download button, all the files required for upgrade will be automatically downloaded. When the download is completed, it will ask for a reboot to install the upgraded files. After the reboot, you will be able to see your new release.

Method 2. Using the DNF system upgrade plugin

This is the officially recommended upgrade method for all Fedora installations, except for the Fedora Workstation. It uses dnf-plugin-system-upgrade when performing a system upgrade. This is actually a command-line method as it requires running some command. Okay, let’s dive in to see how this is going to work.

Step 1. First, update your Fedora system with the command:

# dnf upgrade --refresh

This will install all the necessary updates to the system before upgrade. The actual download size may vary for every different system.

This may take a considerable time to download and install all the updates depending on your internet connection speed and system hardware.

Step 2. Once the installation of updates is finished, do a system reboot.

Step 3. After rebooting the system, open a terminal and install the plugin: dnf-plugin-system-upgrade. To do this use the command below:

# dnf install dnf-plugin-system-upgrade

Step 4. Now, we will use the dnf plugin to download the release update packages. Run the below-given command:

# dnf system-upgrade download --refresh --releasever=33

When you run the above command, it will ask to run the “dnf upgrade –refresh” command to ensure that the system is up to date. Press ‘y’ and hit enter, so it can download any new update.

The releasever argument is used to specify the version of Fedora OS we want to install. Here we have specified version number 33, which is the latest available version right now.  To upgrade to a branched release, we need to use 34, or we can take rawhide for upgrading to a rawhide version.

Once the update process is completed, you can download the upgrades as shown below:

As you can see, this version update is about 1.3 G in size, so it may take a long time to download and install all these updates. Wait for the process to complete.

During the upgrade process, it will import a gpg key and ask you to verify it, just press ‘y’ here:

The installation process is almost completed, what’s remaining is to run the command:

# dnf system-upgrade reboot

Note: Please do not run any other command besides “dnf system-upgrade reboot”, otherwise you may need to restart the whole process.

The system will now restart to apply the downloaded system upgrades, as shown below:

After the upgrade process is completed, you should see a new login screen for Fedora 33 OS, as shown here:

We can check the Fedora version with the command:

# /etc/os-release

Since we were using Fedora 32 xfce version, we are upgraded to Fedora 33 xfce. This should be the same if you are upgrading from the gnome version, you should land on gnome Fedora.

Method 3. Upgrade using package manager with dnf only (without using the DNF system upgrade plugin)

The last method is using DNF, which is actually not recommended by Fedora. While upgrading this way, you may encounter general dependency issues.  For any such issue, you can refer to the reference pages and other posts related to the installation guide. This is a very brain-teasing method and should only be used by experienced system administrators.

Step 1. Open a terminal and login as a root user and run the command below:

# systemctl isolate multi-user.target

Step 2. At this point, we have to update the packages of our current Fedora OS with the following command:

# dnf upgrade

Step 3. In case of upgrading across three or more releases or upgrading from an old version of Fedora before Fedora 20, it may require you to import and install the package signing key. Otherwise, it is not required for upgrading across two releases or less from the version of Fedora 20 or later.

So, if it is required to import the key, do run the following command:

# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-23-x86_64

Do not forget to replace “23” with your target release like 32 or 33 for the latest Fedora. Also, replace “x86_64” with your system architecture.

Step 4. Clean all the cache of dnf by running:

# dnf clean all

Step 5. Start the upgrade process with the command:

# dnf --releasever=<target_release_number> --setopt=deltarpm=false distro-sync

Step 6. Install new packages for the new version with:

# dnf groupupdate 'Minimal Install'

Other groups like GNOME Desktop, Administration Tools can also be updated as shown here:

# dnf groupupdate "GNOME Desktop"

# dnf groupupdate “Administration Tools”

Step 7. Install the bootloader for your boot-device with the command:

# /usr/sbin/grub2-install BOOTDEVICE

The boot-device is usually /dev/sda or /dev/sdb, depending on your hard disk. If you are using a virtual machine, it might be like the dev/vda.

Step 8. Now, delete unnecessary cache files and other redundant files by cleaning up the system. These files often reside in the following directories:

  1. /var/cache/dnf
  2. /var/lib/mock
  3. /var/cache/mock

Conclusion

In this guide, we have seen how we can upgrade Fedora Linux using three different ways. We have also learned the main difference in using these upgrade methods.  This guide has been successfully tested on Fedora 32 for upgrading to Fedora 33. If you have liked this HowTo guide, please share it with others.

]]>
How to Install MySQL on Fedora https://linuxhint.com/install-mysql-fedora/ Sat, 06 Feb 2021 18:38:43 +0000 https://linuxhint.com/?p=89109

MySQL is a database system that provides database services for storing and managing data. It is one of the popular open-source databases.

MySQL comes with the following commercial products:

  1. MySQL Standard Edition
  2. MySQL Enterprise Edition
  3. MySQL Cluster Carrier Grade Edition

All these editions come with a price tag and are mostly suitable for commercial use. We will use the  MySQL Community Edition, which is available for free usage under the GPL license for our this guide.

What  will we cover here

In this guide, we will go through the process of installing MySQL Community Edition on Fedora Linux. We will install MySQL from Yum repository using the YUM utility. Let’s get started with the installation process.

Step 1. The first thing is that we need to add the official yum repository for our Fedora Linux provided by MySQL. We will download the yum repository using the wget tool on Linux using the command:

# wget <a href="https://dev.mysql.com/get/mysql80-community-release-fc33-1.noarch.rpm">https://dev.mysql.com/get/mysql80-community-release-fc33-1.noarch.rpm

Please remember that download link may change with time, in case the above link does not work, you should manually copy the link from the official website.

Another way to get the yum repository is to directly download this file to your system from MySQL as here:

Step 2. Once the file download is complete, we can install it with the following command:

# yum localinstall mysql80-community-release-fc33-1.noarch.rpm

Note: We can also use the dnf command instead of yum.

When you run the above command, it will add the MySQL Yum repository to your system’s repositories list. Also, enter ‘y’ when it asks to verify the packages’ integrity with downloaded GnuPG key.

Step 3. Now we will verify if the MySQL repository is added to our system repository  list or not:

# yum repolist

The output of the above command will show you all the repositories configured on our system under YUM.

Step 4. Start the installation of MySQL community release with the following command:

# dnf install mysql-community-server

Step 5. Once the MySQL server is installed, we can start it with the command:

# service mysqld start

or

# systemctl start mysqld.service

Note: If you take much time to start the MySQL service, then stop the above command by pressing ‘ctrl+c’. Now run the ‘dnf update’ command and then start the MySQL service again.

Step 6. Check the status of the MySQL service by running the command:

# service mysqld status

It should show an active running status for MySQL service.

Beside the status, we can also verify the status of the mysql server with the command:

# mysql --version

The above command shows that we have installed the latest version of MySQL available in the yum repository.

Step 7. Now, as our MySQL is installed and working, we need to secure it. But before that, we need to get a root password created by Mysql during the installation process. This temporary password is required during the configuration of the MySQL server.

To get this password, open a new terminal and run the below command:

# cat /var/log/mysqld.log | grep ‘temporary password'

The password will be printed on your terminal.

Step 8. Now for securing the MySQL server, we need to change certain settings. Run the below command to enter the MySQL secure installation:

# mysql_secure_installation

It will ask for the temporary password which we created in step 7.  Put that here. Now it will prompt for password change for the root user. Make sure that you enter a strong password satisfying all the requirements. Otherwise, you will get an error regarding password policy. This is shown below:

Once you have entered the correct password, you will see some instructions and questions on the screen like:

Securing the MySQL server deployment.

Enter a password for user root: [Enter the Temporary Password here]

The existing password for the user account root has expired. Please set a new password.

New password: [New password here]

Re-enter new password: [Retype the password]

The ‘validate_password’ component is installed on the server.

The subsequent steps will run with the existing configuration of the component.

Using the existing password for root.

Estimated strength of the password: 100

Change the password for root? ((Press y|Y for Yes, any other key for No) : [You can change MySQL root password here]

… skipping.

By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : [Type ‘y’ to remove the anonymous user]

Success.

Normally, root should only be allowed to connect from ‘localhost’. This ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : [Deny root login by entering ‘y’]

Success.

By default, MySQL comes with a database named ‘test’ that anyone can access. This is also intended only for testing and should be removed before moving into a production environment.

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : [Press ‘y’ here]

– Dropping test database…

Success.

– Removing privileges on test database…

Success.

Reloading the privilege tables will ensure that all changes made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : [Reload the privilege tables to apply changes by pressing ‘y’ here]

Success.

All done! 

Step 9.  Once the above steps are completed, we are all set to login the MySQL database server. Use the password you have created during mysql secure installation in step 8:

# mysql -u root -p

You will see an output similar to this:

Enter password: [Enter MySQL root Password here]

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 8 Server version: 8.0.23 MySQL Community Server – GPL.
Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql>

Conclusion

That’s all; we have managed to set up a working MySQL database server. What you can do next is to:

  1. Create new users and grant different privileges to them.
  2. Create databases and tables and then create a join between tables of different databases.
  3. Define a trigger that is automatically invoked with a response to operations like insert, update or delete.
]]>
How to Update a Fedora Linux System https://linuxhint.com/update-fedora-linux-system/ Wed, 03 Feb 2021 04:16:57 +0000 https://linuxhint.com/?p=88610 No matter whatever distro you’re using, it’s important to keep all the packages up-to-date. Package updates contain various improvements, bug fixes, security patches, and new/improved features.

In this guide, check out how to update the Fedora Linux system.

Updating Fedora

Fedora is an RPM-based Linux distro that’s maintained by the Fedora Project. Fedora acts as the testing ground for future releases of Red Hat Enterprise Linux. While Fedora is open-source software, RHEL isn’t. However, both share the same base.

Fedora is suitable for all sorts of usage. It can be used either for general-purpose use, server, workstation, and others. Fedora receives updates regularly.

Depending on the UI, there are two ways of updating Fedora: GUI and CLI.

Update Fedora using GUI

By default, Fedora comes with the GNOME desktop. One major feature of the GNOME desktop is, it also comes with a bunch of powerful tools. The following method demonstrates how to update Fedora using the GNOME Software tool.

Launch GNOME Software. It’s a GUI tool for easier package and repository management.

Go to the “Updates” tab. If there’s any update available to any package, it’ll show up here. To recheck for any available update, click the refresh icon at the top-left corner.

To install updates, click the “Download” button. The action will require root privilege.

Voila! All the packages are updated!

Update Fedora using CLI

Fedora is easier to keep updated using the package managers it comes with. Fedora supports both DNF and YUM package managers. However, it’s recommended to use DNF because it’s an upgrade over the traditional YUM.

Update Fedora using YUM

Launch the terminal. While this first step is optional, it may help to fix certain problems related to updating packages. Clean the local YUM repo cache.

$ sudo yum clean all

The following YUM command will check for any available updates. If the cache were cleaned previously, it’d rebuild the cache as well.

$ sudo yum check-update

If there’s any update available, run the following command to install them all.

$ sudo yum update

Alternatively, to update only the selected package(s), use the following command structure.

$ sudo yum update <package_1> <package_2>

Update Fedora using DNF

DNF is the default package manager that Fedora incorporates. It solves many of the problems that YUM had (memory inefficiency, slower performance, etc.) while delivering almost the same user experience.

Using DNF to update is almost similar to using YUM. Launch a terminal and clean the DNF cache. It’s an optional task.

$ sudo dnf clean all

Check if there’s any update available. If the cache was cleaned, then DNF will rebuild the cache automatically.

$ sudo dnf check-update

If any package update is available, the following DNF command will install all of them.

$ sudo dnf update

Alternatively, to update specific packages, use the following command structure.

$ sudo dnf update <package_1> <package_2>

Upgrading Fedora

When there’s a new version of Fedora available, installing it without completely reinstalling the entire operating system is possible. Note that this process may take quite a while. It’s always recommended to back up your important data, especially those located in the system directories.

Ready? Let’s get started! We’ll be using the DNF package manager to do the job.

First, check if all the currently installed packages are up-to-date.

$ sudo dnf upgrade --refresh

To upgrade the system, DNF requires a system upgrade plugin. Install the system upgrade plugin for DNF.

$ sudo dnf install dnf-plugin-system-upgrade

The next step is to download the system upgrade. Double-check the Fedora system version you’re upgrading to. Check out the latest version of Fedora.

$ sudo system-upgrade download --refresh --releasever=<target_fedora_version>

Finally, reboot the system to finish the upgrade process.

$ sudo dnf system-upgrade reboot

Final thoughts

Keeping Fedora updated is an easy task. Depending on your comfort, follow the method that meets the need.

Interested to learn more about the Fedora package managers? Check out how to use the DNF package manager. The guide is on CentOS, but the same commands and methods apply to Fedora as well.

Happy computing.

]]>
How to Offline Update Fedora Workstation? https://linuxhint.com/offline-update-fedora-workstation/ Wed, 03 Feb 2021 01:40:28 +0000 https://linuxhint.com/?p=88963 Keeping the operating system up-to-date is important as updates contain bugfixes, performance improvements, security patches, and others. In the case of Linux, keeping the system updated mostly means keeping all the installed packages up-to-date.

Offline updating is an interesting concept when a system needs to be updated but without any reliable internet connection. In such a situation, the update packages are manually downloaded from a different source and applied to the offline machine.

In this guide, check out how to offline update the Fedora workstation.

Offline update Fedora

Fedora is a modern-day Linux distro with robust package management. Thanks to its package managers (DNF and YUM), it’s possible to update Fedora without any internet connection. However, for the best possible experience, the offline machine may have to be connected to the internet for a brief period of time.

It’s strongly recommended to use the CLI for updating Fedora offline.

Grabbing the Package Update List

The first step is to determine which packages have updates available. For this step only, it’s necessary to have an internet connection to the system.

Package update list using YUM:

The following YUM command will list all the packages that have updates available.

$ yum repoquery --upgrade --queryformat '%{name}.%{arch}'

For the next step, we need this list exported to a text file.

$ yum repoquery --upgrade --queryformat '%{name}.%{arch}' > update_list.txt

Package update list using DNF:

The following DNF command will list all the packages that have updates available.

$ dnf repoquery --upgrade --queryformat '%{name}.%{arch}'

Export the list to a text file.

$ dnf repoquery --upgrade --queryformat '%{name}.%{arch}' > update_list.txt

Package list using RPM:

If an internet connection isn’t available, then an alternative strategy is to grab the list of all the installed packages and work with it. Of course, this method will significantly increase the length of the process. It’s not recommended and follow only if you have to.

Grab all the installed packages in a nice format.

$ rpm -qa --queryformat "%{NAME}\n"

Export this list to a text file.

$ rpm -qa --queryformat "%{NAME}\n" > update_list.txt

Downloading Packages

Now, it’s time to download the desired packages. Export the text file containing the list of packages to download, load it on a different Fedora machine, and follow any of the following methods to download them.

First, check whether the text file contains only the package list, and nothing else.

$ vim update_list.txt

Download update packages using YUM:

The following YUM command will download the packages listed on the text file and store them in the directory specified. To avoid any issue related to dependencies, use the “–resolve” flag.

$ yum download --resolve $(cat update_list.txt) --downloaddir="<directory>
"

Download update packages using DNF:

Similar to YUM, the following DNF command will download and store all the packages (and dependencies) on the specific directory.

$ dnf download --resolve $(cat update_list.txt) --downloaddir="<directory>"

Installing the Updates

Finally, it’s time to update the offline machine. Export the update packages to the offline system and follow either of the following methods to install the RPM packages.

Install updates using YUM:

The following command will install all the RPM packages using YUM.

$ sudo yum install /<path_to_rpm>/*.rpm

Install updates using DNF:

The following command will install all the RPM packages using DNF.

$ sudo dnf install /<path_to_rpm>/*.rpm

Final Thoughts

It’s a complete guide on how to offline update Fedora workstation. This method will work on any modern version of Fedora, and it’s not a difficult task at all.

The only downside to this approach is the time and effort it requires. While the manual task is minimal, the most time-consuming part is downloading and installing all those RPM packages (especially if the list is too long).

Happy computing!

]]>
How to Install LAMP in Fedora Linux https://linuxhint.com/install-lamp-fedora-linux/ Tue, 02 Feb 2021 19:09:54 +0000 https://linuxhint.com/?p=88752

The LAMP server is one of the most commonly used sets of open-source applications for building web applications. LAMP is a stable and powerful server structure and, at the same time, is very easy to use and set up. LAMP is an acronym for the four components comprising it: Linux, Apache, MySql, and Php. A similar counterpart for Windows and MacOS is also there, namely, WAMP and MAMP.

Prerequisites:

Before proceeding to install the LAMP server in Fedora OS, make sure that you fulfill the following prerequisites:

  1. Have Fedora OS installed on your system. In this article, we are using Fedora 32 OS.
  2. Have root privileges access to the system you are working on.
  3. Have good Internet connectivity for downloading the various packages.

This guide shows you how to install the three components of the LAMP server. Later, you will learn how to make a basic LAMP application to check whether the installation is working as expected.

The following sections show the installation process for installing the LAMP server in Fedora OS:

Installing Apache

To install the Apache, or httpd, web server, run the following command:

# dnf install httpd -y

Next, enable the Apache service to automatically start at next system bootup:

# systemctl enable httpd.service

Now, start the service and check the status with the following commands:

# systemctl start httpd

# systemctl status httpd

Allow the HTTP and HTTPS services from the firewall. This is necessary if your firewall is blocking access to these services:

# firewall-cmd --permanent --add-service=http

# firewall-cmd --permanent --add-service=https

# firewall-cmd --reload

The process of installing Apache is now finished. Next, we will continue with the installation of the MariaDB database.

Installing MariaDB

MariaDB is a fork of the original MySQL database.

To install the MariaDB database in Fedora, issue the following command:

# dnf install mariadb-server -y

Once the installation is completed, we will enable and start the mariaDB service, as we did for the Apache server:

# systemctl enable mariadb

# systemctl start mariadb

# systemctl status mariadb

To finish configuring and securing the MariaDB server, we need to tweak certain settings. Run the command below to begin the secure installation of the MariaDB server:

#  mysql_secure_installation

When you run the above command, a set of questions will appear on the screen, such as:

  1. Enter current password for root (enter for none): [press Enter]

Here, simply press Enter, as there is no default password the first time that you configure MariaDB.

  1. Switch to unix_socket authentication [Y/n] n

From MariaDB 10.4, a new authentication method has been added based on unix_scoket. In this guide, we will go through with the conventional MariaDB password. Continue by typing N/n.

  1. Change the root password? [Y/n] n

Note that we are already the root user when installing MariaDB 10.4, so we automatically have password-less, root-like access. Continue by typing N/n.

  1. Remove anonymous users? [Y/n] y

Here, we will remove the anonymous user. The anonymous user allows anyone to log in to the database without an account. Removing the anonymous user is necessary for a production environment, as this account is only meant for testing purposes. Continue by typing Y/y.

  1. Disallow root login remotely? [Y/n] y

Next, deny access for root login from remote address to improve security. Continue by typing Y/y.

  1. Remove test database and access to it? [Y/n] y

The test database is a default database that can be accessed by anyone. Like the anonymous user, the test database is only meant for testing purposes and should be removed before moving to a production environment. Type Y/y here, as well.

  1. Reload privilege tables now? [Y/n] y

Press Y/y to apply all the above changes immediately.

Now, the installation and configuration of MariaDB is complete. We will now move on to install PHP.

Installing PHP

PHP is one of the most widely used scripting languages for application development. To install PHP in Fedora 32 OS, we will run the following command:

# dnf install php php-common

Development with PHP will likely require the installation of several application-specific PHP modules, as shown below:

# dnf install php-mysqlnd php-gd php-mbstring

Some of these modules could already be installed with PHP; in our case, php-mbstring was installed alongside PHP.

A note about these modules:

php-mysqlnd – MySQL Native Driver Plugin, or msqlnd, is required by PHP for working with the MariaDB/MySQL database.

php-gd – Required by PHP for working with and handling various image file (GIF, PNG, JPEG, etc.) operations.

php-mbstring – This module provides PHP with multibyte string handling capability.

Testing the LAMP Server Configuration

After installing PHP, we are now all set to test our configuration. We will create a test project to check whether all the components of our LAMP setup are working properly.

Follow the steps below to do so:

Log in to the MariaDB database, as shown below:

# mysql

For MariaDB 10.4, we do not need to specify the password to log in as a system-wide root user.

As we have denied the remote access for the root login in MariaDB while installing, we need to create a new user for remote access. In MariaDB, run the following command to create a new user:

CREATE USER 'myuser'@'localhost' IDENTIFIED BY '123';

GRANT ALL ON *.* TO 'myuser'@'localhost';

flush privileges;

Return to the Apache root document directory and create a file with any name; for example, we will use “test.php.”

Put the following code inside the new file and save it:

<html>

   <head>

     <title>LAMP Application</title>

   </head>

   <body>

      <?php

     $stmt = new mysqli(“localhost”,”myuser”,”123)

 

     if($stmt->connect_error) {

        die('Error in Connection ->'.$stmt->connect_error);

      }

 

      echo 'Connection successful: You are all set to go.';

 

      ?>

   </body>

</html>

Open a web browser and navigate to the following address:

http://localhost/test.php

or

http://”Apache_System_IP ”/test.php

If you have correctly followed the steps provided in the procedure above, you should now be able to see the “Connection successful” message, as shown below:

Conclusion

Congratulations! You have successfully built a LAMP environment and deployed a basic working LAMP application. In this guide, you learned how to install a LAMP server in Fedora OS, as well as the method for deploying a basic application using the LAMP server. If you found this guide useful, then please share it with others.

]]>
How to Setup and Use YUM on Fedora? https://linuxhint.com/setup-and-use-yum-on-fedora/ Sun, 31 Jan 2021 09:57:55 +0000 https://linuxhint.com/?p=88496

A Linux distro can be described as a collection of inter-dependent packages on top of the Linux kernel. Together, they offer an amazing experience. To keep the packages in order, a package manager is a must-have for every distro.

In the case of Fedora, YUM and DNF are two package managers. In this guide, we’ll check out how to set up and use YUM on Fedora.

YUM on Fedora

YUM is the primary package manager for Fedora that can query info about packages, fetch packages from repos, install/uninstall packages with automatic dependency solution, and update the entire system. YUM can also work with additional repos or package sources. To extend the functionality, YUM also supports many plugins.

YUM can perform the same tasks as RPM but in a more efficient and simpler manner. It also simplifies configuring your own repositories and RPM packages.

In the modern-day, YUM is being replaced by DNF, a modern-day package manager. It’s because YUM has some inherent issues like poor performance, high memory consumption, poor documentation, etc. However, it’s still worth learning YUM because Fedora, CentOS, and RHEL still support YUM as a valid package manager.

Installing YUM on Fedora

As one of the default package managers, YUM should come pre-installed with Fedora. Run the following commands to verify if YUM is installed:

$ which yum

$ yum --version

If YUM isn’t installed, then the following command will install YUM right away.

$ sudo dnf install yum

Using YUM

It’s time to learn how to use YUM– a full-fledged package manager with tons of features. This section demonstrates some of its most common and important commands.

Installing a package

To install a package, YUM requires the package name. Assuming you have the package name, run the following command to install it. YUM will automatically resolve and install all the necessary dependencies.

$ sudo yum install <package_name>

If there needs to install multiple packages, then just place all the package names separated by space.

$ sudo yum install <package_1> <package_2>

When installing any package, YUM will ask for confirmation. If you want YUM to install the packages without asking any permission, then use the “-y” flag.

$ sudo yum -y install <package_1> <package_2>

Install an RPM package

Various packages are directly available as RPM packages. While the default method of installing an RPM package is using the RPM tool, it’s recommended to use YUM to do so. If installed using YUM, the RPM package will be installed with all its dependencies (if available).

$ sudo yum install <rpm_package_path>

If there are multiple packages, then mention those as well.

$ sudo yum install <rpm_package_1> <rpm_package_2>

It’s also possible to install an RPM package that’s available through a direct link. In the following example, YUM will download and install the RPM Fusion repo.

$ sudo yum install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Removing a package

When a package is no longer needed, keeping it installed is redundant. To remove an unwanted package, use the following command structure:

$ sudo yum remove <package_name>

YUM will ask for permission to perform the action. If you want YUM to not ask for permission, use the “-y” flag.

$ sudo yum -y remove <package_name>

Same as installing multiple packages, YUM can also remove multiple packages.

$ sudo yum remove <package_1> <package_2>

Searching a package

In many situations, the exact package name for a certain app is hard to keep track of. In such situations, the built-in searching feature of YUM comes really handy.

To search for a certain package name with a search term, use the following command structure:

$ yum search <search_term>

Updating a package

If there’s an update available for a certain package, it’s possible to individually update the package. By default, YUM will download and install the latest version of the package with dependencies.

$ sudo yum update <package_name>

Updating system

Instead of updating individual packages, it’s more efficient to let YUM update the entire system. YUM will check and download all the available updates and install them accordingly.

First, check if there’s any update available.

$ sudo yum check-update

If there’s any update available, the following command will install all of them:

$ sudo dnf update

List packages

Using the “list” function, YUM can print all the list of packages, installed or available. This function can also search for an available package with a specific name.

To list all the installed packages, run the following command. The output will be huge, so we’ll be piping the output to “less” for easier browsing.

$ yum list installed | less

To list all the matching packages with a specific search term, use the following command:

$ yum list <search_term>

To list all the packages (installed and available), run the following command:

$ yum list all | less

Information about a package

Before installation, YUM can show detailed info about a package, and it can be helpful in various situations. To check info about a package, run the following YUM command:

$ yum info <package_name>

Group packages

In Linux, a group is a bundle of a number of packages. A group will generally contain packages that are related to each other. For example, the group “Java Development” contains all the necessary tools for developing programs in the Java programming language.

The following command will list all the available groups.

$ yum grouplist

To check the information about a group, run the following command:

$ yum groupinfo <group>

To install a group, run the following command:

$ sudo yum groupinstall <group>

If a group is to be updated, run the following command:

$ sudo yum groupupdate <group>

To uninstall a group, run the following command:

$ sudo yum groupremove <group>

Repositories

YUM repositories are the primary sources for downloading and installing packages. Fedora comes with the Fedora repos by default. However, it’s possible to add/remove additional repositories.

First, check out all the currently active repositories.

$ yum repolist

If there are some disabled repos, those won’t show on this list. To list all the repositories, run the following command:

$ yum repolist all

To install a specific package from a specific repo, use the flag “–enablerepo”. It works on both enabled or disabled repo.

$ sudo yum --enablerepo=<repo> install <package>

Cleaning up YUM

YUM generates all the repo package data in the “/var/cache/yum” location; each repo with its own sub-directory. While the cache is important for YUM to provide the fastest possible performance, a corrupted cache may be a problem, and cleaning it up will solve the issue.

$ sudo yum clean all

Now, perform a system update. YUM will automatically generate the caches again.

$ sudo yum check-update

Final thoughts

YUM is a powerful package manager. This guide demonstrates some of the most common usages of YUM. For quick help, check out the YUM help page.

$ yum --help

For in-depth information about YUM, the man page is quite useful.

$ man yum

Happy computing!

]]>
How to Set up RPM Fusion on Fedora Linux? https://linuxhint.com/set-up-rpm-fusion-on-fedora-linux/ Wed, 27 Jan 2021 12:56:18 +0000 https://linuxhint.com/?p=87696 Any Linux distro can be described as a combination of the Linux kernel and various packages on top. The system devs have to decide which packages can be available from the official repositories. Fedora is no different. It follows a set of rules when it comes to supporting packages through the official Fedora repos:

  • The package contents can’t be proprietary.
  • The package can’t be legally encumbered.
  • The package can’t violate the laws of the United States (especially Federal or applicable state laws).

This is where third-party repositories come into play. These repos have more freedom to provide software packages that Fedora excludes.

In this guide, check out how to set up RPM Fusion on Fedora Linux.

Fedora and RPM Fusion

RPM Fusion is one of the most popular third-party repos for Fedora, CentOS/RHEL, and similar distros. It’s often the primary source of many third-party applications for Fedora. RPM Fusion is a result of three projects merging: Dribble, Freshrpms, and Livna. Check out RPM Fusion.
All the packages from RPM Fusion are pre-compiled and available for all the current versions of Fedora, RHEL, and derivatives. RPM Fusion works with tools like YUM, DNF, and PackageKit. In the case of Fedora, YUM, and DNF are both available.

There are two different repos under RPM Fusion:

  • RPM Fusion free: It contains open-source software.
  • RPM Fusion non-free: It contains software without having an open-source licensing, but the source code is available for free.

There are also additional third-party repos for Fedora, for example, Google Chrome repo.

Configuring RPM Fusion

RPM Fusion is quite simple to configure, and it’s possible to do via both GUI and CLI.

Configure RPM Fusion using GUI

RPM Fusion offers direct RPM packages to configure the repos. Go to the RPM Fusion configuration page and download the RPM packages for both “free” and “non-free” repos.

Once downloaded, launch the file manager and browse for the RPM packages. Double-click the RPM packages. It’ll open them in GNOME Software.

Click “Install” to install the RPM package. It’ll require sudo privilege to act.

Finally, check if the RPM Fusion repos are enabled. Go to GNOME Software >> “Software Repositories”. If disabled, enable them. The actions will require sudo privilege to perform.

Voila! RPM Fusion is successfully installed and effective!

Configure RPM Fusion using CLI

RPM Fusion is easier to configure using the command-line. All it requires is running a single-line command to install the repository RPMs.

The following command will install RPM Fusion in both “free” and “non-free” repos. DNF will automatically grab and install the appropriate RPM packages for the Fedora version currently running.

$ sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

RPM Fusion should be enabled by default. The next step is to update the DNF cache. Run the following command:

$ sudo dnf update

If you’re using the GNOME/KDE desktop, the following step is recommended. It enables RPM Fusion integration with GNOME Software and KDE Discover.

$ sudo dnf groupupdate core

Disabling and enabling RPM Fusion

When a repo isn’t necessary, it’s generally better to disable the repo. A disabled repo will still remain configured in the system, but it won’t be used for installing or searching packages.

To disable RPM Fusion repo, run the following commands:

$ sudo dnf config-manager --set-disabled rpmfusion-free
$ sudo dnf config-manager --set-disabled rpmfusion-nonfree

If RPM Fusion is necessary once again, then enable the repos using the following commands:

$ sudo dnf config-manager --set-enabled rpmfusion-free

$ sudo dnf config-manager --set-enabled rpmfusion-nonfree

Removing RPM Fusion

Removing RPM Fusion from the system is simple. All it requires is to remove the RPM packages for both RPM Fusion “free” and “nonfree” repos.

First, determine the package name for the RPM Fusion repos.

$ rpm -qa | grep -i <repo>

Remove the packages using the following command:

$ sudo dnf remove <package_1> <package_2>

Final thoughts

RPM Fusion hosts tons of awesome software that aren’t available from the official Fedora/RHEL repos. After following this guide, hopefully, you’ve learned how to take advantage of this awesome repo.

Happy computing!

]]>
Installing Google Chrome on Fedora Linux https://linuxhint.com/install-google-chrome-fedora-linux/ Sun, 24 Jan 2021 23:05:15 +0000 https://linuxhint.com/?p=87564

Google Chrome is one of the top browsers for all platforms. It’s a product released by Google. The browser comes with numerous features, including synchronization with Google services, fast performance, fast performance, etc.

In this guide, check out how to install Google Chrome on Fedora Linux.

Google Chrome vs. Chromium

Chromium is often mentioned as the open-source alternative to Google Chrome. In action, both browsers feel and behave the same way. So, what’s the difference?

Both browsers share the same code baes. Chromium is an open-source browser project that’s maintained by the Chromium Projects. Google Chrome is based on Chromium. However, it comes with various proprietary features and different licensing.

For regular users, using either Chromium or Google Chrome will offer almost the same experience.

Installing Chrome and Chromium on Fedora

There are multiple ways of installing Google Chrome on Fedora. Google offers an installable RPM package of Chrome. Alternatively, you can manually enable the Google Chrome repo and install Chrome from there.

In the case of the Chromium browser, it’s directly available from the official Fedora repo. Some variations of the Chromium browser are also available from the RPM Fusion repository.

Install Google Chrome on Fedora

Install Chrome using GUI

This is the simplest way of installing the Chrome browser. However, it requires that you’re running the GNOME desktop. In the case of Fedora, GNOME is the default desktop environment.

Launch GNOME Software. It’s a graphical tool for managing Fedora repositories and apps.

First, it’s required to enable the Google Chrome repository. Go to “Software Repositories” on Software.

Click “Install” under the “Third Party Repositories.” It will enable all the important and popular third-party repos, including the one for Google Chrome.

For our purpose, we need the repo for Google Chrome. Enable the “google-chrome” repo. The action will require root privilege.

Once enabled, search for “chrome” on Software.

From the Google Chrome page, click “Install.”

Install Chrome using CLI

Google Chrome can also be installed from the command line. There are multiple ways to proceed. The recommended method of installing Chrome is to install it from the repo. Launch a terminal and install the extra Fedora repos.

$ sudo dnf install fedora-workstation-repositories

Although the repos are installed, they’re not activated. For this guide, we only need the Google Chrome repo. Enable the Chrome repo.

$ sudo dnf config-manager --set-enabled google-chrome

There are multiple releases of Google Chrome. The following command will install Google Chrome stable. This is the recommended way to go for most users.

$ sudo dnf install google-chrome-stable

To install the Chrome beta release, run the following command.

$ sudo dnf install google-chrome-beta

To install the Chrome unstable release, run the following command.

$ sudo dnf install google-chrome-unstable

Install Google Chrome from RPM

Because Chrome is a popular browser, Google officially offers an installable RPM package. Fedora users can manually download it from the official Chrome download page. Alternatively, DNF can download and install it.

The following DNF command will download and install Chrome from the official RPM package. Note that it’s the Chrome stable release.

$ sudo dnf install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm

Install Chromium on Fedora

The Chromium browser is basically the vanilla version of Google Chrome. Because it’s open-source and comes with more flexible licensing, the Chromium browser may be the go-to choice. Moreover, it’s also suitable for security-concerned folks.

Configuring RPM Fusion

RPM Fusion is an awesome repo to have on Fedora. It’s a third-party repository that hosts numerous packages that Fedora or Red Hat doesn’t officially ship. All the packages of the repo are kept updated. The reason it’s recommended is that some flavor of Chromium browser comes from the RPM Fusion repo.

The following command will configure the RPM Fusion repo (free and non-free).

$ sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Install Chromium on GUI

Fire up GNOME Software and search for Chromium.

Make sure that the extra Fedora repos are installed and enabled, especially RPM Fusion ones.

Here, three different types of Chromium browser are available.

  • ungoogled-chromium: The official distribution of ungoogled-chromium. This variant retains the default Chromium experience as closely as possible. It incorporates tweaks for improved privacy, control, and transparency. However, the features must be manually activated/enabled.
  • Chromium (CBP): It’s a distribution of the ungoogled-chromium project on GitHub. It incorporates various tweaks for enhanced privacy, transparency, and control.
  • Chromium (Freeworld): The default Chromium browser built with all free world codecs and VA-API support.

Install the release of Chromium browser that suits your needs.

Install Chromium from CLI

As discussed earlier, there are several types of Chromium browsers available for Fedora. Those packages can also be installed from the command line.

Assuming the system already has RPM Fusion repos installed and enabled, the following DNF commands will install the Chromium browser release.

To install the vanilla Chromium browser, run the following command.

$ sudo dnf install chromium.x86_64

To install Chromium (CBP), run the following command.

$ sudo dnf install chromium-browser-privacy.x86_64

To install Chromium (Freeworld), run the following command.

$ sudo dnf install chromium-freeworld.x86_64

Fedora customization

For Chrome/Chromium browser, Fedora offers some recommended customization. It includes a custom user-agent string and access to many Fedora Project services. It’s an optional step to complete.

To install the Fedora-suggested configuration for Chrome/Chromium, run the following command.

$ sudo dnf install fedora-chromium-config.noarch

Final thoughts

Installing Google Chrome is a simple task. Follow the method that fits you best.

Happy computing!

]]>
How to Install OpenJDK on Fedora Linux https://linuxhint.com/install-openjdk-fedora-linux/ Wed, 20 Jan 2021 10:36:56 +0000 https://linuxhint.com/?p=86915 Java is a general-purpose programming language offering reliability, security, and compatibility. Java is everywhere – mobile apps, desktop programs, web applications, and enterprise systems.

To build Java apps, developers need the JDK (Java Development Kit) that comes with all the essential tools. In this guide, check out how to install OpenJDK on Fedora Linux.

JDK and OpenJDK

Before jumping into the OpenJDK installation process, here’s a quick refresh of JRE versus JDK.

JRE (Java Runtime Environment)

One of the key concepts that make Java awesome is “write once; run anywhere.” This is where JRE comes in.

When compiled, a Java program is transformed into bytecodes. It’s the job of the JRE to create a virtual environment in which this bytecode will run. The virtual environment is known as JVM (Java Virtual Machine).

As long as a platform has a JRE built for it, it’s possible to run Java apps.

For general users, having JRE installed is more than enough.

JDK (Java Development Kit)

The JDK is the software development environment for developing Java apps and applets. It’s a combination of multiple packages. The JDK includes the JRE, an interpreter, a compiler, a documentation generator, and other tools.

As the description suggests, JDK is necessary for developers working with Java.

There are multiple JDKs available to choose from – OpenJDK, Oracle JDK, AdoptOpenJDK, etc.

Oracle JDK vs. OpenJDK

Oracle maintains Java itself. Starting from Java 11, Oracle changed the Java licensing policy that caused quite a commotion in the community and market.

Previously, Oracle offered free updates (security patches, hotfixes, etc.) to the older Java (Oracle JDK) versions. These hotfixes would also be included in the OpenJDK codebase. Starting from Java 11, Oracle changed the Java release cycle and stopped offering patches to the old versions for free. If there was support necessary, then it requires purchasing a license from Oracle.

Moreover, Oracle JDK isn’t to be used for professional workload anymore. If Oracle JDK is to be used, then it also requires getting a license from Oracle. However, for educational and personal use, Oracle JDK is still available, free of charge.

Using OpenJDK offers more freedom. OpenJDK is more than enough for personal and educational use. If the older versions of OpenJDK to be used, it’s also fine. However, that comes with security concerns. Because of Oracle’s new release cycle, a new OpenJDK will also become obsolete very soon. For many businesses, that’s not a viable solution.

OpenJDK vs AdoptOpenJDK

This is where AdoptOpenJDK comes in. It’s a community release of the OpenJDK. It improvises where OpenJDK lacks.

In the case of OpenJDK, older Java comes with the threat of security issues. Those patches are only available on the latest Java. AdoptOpenJDK backports those improvements to the older versions, offering a more consistent experience for the businesses.

AdoptOpenJDK is also enterprise-ready. It’s sponsored by major powerhouses of the industry, namely Amazon, IBM, Microsoft, Red Hat, etc.

As for licensing, AdoptOpenJDK is also flexible. It uses an OpenJDK source that’s licensed under GPL v2 with Classpath Exception. The build scripts and other codes related to AdoptOpenJDK is licensed under Apache License v2.0. Check out AdoptOpenJDK to learn more.

For personal and educational purposes, either is fine.

Installing OpenJDK on Fedora

OpenJDK is an open-source implementation of the Java Standard Edition (Java SE) and JDK. It’s the source code of OpenJDK that builds the basis of all the commercial Java products, including Oracle JDK. OpenJDK is publicly available under the GNU General Public License.

The OpenJDK package is directly available from the official Fedora repo. It contains all the major Java versions. At the time of writing this article, OpenJDK is available for Java 8, Java 11 (LTS), and Java 15 (latest).

To get a list of all the available OpenJDK versions, run the following command.

$ dnf search openjdk

It’s recommended to go with the long-term release. In this example, the following command will install Java 11, the latest LTS release. There

$ sudo dnf install java-11-openjdk-devel.x86_64

To install the latest Java, run the following command. Note that this command applies to any latest Java release. As of now, the latest Java version is Java 15.

$ sudo dnf install java-latest-openjdk-devel.x86_64

Verify the installation.

$ java -version

$ javac -version

Install AdoptOpenJDK

While the default OpenJDK is fine, AdoptOpenJDK offers more features and flexibility for everyone. There are two ways to install AdoptOpenJDK.

Install AdoptOpenJDK from the archive

First, grab the appropriate version of AdoptOpenJDK. Check out AdoptOpenJDK latest releases page.

Extract the archive.

$ tar -xvf OpenJDK11U-jdk_x64_linux_hotspot_11.0.9.1_1.tar.gz

Add the location of the newly extracted directory to “PATH.” To make it a permanent change, add the line to bashrc.

$ nano ~/.bashrc
$ export PATH=/home/viktor/Downloads/jdk-11.0.9.1+1/bin:$PATH

Verify that the installation was successful.

$ java -version
$ javac -version

Install AdoptOpenJDK RPM

This is the recommended way of installing AdoptOpenJDK. Instead of manual installation, it’s better to let the package manager do the job.

Downloading the RPM package for Fedora is not intuitive. First, go to the link that hosts AdoptOpenJDK RPM packages for Fedora.

Select the current version of Fedora your system is currently running. In my case, it’s Fedora 33.

Go to the “x86_64” folder.

As we’re interested in grabbing the RPM package, select the “Packages” folder.

Download the AdoptOpenJDK RPM package of your choice. The packages are named after their Java version, JVM type, etc. As we’re going for the JDK, skip grabbing any JRE package.

Once downloaded, install the RPM package.

$ sudo dnf localinstall adoptopenjdk-11-hotspot-11.0.9+11.2-3.x86_64.rpm

Install AdoptOpenJDK using SDKMAN

SDKMAN is an interesting solution to manage parallel versions of multiple SDKs. It’s a tool that’s designed for UNIX-based systems. It offers a convenient CLI and API for installing, switching, removing, and listing SDKs.

Besides JDK, SDKMAN supports tons of SDKs. Check out SDKMAN supported SDKs.

Installing SDKMAN is quite simple. Just run the following command.

$ curl -s "https://get.sdkman.io" | bash

Follow the on-screen instructions to complete the installation. Once finished, restart the terminal and run the following command to load SDKMAN.

$ source "$HOME/.sdkman/bin/sdkman-init.sh"

Verify that SDKMAN is successfully installed.

$ sdk version

The following command will list all the available JDKs that can be installed using SDKMAN.

$ sdk list java

In my case, the following command will install AdoptOpenJDK 11 (LTS).

$ sdk install java 11.0.9.hs-adpt

SDKMAN will ask whether to set it for default. If there’s no other version installed, then SDKMAN will set it as the default.

For more in-depth use of SDKMAN, check out the official SDKMAN usage guide.

Final thoughts

Installing JDK is a must for those interested in working with Java. Follow the method that suits you the best.

New to Java programming? Here’s a quick list of Java tutorials for you to get started.

Happy computing!

]]>
Installing Steam on Fedora Linux https://linuxhint.com/install-steam-fedora-linux/ Tue, 19 Jan 2021 18:29:33 +0000 https://linuxhint.com/?p=85947

Steam is one of the largest marketplaces for gaming. It hosts thousands of games from publishers all over the world. If you’ve ever been into gaming, then Steam is definitely a name you’ve heard.

In addition to the awesome online marketplace, Steam also offers a dedicated client for easier management of games. For Linux, however, Steam is more than that. Steam is the leading platform for supporting Linux as a viable gaming platform. Thanks to Steam client and Proton, a big portion of Steam games can run on Linux.

In this guide, check out how to install Steam on Fedora Linux.

Steam on Fedora Linux

Steam offers an official desktop client for multiple platforms, including Windows, Linux, macOS, etc. By default, Steam offers a DEB package for Debian/Ubuntu-based systems. For Fedora, however, the installation is a bit different.

Install Steam from RPM Fusion repo

RPM Fusion is a 3rd-party repository for apps that Red Hat and Fedora Project don’t ship. The software comes in pre-compiled RPM packages for all current Fedora versions and RHEL or clone versions. RPM Fusion works with YUM, DNF, and PackageKit, etc.

Note that Steam for RPM Fusion is available only for 32-bit architecture. However, it should work fine under Fedora 64-bit system.

Configuring RPM Fusion is quite simple. Just run this long command.

$ sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Now, update the DNF cache.

$ sudo dnf update

Finally, install Steam.

$ sudo dnf install steam

Install Steam flatpak

Flatpak is an interesting type of Linux package. Given the support for the platform, a flatpak package can run on any Linux distro. All it requires is having the flatpak package manager installed. Steam is available as a flatpak package. This method is less troublesome than the previous one.

The flatpak package manager comes pre-installed with Fedora. So, there’s no need to install it again manually. However, if it’s missing, then run the following command to install it quickly.

$ sudo dnf install flatpak

Add the FlatHub repo to flatpak. FlatHub is basically the official flatpak app store.

$ sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Finally, install Steam flatpak.

$ sudo flatpak install flathub com.valvesoftware.Steam

Configuring Steam

Once the client is installed, it’s time to configure it. Launch the Steam client.

When launched for the first time, Steam will download the latest updates. It may take some time.

Steam is ready to go! Assuming you already have a Steam account, select “LOGIN TO AN EXISTING ACCOUNT”. If there’s no Steam account, then click “CREATE NEW ACCOUNT” and follow the instructions to create a new one.

Enter the necessary credentials.

Voila! Steam is up and running!

Configuring Proton

Proton is a powerful tool released by Valve Software (owner of Steam). It’s integrated with the Steam client. It’s the tool that offers to have a better experience playing Windows games on Linux. Under the hood, Proton is a combination of multiple tools like Wine and DXVK. It’s all installed and maintained automatically.

There’s also a big database to find out whether your desired game is stable under Proton. Check out ProtonDB.

To enable Proton, go to Steam >> Settings.

From the “Settings” window, select “Steam Play” from the left panel.

Check the options marked in the screenshot. As for the Proton version, ensure that it’s the latest version.

Steam will prompt for restarting the client. Select “RESTART STEAM” to take the changes into effect.

Uninstalling Steam

If for some reason, Steam is no longer required, you may want to uninstall it. Depending on the installation method, the uninstallation procedure will vary.

If Steam was installed from the RPM Fusion repo, then DNF can do the job.

$ sudo dnf remove steam

If Steam was installed as flatpak, then use the following command instead.

$ sudo flatpak uninstall com.valvesoftware.Steam

To further clean up the Steam residue files and directories, run the following commands.

$ cd ~/.local/share && rm -rf Steam

Final thoughts

Installing Steam is not a difficult task at all. Enjoy all your favorite games from Steam.

If you’re into gaming, there are some dedicated Linux distros out there. Check out some of the best Linux distros for gaming.

Happy computing!

]]>