Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

RHEL7.3 compilation and installation of mariadb10.2.6

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Uninstall MySql or mariadb and boost that come with the system.

[root@rhel7 ~] # rpm-qa | grep mysql

[root@rhel7 ~] # rpm-qa | grep mariadb

Mariadb-libs-5.5.52-1.el7.x86_64

[root@rhel7] # rpm-e-- nodeps mariadb-libs-5.5.52-1.el7.x86_64

[root@rhel7 ~] # rpm-qa | grep boost

[root@rhel7 ~] #

2. Check whether there are mysql users and groups

[root@rhel7 ~] # cat / etc/group | grep mysql

[root@rhel7 ~] # cat / etc/passwd | grep mysql

3. Create mysql users and groups

[root@rhel7 ~] # groupadd mysql

[root@rhel7] # useradd-g mysql-s / usr/sbin/nologin mysql

4. Create the mariadb installation directory

[root@rhel7] # mkdir-p / usr/local/mysql/data

5. Install compiling software

[root@rhel7 ~] # yum install make gcc-c++ cmake libaio libaio-devel perl-Data-Dumper net-tools ncurses-devel bison bison-devel gcc-c++ ncurses-devel cmake perl gcc autoconf automake zlib libxml libgcrypt libtool openssl-devel-y

6. Install lrzsz and upload mariadb-10.2.6.tar.gz using lrzsz

[root@rhel7 ~] # yum install lrzsz

[root@rhel7 ~] # rz

Upload MySql package

7. Decompress mariadb-10.2.6.tar.gz packet

[root@rhel7 ~] # tar zxvf mariadb-10.2.6.tar.gz

8 、 cmake

[root@rhel7 ~] # cd mariadb-10.2.6

[root@rhel7] # cmake. -DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DMYSQL_DATADIR=/usr/local/mysql/data-DSYSCONFDIR=/etc-DWITHOUT_TOKUDB=1-DWITH_INNOBASE_STORAGE_ENGINE=1-DWITH_ARCHIVE_STPRAGE_ENGINE=1-DWITH_BLACKHOLE_STORAGE_ENGINE=1-DWIYH_READLINE=1-DWIYH_SSL=system-DVITH_ZLIB=system-DWITH_LOBWRAP=0-DMYSQL_UNIX_ADDR=/usr/local/mysql/data/mysql.sock-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci

9 、 make

Make-j 6\\ specify several threads

10. Make install\\ install to the specified directory

11. Change mysql directory permissions

[root@rhel7] # chown-R mysql.mysql / usr/local/mysql/

12. Add the execution path of mysql to PATH

[root@rhel7 ~] # vi / etc/profile

Export PATH=$PATH:/usr/local/mysql/bin\\ add this line to the last line

[root@rhel7 ~] # source / etc/profile

13. Cp suitable configuration file

[root@rhel7 ~] # ls / usr/local/mysql/support-files/

Magic my-large.cnf mysqld_multi.server

My-huge.cnf my-medium.cnf mysql-log-rotate

My-innodb-heavy-4G.cnf my-small.cnf mysql.server

[root@rhel7 ~] # cp / usr/local/mysql/support-files/my-small.cnf / etc/my.cnf

14. Modify / etc/my.cnf

[root@rhel7 ~] # cat / etc/my.cnf

# Example MySQL config file for small systems.

#

# This is for a system with little memory (

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report