In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
MySQL5.7 has been out for some time, but there has been no time to play. In the past two days, I have time to install percona, and I found that there are still a lot of interesting things. The following is a simple source code installation record (binary installation is relatively simple, and source code installation is heavily dependent on OS packages, especially zlib packages. It is recommended to use RHEL6.5 or above. Centos7 is used in this experiment).
Environment description:
Install softwar
Description
Operating system
CentOS7_x86_64 (CentOS Linux release 7.2.1511 (Core))
Database software
Percona-server-5.7.11-4.tar.gz (source code installation package)
Percona-Server-5.7.11-4-Linux.x86_64.ssl101.tar.gz (binary installation package)
Software download:
Https://www.percona.com/downloads/Percona-Server-5.7/LATEST/
Dependency package installation:
Rpm-Q gcc gcc-c++ ncurses-devel cmake libaio bison zlib-devel
Install the dependency package yum install package_name-y with Yum
[root@localhost home] # cat / etc/yum.repos.d/CentOS-Base.repo
[Base]
Name=CentOS7 ISO Base
Baseurl= file:///mnt/cdrom
Enabled=1
Gpgcheck=0
Upload and extract the installation package:
[root@localhost soft] # cd / tools/soft/MySQL/
[root@localhost MySQL] # tar-xzvf percona-server-5.7.11-4.tar.gz
Create an authorized user:
/ usr/sbin/groupadd mysql
/ usr/sbin/useradd mysql-g mysql-d / home/mysql-s / sbin/nologin
Mkdir / home/mysql/data
Mkdir / home/mysql/log
Mkdir / home/mysql/tmp
Mkdir / home/mysql/binlog
Mkdir / usr/local/mysql
Chown-R mysql.mysql / usr/local/mysql
Chown-R mysql.mysql / home/mysql
Source package compilation and installation:
Cd / tools/soft/
Tar-xzvf boost_1_59_0.tar.gz
Mv boost_1_59_0 / usr/local/boost
Cd percona-server-5.7.11-4
Cmake. -DCMAKE_INSTALL_PREFIX=/usr/local/mysql\
-DMYSQL_UNIX_ADDR=/home/mysql/mysql.sock\
-DWITH_BOOST=/usr/local/boost\
-DDEFAULT_CHARSET=utf8\
-DDEFAULT_COLLATION=utf8_general_ci\
-DWITH_MYISAM_STORAGE_ENGINE=1\
-DWITH_INNOBASE_STORAGE_ENGINE=1\
-DWITH_ARCHIVE_STORAGE_ENGINE=1\
-DWITH_BLACKHOLE_STORAGE_ENGINE=1\
-DWITH_EDITLINE=bundled\
-DENABLED_LOCAL_INFILE=1\
-DMYSQL_DATADIR=/home/mysql/data\
-DMYSQL_TCP_PORT=3306\
-DZLIB_INCLUDE_DIR:PATH=/usr/include\
-DENABLE_DOWNLOADS=1
Make-j 8
Make install
Initialize the database:
Cd / usr/local/mysql/
. / bin/mysqld-initialize-insecure-user=mysql-basedir=/usr/local/mysql-datadir=/home/mysql/data
. / bin/mysql_ssl_rsa_setup-- user=mysql-- basedir=/usr/local/mysql-- datadir=/home/mysql/data
Configure the database:
Cd / usr/local/mysql/
Cp support-files/my-default.cnf / etc/my.cnf
> / etc/my.cnf
Vi / etc/my.cnf
[client]
Socket=/home/mysql/mysql.sock
[mysqld]
Symbolic-links=0
Server_id = 120
Default_storage_engine = Innodb
User = mysql
Port = 3306
Basedir = / usr/local/mysql
Datadir = / home/mysql/data
Tmpdir = / home/mysql/tmp
Socket = / home/mysql/mysql.sock
Pid_file = / home/mysql/mysql.pid
# Character Sets & Collations
Character_set_server = utf8
Collation_server = utf8_general_ci
Open_files_limit = 10240
Explicit_defaults_for_timestamp
# Buffer
Max_allowed_packet = 256m
Max_heap_table_size = 256m
Net_buffer_length = 8K
Sort_buffer_size = 2m
Join_buffer_size = 4m
Read_buffer_size = 2m
Read_rnd_buffer_size = 16m
# log_error
Log_error = / home/mysql/log/error.log
# binlog
Log_bin = / home/mysql/binlog/mysql-bin
Binlog_cache_size = 32m
Max_binlog_cache_size = 2G
Max_binlog_size = 500m
Binlog_format = mixed
Log_output = FILE
Expire_logs_days = 5
# Slow Query Parameter
Slow_query_log = 1
Long_query_time = 3
Slow_query_log_file = / home/mysql/log/slow-query.log
# General Log
# general_log = 0
# general_log_file = / data/mysqldata/3307/general-query.log
# Innodb Engine Parameter
# innodb_data_file_path = ibdata1:1G:autoextend
Innodb_buffer_pool_size = 500m
Innodb_log_file_size = 200m
Innodb_log_files_in_group = 3
# innodb_flush_log_at_trx_commit = 2
Innodb_lock_wait_timeout = 20
[mysql]
No_auto_rehash
[mysqld_safe]
Log-error=/home/mysql/log/error.log
Configure mysql system services:
Cd / usr/local/mysql
Cp support-files/mysql.server / etc/init.d/mysql
Chkconfig-add mysql
Chkconfig mysql on
Start the database:
Service mysql start
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: 300
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.