Install MariaDB via Yum, Apt, etc.

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

https://downloads.mariadb.org/mariadb/repositories/

It will generate a config entry like:

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

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

e.g.:

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)

wget http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
or: http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-VER#(5|6).rpm
rpm -Uvh remi-release-*.rpm epel-release-*.rpm

ius community:

wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-6.ius.el5.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-1-1.ius.el5.noarch.rpm
or
http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/epel-release-6-5.noarch.rpm
http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/ius-release-1.0-8.ius.el6.noarch.rpm
 
 
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