Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

05-2-3cdh mysql Building and jdk

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Construction of mysql of cdh

Cdh6.10~5.16 supports mysql 5.1 5.5 5.6 5.7

Cdh6.1~5.9 supports 5.1 5.5 5.6

Cdh6.0 supports 5.1 5.5

We use mysql5.6 online.

Cloudera Manager/CDH 5.9-5.16 mariadb 5.5 10.0

Cloudera Manager/CDH 5.5-5.8 mariadb 5.5

/ / We recommend using mysql5.6 series in production

For MySQL 5.6 and 5.7, you must install the MySQL-shared-compat or MySQL-shared packages. This is required for the installation of the Cloudera Manager Agent package.

11. MySQL GTID-based replication is not supported.

/ / Supplementary GTID is the global transaction ID, which ensures that a unique ID can be generated in the replication cluster for each transaction committed on the master.

GTID-based replication:

1. The slave server tells the master server the GTID value of the transaction that has been executed.

two。 The master library tells you which GTID transactions are not executed.

The same transaction is executed once in the specified slave library.

12. Cdh does not support HA / / of mysql, but we can use mysql from

13. Important: when the process is restarted, the configuration of each service will be redeployed using the information saved in the Cloudera Manager database. If this information is not available, the cluster cannot start or function properly. You must schedule and maintain regular backups of the Cloudera Manager database to restore the cluster if the database is lost. For more information, see backing up databases.

The specific operations are as follows:

Before installing mysql, make sure that mysql is not installed on the system. You need to uninstall clean mysql.

How to uninstall the clean mysql reference link: https://www.cnblogs.com/zhangjianbing/p/9039767.html

[root@hadoop02-182a] # find /-name mysql

/ etc/selinux/targeted/active/modules/100/mysql

/ usr/lib64/mysql

/ usr/share/mysql

Rm-rf / etc/selinux/targeted/active/modules/100/mysql

Rm-rf / usr/lib64/mysql

Rm-rf / usr/share/mysql

Uninstall mariadb

[root@centos7 mysql] # rpm-qa | grep mariadb

Mariadb-libs-5.5.41-2.el7_0.x86_64

[root@centos7 mysql] # rpm-e mariadb-libs-5.5.41-2.el7_0.x86_64

Error: Failed dependencies:

Libmysqlclient.so.18 () (64bit) is needed by (installed) postfix-2:2.10.1-6.el7.x86_64

Libmysqlclient.so.18 (libmysqlclient_18) (64bit) is needed by (installed) postfix-2:2.10.1-6.el7.x86_64

[root@centos7 mysql] # rpm-e-- nodeps mariadb-libs-5.5.41-2.el7_0.x86_64

[root@centos7 mysql] # rpm-qa | grep mariadb

Install mysql

[root@hadoop01-181ins] # cd mysql

[root@hadoop01-181mysql] # ll

Total 476148

-rw-r--r-- 1 root root 1223 Jan 11 2018 my.cnf

-rw-r--r-- 1 root root 243783680 Mar 27 14:11 MySQL-5.6.39-1.el7.x86_64.rpm-bundle.tar

-rw-r--r-- 1 7155 31415 20323040 Dec 11 2017 MySQL-client-5.6.39-1.el7.x86_64.rpm

-rw-r--r-- 1 7155 31415 3533032 Dec 11 2017 MySQL-devel-5.6.39-1.el7.x86_64.rpm

-rw-r--r-- 1 7155 31415 93063020 Dec 11 2017 MySQL-embedded-5.6.39-1.el7.x86_64.rpm

-rw-r--r-- 1 7155 31415 62426388 Dec 11 2017 MySQL-server-5.6.39-1.el7.x86_64.rpm

-rw-r--r-- 1 7155 31415 2105264 Dec 11 2017 MySQL-shared-5.6.39-1.el7.x86_64.rpm

-rw-r--r-- 1 7155 31415 2299644 Dec 11 2017 MySQL-shared-compat-5.6.39-1.el7.x86_64.rpm

-rw-r--r-- 1 7155 31415 60026444 Dec 11 2017 MySQL-test-5.6.39-1.el7.x86_64.rpm

Tar-zxvf MySQL-5.6.39-1.el7.x86_64.rpm-bundle.tar

The mysql installation process / / requires the following sequential installation

Rpm-ivh MySQL-shared-5.6.39-1.el7.x86_64.rpm

Rpm-ivh MySQL-shared-compat-5.6.39-1.el7.x86_64.rpm

Rpm-ivh MySQL-server-5.6.39-1.el7.x86_64.rpm

Rpm-ivh MySQL-client-5.6.39-1.el7.x86_64.rpm

MySQL-devel-5.6.39-1.el7.x86_64.rpm / / development library, which may not be installed

