Some ‘yum’ Commands for CentOS

The instructions in this article do not work with Ubuntu and its’ variants, such as Debian or Mint, as they use apt-get instead of yum. Read on if you’re a CentOS or related user.

When I first started using CentOS 7, I often selected the advanced packages during the graphical installation process, such as ‘Web Server’ or ‘GNOME Desktop’. The problem, was that I wanted to create a LAMP server with Samba, Git and phpMyAdmin for web development and none of the options seemed to fit. As a result, I eventually chose a minimal install and manually downloaded individual packages with the CentOS/RedHat specific ‘yum’ command.
I’m happy with how that went and have thoroughly documented this with my ‘A CentOS Web Development Environment’. In the meantime, I wanted to delve a little further into the ‘yum’ command to find out a bit more about the available packages.

Basic Commands include:

yum install -y application_name Install a single application, such as wget or ftp.
yum search php- Search for available php packages.
yum grouplist Provide list of available packages (such as the ones shown during the installation process.
yum groupinfo “Package Name” Display the applications in the selected package.
yum groupinstall “Package Name” Install that package.

Here’s a group listing for CentOS 7:

$ yum grouplist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base:
* epel:
* extras:
* updates:
Available environment groups:
Minimal Install
Compute Node
Infrastructure Server
File and Print Server
MATE Desktop
Basic Web Server
Virtualization Host
Server with GUI
GNOME Desktop
KDE Plasma Workspaces
Development and Creative Workstation
Available Groups:
CIFS file server
Compatibility Libraries
Console Internet Tools
Desktop Platform
Desktop Platform Development
Development Tools
Educational Software
Electronic Lab
FCoE Storage Client
Fedora Packager
General Purpose Desktop
Graphical Administration Tools
Legacy UNIX Compatibility
Messaging Client Support
Messaging Server Support
MySQL Database client
MySQL Database server
NFS file server
Network Storage Server
SNMP Support
Scientific Support
Security Tools
Server Platform
Server Platform Development
Smart Card Support
Storage Availability Tools
System Administration Tools
System Management
TeX support
TurboGears application framework
Web-Based Enterprise Management
iSCSI Storage Client

Here’s a groupinfo for Basic Web Server

$ yum groupinfo “Basic Web Server”

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base:
* epel:
* extras:
* updates:

Environment Group: Basic Web Server
Environment-Id: web-server-environment
Description: Server for serving static and dynamic internet content.
Mandatory Groups:
Optional Groups:

Comments are closed.