How do I install packages in CentOS?

My good friend Dave is moving over to CentOS for his RedHat development (and maybe hosting, wink-wink) platform, and he asks what is the easiest way to add packages on this distro.

Of course, for me, that’s a bit of a loaded question. What I mean is that I’m always on a Linux laptop, to GUI redirection via ssh is, well, natural. I mention this because sometimes (don’t hate me here) I find that GUI tools are easier to use, especially when you can’t be bothered to reference the man page or just flat-out don’t know all the flags.

So the first step is to make sure your CentOS installation is updated. For me, I like the simplicity and convenience of the GUI “Package Updater”. So, on the desktop, or via an ssh session with X redirection allowed and functioning, type:

pup

…and you’ll be on your way to making sure all the repositories are updated, and your packages can be updated in one or two clicks.

Or, if you prefer just a command line option, you can’t beat yum:

yum update

…of course, you can check the man pages for more info, or just type yum for all the options.

Next, we need to actually install the packages. Again like almost everything, you can do this via command line with:

yum install some-package

….or with the gui tools. Here are some of the gui tools I use all the time:

system-config-securitylevel
system-config-network
system-control-network
system-install-packages some-package
system-config-services

One easy way to find all the cool administrative commands is to type “system-” (of course, without the quotes) and hit the tab key twice (for bash auto complete) to see all the options. Most are self-explanatory.

Enjoy!

🙂

Leave a Comment

Your email address will not be published. Required fields are marked *