zoukankan      html  css  js  c++  java
  • 编译安装mysql5.7.20

    curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo && 
    yum clean all &&
    yum install -y wget gcc gcc-c++ automake autoconf make cmake bison-devel ncurses-devel libaio-devel &&
    mkdir /server/tools /application -p &&
    cd /server/tools &&
    useradd mysql -s /sbin/nologin -M && 
    wget https://www.chenleilei.net/soft/mysql-boost-5.7.20.tar.gz &&
    tar xf mysql-boost-5.7.20.tar.gz &&
    rm -f mysql-boost-5.7.20.tar.gz &&
    cd mysql-5.7.20 &&
    cmake . -DCMAKE_INSTALL_PREFIX=/application/mysql-5.7.20 
    -DMYSQL_DATADIR=/application/mysql-5.7.20/data 
    -DMYSQL_UNIX_ADDR=/application/mysql-5.7.20/tmp/mysql.sock 
    -DDOWNLOAD_BOOST=1 -DWITH_BOOST=./boost 
    -DSYSCONFDIR=/etc -DDEFAULT_CHARSET=utf8mb4 
    -DDEFAULT_COLLATION=utf8mb4_general_ci 
    -DWITH_EXTRA_CHARSETS=all 
    -DWITH_INNOBASE_STORAGE_ENGINE=1 
    -DWITH_FEDERATED_STORAGE_ENGINE=1 
    -DWITH_BLACKHOLE_STORAGE_ENGINE=1 
    -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 
    -DWITH_MYISAM_STORAGE_ENGINE=1 
    -DWITH_ZLIB=bundled -DWITH_SSL=bundled 
    -DENABLED_LOCAL_INFILE=1 
    -DWITH_EMBEDDED_SERVER=1 
    -DENABLE_DOWNLOADS=1 
    -DWITH_DEBUG=0 &&
    make && make install &&
    chown -R mysql.mysql /application/mysql-5.7.20 &&
    /application/mysql-5.7.20/bin/mysqld --initialize-insecure --user=mysql --basedir=/application/mysql-5.7.20 --datadir=/application/mysql-5.7.20/data
    echo -e "[mysqld] 
    basedir=/application/mysql 
    datadir=/application/mysql-5.7.20/data 
    socket=/tmp/mysql.sock 
    log_error=/var/log/mysql.log 
    user=mysql 
    port=3306 
    [client] 
    socket=/tmp/mysql.sock" >/etc/my.cnf
    rm -rf /server/tools/mysql-5.7.20 && 
    rm -rf /var/cache/yum/*
    echo 'PATH=/application/mysql/bin/:$PATH' >>/etc/profile && 
    source /etc/profile && 
    cp /application/mysql-5.7.20/support-files/mysql.server /etc/init.d/mysqld && 
    mkdir  /application/mysql-5.7.20/tmp -p && 
    ln -s /application/mysql-5.7.20 /application/mysql && 
    /etc/init.d/mysqld start
    

    微信赞赏

    支付宝赞赏

  • 相关阅读:
    js获取url参数
    css3 text-shadow字体阴影讲解
    css3 box-shadow阴影(外阴影与外发光)讲解
    【leetcode刷题笔记】Palindrome Partitioning II
    【leetcode刷题笔记】Minimum Window Substring
    【leetcode刷题笔记】Interleaving String
    【leetcode刷题笔记】Wildcard Matching
    【leetcode刷题笔记】Regular Expression Matching
    【leetcode刷题笔记】Insert Interval
    【leetcode刷题笔记】Multiply Strings
  • 原文地址:https://www.cnblogs.com/superlinux/p/12596905.html
Copyright © 2011-2022 走看看