{"id":19191,"date":"2016-05-20T08:06:50","date_gmt":"2016-05-20T13:06:50","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=19191"},"modified":"2022-06-03T03:42:53","modified_gmt":"2022-06-03T08:42:53","slug":"how-to-install-and-manage-software-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-manage-software-on-centos-7\/","title":{"rendered":"How to install and manage software on CentOS 7"},"content":{"rendered":"
<\/p>\n
In this tutorial we are going to show you how to install and manage software on CentOS 7.<\/p>\n
<\/p>\n
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<\/a> and check whether some of the installed packages on your system have available updates. You can do this by using the following command:<\/p>\n 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:<\/p>\n 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.<\/p>\n 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:<\/p>\n To list all repositories including those which are disabled you can use the following command:<\/p>\n 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:<\/p>\n The output should be similar to the one below:<\/p>\n 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:<\/p>\n The output should be similar to the following one:<\/p>\n To install a package, you can use the ‘yum install’ command. For example, to install the httpd package on your CentOS VPS<\/a>, you can use the command below:<\/p>\n To list all the installed packages on your system along with their version and their repository you can use the command:<\/p>\n 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:<\/p>\n The package manager will also remove the packages which depend on it.<\/p>\n# yum check-update<\/pre>\n
# yum update<\/pre>\n
# yum repolist<\/pre>\n
# yum repolist all<\/pre>\n
# yum search httpd<\/pre>\n
# yum search httpd\r\n=================== N\/S matched: httpd ======================================\r\nlibmicrohttpd-doc.noarch : Documentation for libmicrohttpd\r\nlighttpd-fastcgi.x86_64 : FastCGI module and spawning helper for lighttpd and PHP configuration\r\nlighttpd-mod_geoip.x86_64 : GeoIP module for lighttpd to use for location lookups\r\nlighttpd-mod_mysql_vhost.x86_64 : Virtual host module for lighttpd that uses a MySQL database\r\nowncloud-httpd.noarch : Httpd integration for ownCloud\r\nradicale-httpd.noarch : httpd config for Radicale\r\ndarkhttpd.x86_64 : A secure, lightweight, fast, single-threaded HTTP\/1.1 server\r\nhttpd.x86_64 : Apache HTTP Server\r\nhttpd-devel.x86_64 : Development interfaces for the Apache HTTP server\r\nhttpd-itk.x86_64 : MPM Itk for Apache HTTP Server\r\nhttpd-manual.noarch : Documentation for the Apache HTTP server\r\nhttpd-tools.x86_64 : Tools for use with the Apache HTTP Server\r\nlibmicrohttpd.i686 : Lightweight library for embedding a webserver in applications\r\nlibmicrohttpd.x86_64 : Lightweight library for embedding a webserver in applications\r\nlighttpd.x86_64 : Lightning fast webserver with light system requirements\r\n\r\n Name and summary matches only, use \"search all\" for everything.<\/pre>\n
# yum info httpd<\/pre>\n
# yum info httpd\r\nInstalled Packages\r\nName : httpd\r\nArch : x86_64\r\nVersion : 2.4.6\r\nRelease : 40.el7.centos\r\nSize : 9.4 M\r\nRepo : installed\r\nFrom repo : base\r\nSummary : Apache HTTP Server\r\nURL : http:\/\/httpd.apache.org\/\r\nLicence : ASL 2.0\r\nDescription : The Apache HTTP Server is a powerful, efficient, and extensible\r\n : web server.\r\n<\/pre>\n
# yum install httpd<\/pre>\n
# yum list installed<\/pre>\n
# yum remove httpd<\/pre>\n
\n