Ubuntu Server源码编译安装MariaDB

sudo apt-get update
sudo apt-get install make
sudo apt-get install cmake
sudo apt-get install automake
sudo apt-get install autoconf
sudo apt-get install libtool
sudo apt-get install gcc
sudo apt-get install bison
sudo apt-get install g++
sudo apt-get install libncurses5-dev
sudo apt-get install libssl-dev
sudo apt-get install libjemalloc-dev

sudo groupadd mysql
sudo useradd -g mysql mysql
cd /usr/local/src/mariadb-*
sudo cmake .
sudo make
sudo make install
sudo cp support-files/my-huge.cnf /usr/local/mysql/my.cnf

cd /usr/local/mysql
sudo chown -R root .
sudo chown -R mysql data
sudo chgrp -R mysql .
sudo scripts/mysql_install_db --user=mysql
sudo ./bin/mysqld_safe --user=mysql
sudo ./bin/mysqladmin -u root password ''
sudo ./bin/mysql -u root

你可能感兴趣的:(Linux,Ubuntu,MariaDB)