How to install and manage software on CentOS 7

In this tutorial, we will show you how to install and manage software on a Linux VPS that runs CentOS 7 as the operating system.

Installing and managing software on a Linux server running CentOS as the operating system is pretty easy. You can do this using a package manager called yum. First of all, connect to the CentOS VPS via SSH and check if some of the installed packages on your system are available for updating. You can do this with the following command:

yum check-update

The command output will show you the packages that have available updates, and you should update them as soon as possible. You can update packages one by one, and you can update all packages at once with the command:

yum update

The package manager will determine which packages need to be updated along with package dependencies and calculate the total download size. You will be prompted to confirm the package upgrade, which you can do by typing ‘Y’ at the command prompt and pressing Enter.

The yum package manager allows you to search for a package and get more information about it before installing it on your system. The package manager will check for the allowed repositories on your system and will search its databases for the package. To check which repositories are enabled on your system, you can run the command:

yum repolist

To get a list of all repositories, including those that are disabled, you can use the following command:

yum repolist all

Now, to search for a package, you can use the ‘yum search’ command. In our examples, we’ll be using a package named HTTPD. The HTTPD package provides the Apache HTTP Server. For example, to get a list of all packages that match the HTTPD string, you can run the following command:

yum search httpd

The output should be similar to the one below:

# yum search httpd
============================== N/S matched: httpd ==============================
iipsrv-httpd-fcgi.noarch : Apache HTTPD files for iipsrv
ispmanager-pkg-httpd.x86_64 : Virtual packages for httpd
ispmanager-pkg-httpd-itk.x86_64 : Virtual packages for httpd
ispmanager-pkg-httpd-itk-cl.x86_64 : Virtual packages for httpd
libmicrohttpd-devel.i686 : Development files for libmicrohttpd
libmicrohttpd-devel.x86_64 : Development files for libmicrohttpd
libmicrohttpd-doc.noarch : Documentation for libmicrohttpd
libmicrohttpd-isp-devel.x86_64 : Development files for libmicrohttpd
libmicrohttpd-isp-doc.noarch : Documentation for libmicrohttpd
lighttpd-fastcgi.x86_64 : FastCGI module and spawning helper for lighttpd and
                        : PHP configuration

To display information about a specific package, you can use the ‘yum info’ command. For more information about the HTTPd package, you can use the following command:

yum info httpd

The output should be similar to the following:

# yum info httpd
Installed Packages
Name        : httpd
Arch        : x86_64
Version     : 2.4.6
Release     : 40.el7.centos
Size        : 9.4 M
Repo        : installed
Summary     : Apache HTTP Server
URL         : http://httpd.apache.org/
License     : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
            : web server.

To install a package, you can use the “yum install“ command. For example, to install the HTTPD package on your CentOS VPS, you can use the command below:

yum install httpd

To get a list of all installed packages on your system along with their version and their repositories, you can use the following command:

yum list installed

Finally, to remove a package from the system, you can use the ‘yum remove’ command. For example, to remove the HTTPd package from your system, you can run the following command:

yum remove httpd

The package manager will also remove packages that depend on it.

PS. If you liked this post, please share it with your friends on social media using the buttons on the left side of the post, or just leave a comment below. Thank you in advance.

Sidebar