Installing MariaDB Binary Tarballs

Source: Internet
Author: User

Development environment:

[Email protected]~]# Yum grouplist

installed Groups : ... ............ to view the installation of the two package groups, if not, perform the following;

Yumgroupinstall Development Tools

Yumgroupinstall Server Platform Development

Download mariadb

website Download: https://mariadb.org/

https://downloads.mariadb.org/mariadb/5.5.40/

http://mirrors.ustc.edu.cn/mariadb/mariadb-5.5.40/bintar-linux-x86_64/mariadb-5.5.40-linux-x86_64.tar.gz ....... stable General Available version in the. ......

wget http://mirrors.ustc.edu.cn/mariadb/mariadb-5.5.40/bintar-linux-x86_64/mariadb-5.5.40-linux-x86_64.tar.gz

Local FTP Download

Lftp ftp://172.16.0.1/pub/Sources/6.x86_64/mariadb

Mget mariadb-5.5.36-linux-x86_64.tar.gz

decompression mariadb Binary Tarballs ,

[e-mail protected] ~]# tar xfmariadb-5.5.36-linux-x86_64.tar.gz-c/usr/local ........ ......... expand to a custom directory/usr/local

Create a soft connection or rename (best link)

[Email protected] ~]# cd/usr/local

[[email protected] local]# ls

Bin etc Games include Lib Lib64 libexec mariadb-5.5.36-linux-x86_64 sbin share src

[Email protected] local]# lnmariadb-5.5.36-linux-x86_64 mysql-s

[e-mail protected] local]# ll ... .. See if a soft connection is created, or you can view it directly with LN-SV in the previous step

lrwxrwxrwx 1 root root Dec 16:51 mysql-> mariadb-5.5.36-linux-x86_64

Create a System user

[[email protected] local]# groupadd-r MySQL

[Email protected] local]# useradd-g mysql-rmysql

[[email protected] local]# ID mysql ......... ..... viewing user and group ID information

uid=496 (MySQL) gid=493 (MySQL) groups=493 (MySQL)

[[Email protected] local]# CD MySQL

[e-mail protected] mysql]# pwd ...... View current Path

/usr/local/mysql

Create logical volumes (optional);

[Email protected] local]# Mkdir/mydata

[Email protected] local]# FDISK/DEV/SDA

P : View Primary partition

N : New Partition

P New Primary partition

3 numbering

+30g Add partition size

T .... modify TD for New Plus partition

3 Specify the partition number

8e ....... Td

P See if TD is in effect

W: Save Exit

[e-mail protected] mysql]# partx-a/dev/sda ...... let the kernel recognize the new partition

[[email protected] MySQL] #pvcreate/dev/sda3

[[email protected] MySQL] #vgcreate myvg/dev/sda3

[[email protected] MySQL] #lvcreate-l 10g-n mylv MYVG

Create File System ... xfs (if not)

[[email protected] MySQL] #yum list all | Grepxfs

[[email protected] MySQL] #yum-y installxfsprogs

[[email protected] MySQL] #mkfs-t XFS/DEV/MYVG/MYLV

[[email protected] MySQL] #vim/etc/fstab ........... Mount to MyData (not affected when the logical volume increases in size)

/dev/myvg/mylv/mydata XFS Defaults 0 0

[[email protected] MySQL] #mount-A

[[email protected] MySQL #mount ... ........ Check to see if it's mounted on

Create/mydata/data : (Because the MyData is under the root, not on the new partition, so the mounted file will be in bulk in the new partition, not conducive to management)

[[email protected] MySQL] #mkdir/mydata/data

[[email protected] MySQL] #chown-R mysql:mysql/mydata/data/

[[email protected] MySQL] #ll/mydata

[[email protected] MySQL] #pwd

[[email protected] MySQL] #ll

MARIADB initialization of data;

[[email protected] MySQL] #scripts/mysql_install_db--help (important option explanation)

--datadir=path the path to the MariaDB data Directory ..... ..... ..... ..... ... ... ..... ............. Data Directory Storage location

--defaults-extra-file=name

read this file after Theglobal files is Read. ....................... ........ Read Global configuration file location

--skip-name-resolve use IP addresses rather than hostnames whencreating ....... .... ......... skipping host name resolution

Grant Tableentries. This option can be useful if

Your DNS does not work.

--user=user_name the login username to use for runningmysqld. Files ..... ........ ......... ........ which user completes the initialization

and directories CreatedBy Mysqld'll be a owned by this

User.  You must is root to use this option. By default

MYSQLD runs using yourcurrent login name and files and

Directories that itcreates'll be owned.

[[email protected] MySQL] #scripts/mysql_install_db--user=mysql--datadir=/mydata/data

[Email protected] mysql]# Ls/mydata/data

aria_log.00000001 aria_log_control MySQL Performance_schema test

[[email protected] mysql]# ls

Bin COPYING. LESSER docs install-binary man README share support-files

COPYING data include Lib Mysql-test scripts Sql-bench

[Email protected] mysql]# Mkdir/etc/mysql

[Email protected] mysql]# CPSUPPORT-FILES/MY-LARGE.CNF/ETC/MYSQL/MY.CNF

[[email protected] MySQL] #vim/etc/mysql/my.cnf

Datadir=/mydata/data

innodb_file_per_table=on ......... the content to be modified =1 can also be

[[email protected] MySQL] #ls

[[email protected] MySQL] #cp support-files/mysql.server/etc/rc.d/init.d/mysqld

[Email protected] mysql]# chkconfig--listmysqld

Service MYSQLD supports Chkconfig, but isn't referenced in Anyrunlevel (run ' chkconfig--add mysqld ')

[e-mail protected] mysql]# chkconfig--addmysqld ... ............ load to boot start item, but not yet started, can only be started next time

[Email protected] mysql]# chkconfig--listmysqld

Mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off

[[Email protected] mysql]# service Mysqldstart ... .......... Manual Start

Starting MySQL ... [OK] Ls/mydata/data

[Email protected] mysql]# vim/etc/profile.d/mariadb.sh

Export Path=/usr/local/mysql/bin: $PATH

[Email protected] mysql]#./etc/profile.d/mariadb.sh

[Email protected] mysql]# Echo $PATH

[[email protected] mysql]# mysql ........... enabled, the interface is complete.

Welcome to the MariaDB Monitor. Commands End With; or \g.

Your MariaDB Connection ID is 2

Server Version:5.5.36-mariadb-log MariaDB Server

Copyright (c) Monty, Oracle, program Ab and others.

Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the Currentinput statement.

MariaDB [(None)]>

More details refer to official website https://mariadb.com/kb/en/mariadb/documentation/getting-started/binary-packages/ installing-mariadb-binary-tarballs/


This article is from the "West to Dragon Elephant" blog, please make sure to keep this source http://burgess8909.blog.51cto.com/9607271/1590832

Installing MariaDB Binary Tarballs

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.