关于Cloudera的技巧汇总(更新中)

Cloudera | The Hybrid Data Cloud Company

一直关注这个产品的发展,做个技术知识点的记录

CDP Private Cloud

CDP Private Cloud | Cloudera

一切从阅读官方文档开始:如下

CDP Private Cloud Experiences

7.*和6.*、5.*的变化很大

第一个问题:安装

参考地址:
CDP Private Cloud Base Installation GuideUse this Installation Guide to learn how to install Cloudera software, including Cloudera Manager, Cloudera Runtime, and other managed services, in a production or trial environment.https://docs.cloudera.com/cloudera-manager/7.1.1/installation/topics/cdpdc-installation.html

Supported operating systems for CDP Private Cloud Base 7.0.3, 7.1.1, and 7.1.2
Operating System Version

RHEL/CentOS/Oracle

7.6, 7.7, 7.8, 7.9

Debian Not Supported

 红帽系Linux

特别是数据库安装与配置对于其他项目也很有用

Install and Configure MySQL for Cloudera Software

Install and Configure MySQL for Cloudera Software

Install the MySQL database.

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm

sudo yum update

sudo yum install mysql-server

sudo systemctl start mysqld

Configuring and Starting the MySQL Server

Stop the MySQL server if it is running.

sudo systemctl stop mysqld

Move old InnoDB log files /var/lib/mysql/ib_logfile0 and /var/lib/mysql/ib_logfile1 out of /var/lib/mysql/ to a backup location.

Determine the location of the option filemy.cnf (/etc/my.cnf by default).

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
transaction-isolation = READ-COMMITTED
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
symbolic-links = 0

key_buffer_size = 32M
max_allowed_packet = 16M
thread_stack = 256K
thread_cache_size = 64
query_cache_limit = 8M
query_cache_size = 64M
query_cache_type = 1

max_connections = 550
#expire_logs_days = 10
#max_binlog_size = 100M

#log_bin should be on a disk with enough free space.
#Replace '/var/lib/mysql/mysql_binary_log' with an appropriate path for your
#system and chown the specified folder to the mysql user.
log_bin=/var/lib/mysql/mysql_binary_log

#In later versions of MySQL, if you enable the binary log and do not set
#a server_id, MySQL will not start. The server_id must be unique within
#the replicating group.
server_id=1

binlog_format = mixed

read_buffer_size = 2M
read_rnd_buffer_size = 16M
sort_buffer_size = 8M
join_buffer_size = 8M

# InnoDB settings
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit  = 2
innodb_log_buffer_size = 64M
innodb_buffer_pool_size = 4G
innodb_thread_concurrency = 8
innodb_flush_method = O_DIRECT
innodb_log_file_size = 512M

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

sql_mode=STRICT_ALL_TABLES

Ensure the MySQL server starts at boot:

sudo systemctl enable mysqld

Start the MySQL server:

sudo systemctl start mysqld

Run /usr/bin/mysql_secure_installation to set the MySQL root password and other security-related settings. In a new installation, the root password is blank. Press the Enter key when you're prompted for the root password. For the rest of the prompts, enter the responses listed below in bold:

sudo /usr/bin/mysql_secure_installation

在My SQL 数据库程序的保存目录 scripts 内找到一个名为 mysql_install_db 的脚本程序 使用--user 参数指定 My SQL 服务的对应账号名称 使用--basedir 参数指定 My SQL 服务程序的保存目录, 使用--datadir 参数指定 My SQL真实数据库的文件保存目录,这样即可成系统数据库文件,也会生成出新的 My SQL 服务配置文件。  

 ./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var

Guess you like

Origin blog.csdn.net/lm19770429/article/details/120684101