ygl-rg / mariadb-notes

0 stars 0 forks source link

building mariadb #1

Open ygl-rg opened 4 years ago

ygl-rg commented 4 years ago

http://pgeorgiev.com/compiling-and-installing-mariadb-on-raspberry-pi/

ygl-rg commented 4 years ago

sudo apt-get install libpam0g-dev

ygl-rg commented 4 years ago

on ubuntu/debian

  1. sudo apt-get update & upgrade

  2. sudo apt-get install -y build-essential pkg-config libgmp-dev nettle-dev nettle-bin pkg-config autogen git cmake scons libarchive-dev libevent-dev libssl-dev libboost-dev libncurses5-dev libbison-dev cmake libaio-dev libjemalloc-dev libjemalloc1 libncurses5-dev bison libxml2 libxml2-dev libzstd-dev zstd default-jre zlib1g-dev libpam0g-dev

  3. Install gnutls 3.3.24

    wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3.3/gnutls-3.3.24.tar.xz

    unxz gnutls-3.3.24.tar.xz && tar -xvf gnutls-3.3.24.tar

    cd gnutls-3.3.24

    ./configure && make && make install

    ln -s /usr/local/lib/libgnutls.so.28 /usr/lib/libgnutls.so.28

  4. cmake . -DBUILD_CONFIG=mysql_release

    make

    make install

  5. assume we use user pi to run mysqld

    chown -R pi /usr/local/mysql/

    chgrp -R pi /usr/local/mysql

    chown -R pi /var/lib/mysql/

    chown -R pi /usr/share/mysql/

    chown -R pi /var/log/mysql/

    chown -R pi /var/run/mysqld

  6. create base data

    /usr/local/mysql/scripts/mariadb-install-db --user=pi --no-defaults --basedir=/usr/local/mysql --datadir=/home/pi/mariadb_data

  7. copy my.cnf to /etc/mysql/

ygl-rg commented 4 years ago

my.txt

ygl-rg commented 4 years ago

mariadb.service.txt