MySQL-embedded-5.6.39-1.el7.x86_64.rpm / / embedded version may not be installed

MySQL-test-5.6.39-1.el7.x86_64.rpm / / can not be installed

/ / when it appears

[root@cdh7-55-21 mysql] # rpm-ivh MySQL-server-5.6.39-1.el7.x86_64.rpm

Warning: MySQL-server-5.6.39-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Error: Failed dependencies:

Libaio.so.1 () (64bit) is needed by MySQL-server-5.6.39-1.el7.x86_64

Libaio.so.1 (LIBAIO_0.1) (64bit) is needed by MySQL-server-5.6.39-1.el7.x86_64

Libaio.so.1 (LIBAIO_0.4) (64bit) is needed by MySQL-server-5.6.39-1.el7.x86_64

Solution:

Wget http://mirror.centos.org/centos/7/os/x86_64/Packages/libaio-0.3.109-13.el7.x86_64.rpm

Rpm-ivh libaio-0.3.109-13.el7.x86_64.rpm

And then execute

Rpm-ivh MySQL-server-5.6.39-1.el7.x86_64.rpm is fine.

If an error is reported, if the version conflicts, uninstall the default installed mysql-libs; first. If there is a lack of dependencies, install it.

$> yum install-y perl-Module-Install.noarch

After the installation is successful, start mysql systemctl start mysql

The default installation password can be obtained through more / root/.mysql_secret

Change the default password:

Mysql > SET PASSWORD FOR 'root'@'localhost'=PASSWORD (' hadoop')

B) mysql_secure_installation / / initialization command runs mysql_secure_installation, changes the password for root users to access the database, forbids remote machines to log in as root users, and forbids anonymous login

...

...

...

436 find /-name "my.cnf"

437 cp / usr/my.cnf / usr/my.cnf.back

439 cp / data/ins/mysql/my.cnf / usr/my.cnf

Systemctl restart mysql

444 systemctl enable mysql

445 chkconfig-list

446 chkconfig mysql on

447 chkconfig-list

Finally, create the corresponding library

Mysql > GRANT ALL PRIVILEGES ON. TO 'root'@'%' IDENTIFIED BY' hadoop' WITH GRANT OPTION; sets root permissions for remote access

Query OK, 0 rows affected (0.06 sec)

Allow any computer with an IP address (% above) to access the MySQL Server using an admin account and password (admin)

# you must add an account like this before you can log in remotely. Root account cannot be logged in remotely, only locally.

Create database hive default character set utf8

CREATE USER 'hive'@'%' IDENTIFIED BY' hadoop'

GRANT ALL PRIVILEGES ON hive. * TO 'hive'@'%'

FLUSH PRIVILEGES

Create database hue default character set utf8

CREATE USER 'hue'@'%' IDENTIFIED BY' hadoop'

GRANT ALL PRIVILEGES ON hue. * TO 'hue'@'%'

FLUSH PRIVILEGES

Create database activity default character set utf8

CREATE USER 'activity'@'%' IDENTIFIED BY' hadoop'

GRANT ALL PRIVILEGES ON activity. * TO 'activity'@'%'

FLUSH PRIVILEGES

Create database oozie default character set utf8

CREATE USER 'oozie'@'%' IDENTIFIED BY' hadoop'

GRANT ALL PRIVILEGES ON oozie. * TO 'oozie'@'%'

FLUSH PRIVILEGES

[root@hadoop01-181mysql] # cat my.cnf # For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html# * * DO NOT EDIT THIS FILE. It's a template which will be copied to the# * * default location during install, and will be replaced if you# * upgrade to a newer version of MySQL [client] password = 123456port = 3306 defaultdisabled clients set = UTF8 [mysqld] transaction-isolation = READ-COMMITTEDsql_mode=NO_ENGINE_SUBSTITUTION STRICT_TRANS_TABLESport = 3306character_set_server=utf8character_set_client=utf8collation-server=utf8_general_cilower_case_table_names=1max_connections=1000default_storage_engine=INNODBwait_timeout=31536000interactive_timeout=31536000key_buffer = 16Mkey_buffer_size = 32Mmax_allowed_packet = 32Mthread_stack = 256Kthread_cache_size = 64query_cache_limit = 8Mquery_cache_size = 64Mquery_cache_type = 1read_buffer_size = 2Mread_rnd_buffer_size = 16Msort_buffer_size = 8Mjoin_buffer_size = 8Minnodb_file_per_table = 1innodbroomflushlog _ At_trx_commit = 2innodb_log_buffer_size = 64Minnodb_buffer_pool_size = 4Ginnodb_thread_concurrency = 8innodb_flush_method = O_DIRECTinnodb_log_file_size = 512M [MySQL] default_character_set = utf8

Install jdk

Rpm-ivh jdk-8u181-linux-x64.rpm

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: 0

*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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report