cd /usr/local/src
wget https://downloads.mariadb.com/MariaDB/mariadb-10.2.6/bintar-linux-glibc_214-x86_64/mariadb-10.2.6-linux-glibc_214-x86_64.tar.gz
tar zxvf mariadb-10.2.6-linux-glibc_214-x86_64.tar.gz
mv mariadb-10.2.6-linux-glibc_214-x86_64 /usr/local/mariadb
cd /usr/local/mariadb
./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mariadb/ --datadir=/data/mariadb
cp support-files/my-small.cnf /usr/local/mariadb/my.cnf
vi /usr/local/mariadb/my.cnf //定义basedir和datadir
cp support-files/mysql.server /etc/init.d/mariadb
vim /etc/initd/mariadb //定义basedir、datadir、conf以及启动参数
/etc/init.d/mariadb start
11.7-11.9 安装Apache
原文地址:http://blog.51cto.com/3622288/2051242