• 编译安装Mariadb-10.5.5


    [root@centos7-1 ~]$yum -y install bison bison-devel zlib-devel libcurl-devel libarchive-devel boost-devel gcc gcc-c++ cmake ncurses-devel gnutls-devel libxml2-devel openssl-devel libevent-devel libaio-devel

    [root@centos7-1 ~]$lscpu
    Architecture: x86_64
    CPU op-mode(s): 32-bit, 64-bit
    Byte Order: Little Endian
    CPU(s): 8
    On-line CPU(s) list: 0-7
    Thread(s) per core: 1
    Core(s) per socket: 1
    Socket(s): 8
    NUMA node(s): 1
    Vendor ID: GenuineIntel
    CPU family: 6
    Model: 94

    [root@centos7-1 ~]$useradd -r -s /sbin/nologin -d /data/mysql mysql

    [root@centos7-1 ~]$mkdir /data/mysql

    [root@centos7-1 ~]$chown mysql.mysql /data/mysql/

    [root@centos7-1 ~]$tar xf mariadb-10.5.5.tar.gz

    [root@centos7-1 ~]$cd mariadb-10.5.5

    [root@centos7-1 mariadb-10.5.5]$cmake .
    > -DCMAKE_INSTALL_PREFIX=/usr/local/mysql/
    > -DMYSQL_DATADIR=/data/mysql/
    > -DSYSCONFDIR=/etc/
    > -DMYSQL_USER=mysql
    > -DWITH_INNOBASE_STORAGE_ENGINE=1
    > -DWITH_ARCHIVE_STORAGE_ENGINE=1
    > -DWITH_BLACKHOLE_STORAGE_ENGINE=1
    > -DWITH_PARTITION_STORAGE_ENGINE=1
    > -DWITHOUT_MROONGA_STORAGE_ENGINE=1
    > -DWITH_DEBUG=0
    > -DWITH_READLINE=1
    > -DWITH_SSL=system
    > -DWITH_ZLIB=system
    > -DWITH_LIBWRAP=0
    > -DENABLED_LOCAL_INFILE=1
    > -DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock
    > -DDEFAULT_CHARSET=utf8
    > -DDEFAULT_COLLATION=utf8_general_ci

    [root@centos7-1 mariadb-10.5.5]$make -j 8;make install

    提示:如果出错,执行rm -f CMakeCache.txt

    [root@centos7-1 mariadb-10.5.5]$echo 'PATH=/usr/local//mysql/bin:$PATH ' > /etc/profile.d/mysql.sh
    [root@centos7-1 mariadb-10.5.5]$source /etc/profile.d/mysql.sh

    [root@centos7-1 mariadb-10.5.5]$/usr/local/mysql/scripts/mysql_install_db --datadir=/var/lib/mysql --user=mysql

    [root@centos7-1 mariadb-10.5.5]$cp -a /usr/local/mysql/support-files/wsrep.cnf /etc/my.cnf

    [root@centos7-1 mariadb-10.5.5]$cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld

    [root@centos7-1 ~]$chkconfig --add mysqld

    [root@centos7-1 ~]$service mysqld start
    Starting mysqld (via systemctl):
    [ OK ]

    [root@centos7-1 ~]$/usr/local/mysql/bin/mysql_secure_installation

    [root@centos7-1 ~]$mysql -uroot -ptianze

    把生命浪费在美好的事物上
  • 相关阅读:
    java 事务
    JPA概述以及它和Hibernate之间的关系
    [转]JavaWeb之 Servlet执行过程 与 生命周期
    j2EE的web.xml详解
    安装PyTorch 0.4.0
    [转]springmvc常用注解标签详解
    hibernate的dialect大全
    Hibernate快速入门
    DBUtils使用详解
    用户密码初始化
  • 原文地址:https://www.cnblogs.com/tz66/p/13513813.html
Copyright © 2020-2023  润新知