How to install and manage software on CentOS 7
In this tutorial we are going to show you how to install and manage software on CentOS 7.
Installing and managing software on a Linux server running CentOS as an operating system is fairly easy. You can accomplish this by using a package manager called yum. First of all, connect to your CentOS VPS via SSH and check whether some of the installed packages on your system have available updates. You can do this by using the following command:
# yum check-update
The output of the command will show you the packages that have available updates and you should update them as soon as possible. You can update the packages one by one, and you can update all the packages at once using the command:
# yum update
The package manager will determine which packages need to be updated along with their dependencies and will calculate the total download size. You will be prompted to confirm the update of the packages which you can do by entering ‘y’ in the command prompt and then pressing Enter.
The yum package manager allows you to search for a package and retrieve more information about it before installing it on your system. The package manager will check the enabled repositories on your system and will search for the package in their databases. To check which repositories are enabled on your system you can run the command:
# yum repolist
To list all repositories including those which 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 will use the package named httpd. The package httpd provides the Apache HTTP Server. For example, to list all the packages that match the string httpd, 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 ====================================== libmicrohttpd-doc.noarch : Documentation for libmicrohttpd lighttpd-fastcgi.x86_64 : FastCGI module and spawning helper for lighttpd and PHP configuration lighttpd-mod_geoip.x86_64 : GeoIP module for lighttpd to use for location lookups lighttpd-mod_mysql_vhost.x86_64 : Virtual host module for lighttpd that uses a MySQL database owncloud-httpd.noarch : Httpd integration for ownCloud radicale-httpd.noarch : httpd config for Radicale darkhttpd.x86_64 : A secure, lightweight, fast, single-threaded HTTP/1.1 server httpd.x86_64 : Apache HTTP Server httpd-devel.x86_64 : Development interfaces for the Apache HTTP server httpd-itk.x86_64 : MPM Itk for Apache HTTP Server httpd-manual.noarch : Documentation for the Apache HTTP server httpd-tools.x86_64 : Tools for use with the Apache HTTP Server libmicrohttpd.i686 : Lightweight library for embedding a webserver in applications libmicrohttpd.x86_64 : Lightweight library for embedding a webserver in applications lighttpd.x86_64 : Lightning fast webserver with light system requirements Name and summary matches only, use "search all" for everything.
To display information about a certain package you can use the command ‘yum info’. For information about the httpd package you can use the command:
# yum info httpd
The output should be similar to the following one:
# yum info httpd Installed Packages Name : httpd Arch : x86_64 Version : 2.4.6 Release : 40.el7.centos Size : 9.4 M Repo : installed From repo : base Summary : Apache HTTP Server URL : http://httpd.apache.org/ Licence : 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 list all the installed packages on your system along with their version and their repository you can use the command:
# yum list installed
Finally, to remove a package from your system you can use the ‘yum remove’ command. For example, to remove the httpd package from your system you can run the command:
# yum remove httpd
The package manager will also remove the packages which depend on it.
Of course you don’t have to install and manage software on CentOS 7, if you use one of our CentOS VPS hosting services, in which case you can simply ask our expert Linux admins to install or remove a certain package for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post, on how to install and manage software on CentOS 7, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.