<?xml version="1.0"?> <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See accompanying LICENSE file. -->
<configuration>
<!-- Site specific YARN configuration properties --> <property> <name>yarn.log.server.url</name> <value>http://node1:19888/jobhistory/logs</value> <description></description> </property>
<property> <name>yarn.web-proxy.address</name> <value>node1:8089</value> <description>proxy server hostname and port</description> </property>
<property> <name>yarn.log-aggregation-enable</name> <value>true</value> <description>Configuration to enable or disable log aggregation</description> </property>
<property> <name>yarn.nodemanager.remote-app-log-dir</name> <value>/tmp/logs</value> <description>Configuration to enable or disable log aggregation</description> </property>
<!-- Site specific YARN configuration properties --> <property> <name>yarn.resourcemanager.hostname</name> <value>node1</value> <description></description> </property>
<property> <name>yarn.nodemanager.local-dirs</name> <value>/data/nm-local</value> <description>Comma-separated list of paths on the local filesystem where intermediate data is written.</description> </property>
<property> <name>yarn.nodemanager.log-dirs</name> <value>/data/nm-log</value> <description>Comma-separated list of paths on the local filesystem where logs are written.</description> </property>
<property> <name>yarn.nodemanager.log.retain-seconds</name> <value>10800</value> <description>Default time (in seconds) to retain log files on the NodeManager Only applicable if log-aggregation is disabled.</description> </property>
<property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> <description>Shuffle service that needs to be set for Map Reduce applications.</description> </property> </configuration>
# 更新密钥 rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 # 安装Mysql yum库 rpm -Uvh http://repo.mysql.com//mysql57-community-release-el7-7.noarch.rpm # yum安装Mysql yum -y install mysql-community-server # 启动Mysql设置开机启动 systemctl start mysqld systemctl enable mysqld # 检查Mysql服务状态 systemctl status mysqld # 第一次启动mysql,会在日志文件中生成root用户的一个随机密码,使用下面命令查看该密码 grep 'temporary password' /var/log/mysqld.log # 修改root用户密码 mysql -u root -p -h localhost Enter password: mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'Root!@#$'; # 如果你想设置简单密码,需要降低Mysql的密码安全级别,sql语句以;结尾 set global validate_password_policy=LOW; # 密码安全级别低 set global validate_password_length=4; # 密码长度最低4位即可 # 然后就可以用简单密码了(课程中使用简单密码,为了方便,生产中不要这样) ALTER USER 'root'@'localhost' IDENTIFIED BY '123456; /usr/bin/mysqladmin -u root password '123456'
grant all privileges on *.* to root@"%" identified by 'root' with grant option; flush privileges; # 允许所有用户通过root用户进行链接操作,在主机使用navicat链接时需要配置 grant all on *.* to 'root'@'%' identified by '你的密码';