4

I referred to the link https://blog.adminfactory.net/mariadb-and-galera-on-aws-amazon-linux.html to install the mariadb on my amazon linux, since I did not find any other resource related to amazon linux. This instructs to add maria.repo.

When I visit the suggested URL I did not find anything related to amazon linux. I tried using centos 7. It threw up error. Is there any mariadb repo for amazon linux.

The error is

Error: Package: MariaDB-server-10.1.13-1.el7.centos.x86_64 (mariadb) Requires: libsystemd-daemon.so.0()(64bit) Error: Package: MariaDB-server-10.1.13-1.el7.centos.x86_64 (mariadb) Requires: libsystemd-daemon.so.0(LIBSYSTEMD_DAEMON_31)(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

Is it ok if I continue and install libsystemd-daemon.so

I just found another question here the advice is to use linux OS. No solution on how to install Mariadb on amazon linux.

4
  • Why do you want to use Amazon Linux? Just use CentOS if you want an RHEL-based distro. You will have a much better time.
    – EEAA
    May 6, 2016 at 4:20
  • I am already using amazon linux. any solution for that. May 6, 2016 at 4:23
  • 1
    You should not be using Amazon Linux. You've discovered one reason why this is the case. There are many, many more.
    – EEAA
    May 6, 2016 at 4:25
  • Thanks for your help. Will go with Ubuntu. It would be appredciable if someone could find a way to work on amazon linux. May 6, 2016 at 5:29

3 Answers 3

16

I was able to install the MariaDB 5.5 CentOS repository list (created 2016-05-09 04:06 UTC).

Create the following file:

sudo vi /etc/yum.repos.d/maria.repo

Add the following contents to the file and save:

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

Then run the following commands:

sudo yum install -y MariaDB-server MariaDB-client
sudo /etc/init.d/mysql start

You should be all set. Run mysql -u root to log in.

You can secure MariaDB with the following command:

sudo mysql_secure_installation

More information: https://mariadb.com/kb/en/mariadb/mysql_secure_installation/

Fortunately, I was trying to install MariaDB on Amazon Linux, myself. Just now I got it to work as above.

2
2

Currently in Amazon Linux 2 you can install it with yum:

yum install mariadb

or

yum install mariadb-server
1

I was looking for the same solution as I ran into the same problem and it really boils down to transparency from Amazon. I found that my server is based on epel 6 not epel 7 (which is what I use elsewhere). Check what epel version your server is using:

sudo vi /etc/yum.repos.d/epel.repo

Within the repo file you should should see a few lines with Extra Packages for Enterprise Linux 6.

Since the repo is using Enterprise Linux 6 I need to use repos based on CentOS 6. If you have a different Linux version, ie 7, you will need to use a different version. Make sure you go to the below link and get the correct version for your server.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .