Install MariaDB via Yum, Apt, etc.

To get the latest MariaDB for your distribution (Yum, Apt, etc.), use:

It will generate a config entry like:

name = MariaDB
baseurl =

which you can install by saving to /etc/yum.repos.d/mariadb.repo and run: yum install MariaDB-server MariaDB-client

Yum update only security-related packages

yum -y install yum-plugin-security

# To display all updates that are security relevant, and get a reutrn code on whether there are security updates enter:
yum --security check-update

# To upgrade packages that have security errata (upgrades to the latest available package) use:
yum --security update

# To upgrade packages that have security errata (upgrades to the last security errata package) use:
yum --security update-minimal

# See yum-security man page for more information:
man 8 yum-security

thanks, cyberciti

Yum lock version

Want to make sure a specific package (e.g., apache, php, etc.) don’t accidentally get updated via Yum, you can do:

yum install yum-versionlock
yum versionlock packagename


yum versionlock php-5.4*
yum versionlock list

to remove specific package:
yum versionlock delete php-5.4*

to remove ALL packages:
yum versionlock clear

CentOS alternate repos

While CentOS is great, sometimes you want more recent versions of programs, particularly LAMP stack. Here are some ways to do that via yum:

epel and remi: (see here)

rpm -Uvh remi-release-*.rpm epel-release-*.rpm

ius community:

sudo rpm -Uvh ius-release*.rpm epel-release*.rpm
sudo yum install yum-plugin-replace

search for existing repos and replace

yum update
yum install [standard utils (gcc, rsync, subversion)]
rpm -qa | grep mysql
yum replace mysql --replace-with mysql55
yum install mysql55-server mysql55-devel