Linux installation mariadb binary version

Source: Internet
Author: User

The previous article said that MARIADB compiled the installation process, but in the production environment generally use the released binary version, because the installation process and the same, no longer detailed description, just briefly summarize the installation process:

1. Download Address: https://downloads.mariadb.org/

Here choose the latest version of the 10.1.19 stable version, after entering the choice according to the number of computers, here to download the Linux x86_64 version for 64-bit operating system

  

Here the download contains glibc and does not contain glibc is all right, if the download contains glibc, then the glibc version of the system to meet the requirements, here is more than 2.14, the general system can be satisfied

Upload to server for installation after download

2. Release the installation package assuming the installation location is/USR/LOCAL/MARIADB package name: mariadb-10.1.19-linux-x86_64.tar.gz

tar -xvzf mariadb-10.1. -linux-x86_64. Tar . GZ MV mariadb-10.1. -linux-x86_64/usr/local/mariadb//usr/local/mariadb

Be careful not to set up the/USR/LOCAL/MARIADB directory in advance, just let it go

3. Related configurations

Backup legacy MySQL configuration: mv /etc/my.cnf/etc/my.cnf.bak

In the MARIADB installation directory, Support-files has several configuration templates, already configured partial parameters, respectively, for different production environments, where the default use of MY-SMALL.CNF, copy the configuration file: mv SUPPORT-FILES/MY-SMALL.CNF/ETC/MY.CNF

Edit profile: vim/etc/my.cnf Add the Basedir Global directory in the [MYSQLD] block to the default data directory, log directory, PID files are placed in the Basedir directory, configured as follows:

Basedir =/usr/local/mariadb

  

Configuration complete, Save and exit

For initial installation, create MySQL users and groups and give permissions to the current directory:

-r-g mysql-s/sbin/nologin mysqlchown -r MySQL. chgrp -R MySQL.

Then perform the initialization installation: ./scripts/mysql_install_db--user=mysql

To adjust permissions:

chown -R root. chown -R MySQL data/

Startup script: bin/mysqld_safe--user=mysql &

Add MySQL to System services directory: cp Support-files/mysql.server/etc/init.d/mysqld

If MySQL was installed before, it is now started and the first installation requires a manual start service: /etc/init.d/mysqld start

Add mysqld to system service, start with system: chkconfig mysqld on

View MySQL service running status: systemctl status Mysqld.service

All subsequent operations are exactly the same as before MySQL.

Linux installation mariadb binary version

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.