Open ygl-rg opened 4 years ago
sudo apt-get install libpam0g-dev
on ubuntu/debian
sudo apt-get update & upgrade
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
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
cmake . -DBUILD_CONFIG=mysql_release
make
make install
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
create base data
/usr/local/mysql/scripts/mariadb-install-db --user=pi --no-defaults --basedir=/usr/local/mysql --datadir=/home/pi/mariadb_data
copy my.cnf to /etc/mysql/
http://pgeorgiev.com/compiling-and-installing-mariadb-on-raspberry-pi/