/, the Perl Home Page.
?
[root@mdb01 cmake-3.3.2]#
?
?
5) 其它系统包
?
ncurses-devel bison
?
[root@mdb01 Packages]# rpm -ivh ncurses-devel-5.7-3.20090208.el6.x86_64.rpm
warning: ncurses-devel-5.7-3.20090208.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...? ? ? ? ? ? ? ? ########################################### [100%]
? 1:ncurses-devel? ? ? ? ? ########################################### [100%]
[root@mdb01 Packages]# rpm -ivh bison-2.4.1-5.el6.x86_64.rpm
warning: bison-2.4.1-5.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...? ? ? ? ? ? ? ? ########################################### [100%]
? 1:bison? ? ? ? ? ? ? ? ? ########################################### [100%]
[root@mdb01 Packages]#
3.安装前配置
# Preconfiguration setup
[root@mdb01 soft]# groupadd mysql
[root@mdb01 soft]# useradd -r -g mysql mysql
# Beginning of source-build specific instructions
[root@mdb01 soft]# tar zxvf mysql-5.7.9.tar.gz
[root@mdb01 soft]# cd mysql-5.7.9
4.配置安装项
[root@mdb01 mysql-5.7.9]# cmake \
>? ? -DCMAKE_INSTALL_PREFIX=/opt/mysql \
>? ? -DMYSQL_DATADIR=/opt/mysql/data \
>? ? -DSYSCONFDIR=/etc \
>? ? -DWITH_MYISAM_STORAGE_ENGINE=1 \
>? ? -DWITH_INNOBASE_STORAGE_ENGINE=1 \
>? ? -DWITH_PARTITION_STORAGE_ENGINE=1 \
>? ? -DMYSQL_UNIX_ADDR=/opt/mysql/mysql.sock \
>? ? -DMYSQL_TCP_PORT=3306 \
>? ? -DENABLED_LOCAL_INFILE=1 \
>? ? -DEXTRA_CHARSETS=all \
>? ? -DDEFAULT_CHARSET=utf8 \
>? ? -DDEFAULT_COLLATION=utf8_general_ci
?
5.编译MySQL
[root@mdb01 mysql-5.7.9]# make
?
6.安装MySQL
[root@mdb01 mysql-5.7.9]# make install
# End of source-build specific instructions
?
五、安装后配置
# Postinstallation setup
1.目录权限
shell> cd /opt/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
2.初始化数据库
shell> bin/mysql_install_db --user=mysql? ? # Before MySQL 5.7.6
shell> bin/mysqld --initialize --user=mysql # MySQL 5.7.6 and up
执行结果:
[root@mdb01 mysql]# bin/mysqld --initialize --user=mysql
2015-10-29T21:58:57.465483Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-10-29T21:58:59.889999Z 0 [Warning] InnoDB: New log files created, LSN=45790
2015-10-29T21:59:00.201432Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-10-29T21:59:00.398966Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 42ad8740-7e88-11e5-83de-000c29270868.
2015-10-29T21:59:00.406427Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2015-10-29T21:59:00.424627Z 1 [Note] A temporary password is generated for root@localhost: Ek&!sA9(qYds
[root@mdb01 mysql]# ls
bin? COPYING? data? docs? include? INSTALL-BINARY? lib? man? mysql-test? README? share? support-files
[root@mdb01 mysql]#
3.证书相关
shell> bin/mysql_ssl_rsa_setup? ? ? ? ? ? ? # MySQL 5.7.6 and up
执行结果
[root@mdb01 mysql]# bin/mysql_ssl_rsa_setup
Generating a 2048 bit RSA private key
.......+++
..........+++
writing new private key to 'ca-key.pem'
-----
Generating a 2048 bit RSA private key
.........................................................................................................................................................................................+++
.+++
writing new private key to 'server-key.pem'
-----
G