Keeping Servers Up-to-Date

Centos

As new file patches come out, Centos will need to be updated. Run the following commands to bring the server and its extensions up-to-date:

sudo yum update && sudo yum upgrade -y && sudo package-cleanup --leaves | xargs -l1 yum -y remove

Occasionally you may get this message:

There are unfinished transactions remaining. You might consider running yum-complete-transaction, or “yum-complete-transaction –cleanup-only” and “yum history redo last”, first to finish them. If those don’t work you’ll have to try removing/installing packages by hand (maybe package-cleanup can help).

Start by running:

yum-complete-transaction

Hopefully you get this message: Cleaning up completed transaction file

If you have no errors, go ahead and run:

sudo yum clean all && sudo rm -rf /var/cache/yum

Ubuntu

Run the following commands to bring the server and its extensions up-to-date:

sudo apt update && sudo apt upgrade -y && sudo apt clean all && sudo apt-get autoremove --purge -y && sudo rm -rf /var/cache/apt

Mac running Homebrew

brew update && brew upgrade && brew cleanup && brew doctor && brew services restart --all
Published
Categorized as Server

By Sharon

Hello there! I'm a web developer in Louisville, Kentucky. I started on this career path by purchasing an O’Reilly PHP book from Barnes & Noble in 1999. Since then, my desire to learn as much as I can about web site building and server maintenance has grown. I love technology and what it can do to simplify our lives and make it more interesting all at the same time. Seeing a creative design come to life and bringing it into the web world is my favorite puzzle to solve. My server experience is based around launching WordPress-friendly servers — Linux (Ubuntu and Centos flavors), Apache, MySQL, and PHP. I have worked with various modules, extensions, installs such as ImageMagick, LetsEncrypt, Sass, LESS, and the Homebrew family of extension. My main love has been with PHP, and my CMS of choice has been WordPress since its inception in 2003. I find it flexible, secure, easy to design around, and so customizable. My strengths are in developing from-scratch plugins and themes for the WordPress CMS with a strong background in PHP and MySQL development.

Leave a comment

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