[HOWTO] Fresh install MariaDB 10.1 with VestaCP Installer in Centos 6.8

Section with modification and patches for Vesta
huloza
Posts: 17
Joined: Thu Jul 28, 2016 5:15 am

[HOWTO] Fresh install MariaDB 10.1 with VestaCP Installer in Centos 6.8

Postby huloza » Fri Aug 26, 2016 10:36 pm

Note 1: tested on Centos 6.8 MariaDB replacing mysql without problems.

Note3: tested in vesta 0.9.8-16

Note 2: Im using nano as texto editor feel free to use whatever you want (vim), but nano dont come with centos, you need to do:

Code: Select all

yum install nano



Assuming you are starting from a fresh centos 6.8 minimal system.

1. First we install the mariaDB repo for CentOS 6.8 (source)

Code: Select all

nano /etc/yum.repos.d/MariaDB.repo


this will create a new file, paste this inside:

Code: Select all

# MariaDB 10.1 CentOS repository list - created 2016-08-26 22:02 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1


Exit and Save(Control + X in nano, then Y)

2. Update the system before vesta installation:

Code: Select all

yum update


3. here you have two options, 1 get the modified installer i made(original installer is from vesta i only changed the mariadb part) or 2. download original installer and made the changes yourself

3.1 if you are lazy and want to use my installer:

Code: Select all

cd
wget http://www.eranecesario.com/vesta/vst-install-rhel.sh -O vst-install-rhel.sh


then only do:

Code: Select all

bash vst-install-rhel.sh


And thats it, your database is MariaDB 10.1.



3.2 now if you want to download the original installer and do the changes here we go:

Code: Select all

cd
wget http://vestacp.com/pub/vst-install-rhel.sh -O vst-install-rhel.sh


open the downloaded file with your favorite editor (i will use nano):

Code: Select all

nano vst-install-rhel.sh


on line 35 replace:

Code: Select all

clamd spamassassin roundcubemail mysql mysql-server phpMyAdmin postgresql

with:

clamd spamassassin roundcubemail MariaDB-server MariaDB-client phpMyAdmin postgresql



on line 609 replace:

Code: Select all

yum -y --disablerepo=* --enablerepo="base,updates,nginx,epel,vesta,remi*"\

with:

yum -y --disablerepo=* --enablerepo="base,updates,nginx,mariadb,epel,vesta,remi*"\



on line 612 replace:

Code: Select all

yum -y --disablerepo=* --enablerepo="base,updates,nginx,epel,vesta" \

with:

yum -y --disablerepo=* --enablerepo="base,updates,nginx,epel,vesta,mariadb" \



on line 960 replace:

Code: Select all

service='mysqld'

with:

service='mysql'



on line 962 replace:

Code: Select all

service='mariadb'

with:

service='mysql'



thats all!, now save and close file and run it:

Code: Select all

bash vst-install-rhel.sh



Now you have MariaDB as database in your server.

Enjoy!

skamasle
Posts: 336
Joined: Mon Feb 29, 2016 6:36 pm

Re: [HOWTO] Fresh install MariaDB 10.1 with VestaCP Installer in Centos 6.8

Postby skamasle » Sun Dec 11, 2016 7:04 pm

This works, but you can just install mariadb after install vestacp

Just add repos, remove mysql and install mariadb is faster and works as well you say.


Return to “Modification & Patches”



Who is online

Users browsing this forum: No registered users and 2 guests