第十周
Posted 冯永庆的博客
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了第十周相关的知识,希望对你有一定的参考价值。
1、通过编译、二进制安装mysql
二进制:
下载软件包
https://dev.mysql.com/downloads/mysql/mysql-8.0.27-linux-glibc2.12-x86_64.tar.xz
1. 创建帐号
groupadd mysql
useradd -g mysql -d /usr/local/mysql mysql
2.创建相关目录
mkdir -p /data/mysql/mysql3306/{data,logs,tmp}
chown -R mysql:mysql /usr/local/mysql
chown -R mysql:mysql /data/mysql/mysql3306/
3、解压二进制文件
unxz mysql-8.0.27-linux-glibc2.12-x86_64.tar.xz
tar xvf mysql-8.0.27-linux-glibc2.12-x86_64.tar
cd /usr/local/
制作软连接
ln -s /data/mysql-8.0.27-linux-glibc2.12-x86_64 mysql
启动
[root@fyq939 mysql]# /usr/local/mysql/mysql-8.0.27-linux-glibc2.12-x86_64/bin/mysqld --initialize
2021-11-15T04:42:47.244399Z 0 [Warning] [MY-011070] [Server] Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it is deprecated and will be removed in a future release.
2021-11-15T04:42:47.244522Z 0 [System] [MY-013169] [Server] /usr/local/mysql/mysql-8.0.27-linux-glibc2.12-x86_64/bin/mysqld (mysqld 8.0.27) initializing of server in progress as process 109999
2021-11-15T04:42:47.595930Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-11-15T04:42:54.251142Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-11-15T04:42:55.665596Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main
2021-11-15T04:42:55.665620Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main
2021-11-15T04:42:55.797399Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: ql>BrVdef72b
编译安装
下载有boost的源码
http://mirrors.163.com/mysql/Downloads/MySQL-8.0/
tar zvxf mysql-boost-8.0.27.tar.gz
安装cmake3等依赖,后面会报错提示
yum install centos-release.x86_64
yum -y install centos-release-scl
yum install devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-binutils
yum -y install ncurses-devel
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql8.2 -DWITH_BOOST=./boost/ -DFORCE_INSOURCE_BUILD=1
make &make install
2、二进制安装mariadb10.4
下载mariadb
https://mirrors.tuna.tsinghua.edu.cn/mariadb/mariadb-10.4.22/bintar-linux-glibc_214-x86_64/
tar xzvf mariadb-10.4.22-linux-glibc_214-x86_64.tar.gz
mkdir /usr/local/mariadb
groupadd mariadb
useradd -g mariadb mariadb
cd mariadb-10.4.22-linux-glibc_214-x86_64/
ln -s /mnt/mariadb-10.4.22-linux-glibc_214-x86_64/ /usr/local/mariadb/
cd support-files/
cp mysql.server /etc/init.d/mariadbd
chmod +x /etc/init.d/mariadbd
mkdir -p /data/mariadb
chown -R mariadb:mariadb /data/mariadb/
chown -R mariadb:mariadb /usr/local/mariadb/
./scripts/mysql_install_db --user=mariadb --basedir=/usr/local/mariadb/mariadb-10.4.22-linux-glibc_214-x86_64 --datadir=/data/mariadb
/etc/init.d/mariadbd start
以上是关于第十周的主要内容,如果未能解决你的问题,请参考以下文章
2017-2018-2 20179215《网络攻防实践》第十周作业
2017-2018-2 20179223《网络攻防技术》第十周作业
2017-2018-2 20179207 《网络攻防技术》第十周作业