Update MariaDB from ^5 to ^10

https://www.tecmint.com/upgrade-mariadb-5-5-to-10-centos-rhel-debian-ubu...

https://www.liquidweb.com/kb/centos-7-upgrade-mariadb/

Step 1: Backup or Dump All MariaDB Databases

As always when performing an upgrade creating backup of your existing databases is important. You can either dump the databases with command such:

# mysqldump -u root -p password --all-databases > /tmp/all-database.sql

Or alternatively, you can stop the MariaDB service with:

# systemctl stop mysql

And copy the databases directory in a separate folder like this:

# cp -a /var/lib/mysql/ /var/lib/mysql.bak

In case of failure of the upgrade you can use one of the above copies to restore your databases.

Backup the configuration file with this command.

cp -a /etc/my.cnf /etc/my.cnf_bk

 

Step 2: Add the MariaDB Repository

A good practice is to make sure your packages are up to date before making any changes to your repo files. You can do this with:

# yum update          [On RHEL/CentOS 7]
# apt-get update      [On Debian/Ubuntu]

On RHEL/CentOS 7

If you have any old packages, wait for the installation to finish. Next, you will need to add the MariaDB 10.1 repo for CentOS/RHEL 7/ distributions. To do this, use your favorite text editor such as vim or nano and open the following file:

# vim /etc/yum.repos.d/MariaDB10.repo

Add the following text in it:

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

Step 3: Remove MariaDB 5.5

If you have taken backup of your databases as suggested in Step 1, you are now ready to proceed and remove the existing MariaDB installation.

To do this, simply run the following command:

# yum remove mariadb-server mariadb mariadb-libs         [On RHEL/CentOS 7]

Next, clean the repository cache:

# yum clean all          [On RHEL/CentOS 7]

Step 4: Installing MariaDB 10.3

Now it’s time to install the newer version of MariaDB, by using:

# yum -y install MariaDB-server MariaDB-client      [On RHEL/CentOS 7]

To install the latest version of MariaDB and the most common packages, run the following command.

yum install MariaDB-server galera-4 MariaDB-client MariaDB-shared MariaDB-backup MariaDB-common

 

Once the installation is complete, you can start the MariaDB service with:

# systemctl start mariadb

If you want MariaDB to automatically start after system boot, run:

# systemctl enable mariadb

Finally run the upgrade command to upgrade MariaDB with:

# mysql_upgrade -u root -p
 

To verify that the upgrade was successful, run the following command:

# mysql -V

 

yum install postfix

systemctl enable postfix.service

systemctl restart postfix.service

yum  install dovecot dovecot-mysql dovecot-pigeonhole

yum install pure-ftpd

systemctl enable pure-ftpd.service
systemctl start pure-ftpd.service

nano /etc/pure-ftpd/pure-ftpd.conf

TLS 1

yum install perl-DBD-mysql postgrey