当前位置: 首页 > news >正文

网站优化建设苏州郑州网站设计

网站优化建设苏州,郑州网站设计,wordpress的title怎么书写,w网站链接如何做脚注1、安装背景; hive是基于hadoop的数据仓库软件,部署运行在linux系统之上,安装之前必须保证hadoop环境运行正常,hive本身不是分布式软件,它的分布式主要是借助hadoop实现,存储是hdfs,计算是mapr…

1、安装背景;

hive是基于hadoop的数据仓库软件,部署运行在linux系统之上,安装之前必须保证hadoop环境运行正常,hive本身不是分布式软件,它的分布式主要是借助hadoop实现,存储是hdfs,计算是mapreduce。

需要同时安装apache-hive-3.1.3-bin.tar.gz和mysql-5.7.42-1.el7.x86_64.rpm-bundle.tar两个软件,因为hive的建表元数据需要保存到数据库中,共74张表,一般用mysql。

2、配置mysql;

Hive 允许将元数据存储于本地或远程的外部数据库中,这种设置可以支持 Hive 的多会话生产环
境,在本案例中采用 MySQL 作为 Hive 的元数据存储库。

(1)先卸载centos7自带的mariadb数据库, 因为mariadb5.5版本与hive3.x存在兼容性问题。

# 查找centos7中是否有自带的mariadb数据库
rpm -qa|grep mariadb# mariadb-libs-5.5.64-1.el7.x86_64#卸载
rpm -e mariadb-libs-5.5.64-1.el7.x86_64 --nodeps

(2)上传mysql-5.7.42-1.el7.x86_64.rpm-bundle.tar并解压;

此处用“tar -zxvf mysql-5.7.42-1.el7.x86_64.rpm-bundle.tar -C /opt/server/mysql/”命令,会解压失败。

应该使用“tar xvf mysql-5.7.42-1.el7.x86_64.rpm-bundle.tar -C /opt/server/mysql/”,如下图;

(3)安装mysql5.7;

①安装必要的依赖包;

此处是在系统根目录安装,其他位置应该也可以。

# 安装依赖
yum -y install libaio
yum -y install libncurses*
yum -y install perl perl-devel

②安装mysql;

切换目录到“cd opt/server/mysql/”,执行下面四条命令;

# 安装mysql
rpm -ivh mysql-community-common-5.7.42-1.el7.x86_64.rpm 
rpm -ivh mysql-community-libs-5.7.42-1.el7.x86_64.rpm 
rpm -ivh mysql-community-client-5.7.42-1.el7.x86_64.rpm 
rpm -ivh mysql-community-server-5.7.42-1.el7.x86_64.rpm

安装net-tools依赖包;

yum -y install net-tools.x86_64

安装mysql-community-server.xxxxx.rpm;

rpm -ivh mysql-community-server-5.7.42-1.el7.x86_64.rpm

(4)启动mysql;

# 启动mysql
systemctl start mysqld
#查看生成的临时root密码
cat /var/log/mysqld.log | grep password

2023-09-05T03:19:52.654819Z 1 [Note] A temporary password is generated for root@localhost: pRyujui?H9gD

(5)修改初始密码;

# 登录mysql
mysql -u root -p
Enter password:     #输入在日志中生成的临时密码# 更新root密码 设置为sql2023
set global validate_password_policy=0;
set global validate_password_length=1;
set password=password('sql2023');

(6)远程授权;

# 其中 *.*代表对所有表进行授权;‘root’ 代表 root 用户;‘%’ 代表所有的外部 IP;‘sql2023’ 代表自己设置的用户密码。
grant all privileges on *.* to 'root' @'%' identified by 'sql2023';# 刷新
flush privileges;

退出mysql命令:"exit"

(7)相关命令;

#mysql的启动和关闭 状态查看
systemctl stop mysqld
systemctl status mysqld
systemctl start mysqld#建议设置为开机自启动服务
systemctl enable mysqld#查看是否已经设置自启动成功
systemctl list-unit-files | grep mysqld

3、Hive安装和配置;

(1)上传hive安装包apache-hive-3.1.3-bin.tar.gz和mysql_jdbc驱动包mysql-connector-java-5.1.38.jar;

(2)解压hive安装包;

命令“tar -zxvf apache-hive-3.1.3-bin.tar.gz -C /opt/server/”;

(3)添加mysql_jdbc驱动到hive安装包lib目录下;

(4)修改hive-env.sh,加入hadoop安装路径;

# 进入conf目录
[root@server apache-hive-3.1.3-bin]# cd ./conf# 生成hive-env.sh文件
cp hive-env.sh.template hive-env.sh#编辑hive-env.sh信息
vim hive-env.sh

# 加入hadoop路径
HADOOP_HOME=/opt/server/hadoop-3.3.1

(5)新建 hive-site.xml 文件,内容如下,主要是配置存放元数据的 MySQL 的地址、驱动、用户名和密码等信息;

vim hive-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration><!-- 存储元数据mysql相关配置 /etc/hosts --><property><name>javax.jdo.option.ConnectionURL</name><value> jdbc:mysql://server:3306/hive?createDatabaseIfNotExist=true&amp;useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8</value></property><property><name>javax.jdo.option.ConnectionDriverName</name><value>com.mysql.jdbc.Driver</value></property><property><name>javax.jdo.option.ConnectionUserName</name><value>root</value></property><property><name>javax.jdo.option.ConnectionPassword</name><value>sql2023</value></property>
</configuration>

(6)hive2j及以上版本,必须手动初始化元数据库;

# 进入bin目录
cd /opt/server/apache-hive-3.1.2-bin/bin# 初始化元数据库命令
./schematool -dbType mysql -initSchema

(7)添加hive环境变量;

#Hive
export HIVE_HOME=/opt/server/apache-hive-3.1.3-bin
export PATH=$PATH:${HIVE_HOME}/bin

刷新,使其生效;

source ./etc/profile

(8)启动hive,测试功能;

# 连接hive
hive# 创建数据库
create database test;
# 列出所有数据库
show databases;
# 切换数据库
use test;# 建表
create table tb1(id int,name varchar(64));
# 插入一条数据
insert into table tb1 values(1,"wang");
# 查询表数据
select * from tb1;

YARN有MapReduce程序执行;

退出hive命令:"exit;"


文章转载自:
http://rationalization.c7495.cn
http://accipiter.c7495.cn
http://thirst.c7495.cn
http://schoolmate.c7495.cn
http://subdepot.c7495.cn
http://aftercare.c7495.cn
http://asshead.c7495.cn
http://cithern.c7495.cn
http://orientalia.c7495.cn
http://chiffonier.c7495.cn
http://debeak.c7495.cn
http://lungee.c7495.cn
http://scrotum.c7495.cn
http://valency.c7495.cn
http://amused.c7495.cn
http://gawky.c7495.cn
http://ninth.c7495.cn
http://nidify.c7495.cn
http://advertizing.c7495.cn
http://confirmedly.c7495.cn
http://preparental.c7495.cn
http://equivocally.c7495.cn
http://repeatedly.c7495.cn
http://goaty.c7495.cn
http://kayak.c7495.cn
http://carious.c7495.cn
http://waterguard.c7495.cn
http://reissue.c7495.cn
http://siffleur.c7495.cn
http://dizzily.c7495.cn
http://specialise.c7495.cn
http://elul.c7495.cn
http://seagirt.c7495.cn
http://theropod.c7495.cn
http://conversancy.c7495.cn
http://partizan.c7495.cn
http://sandpile.c7495.cn
http://marxist.c7495.cn
http://decimalise.c7495.cn
http://ineffably.c7495.cn
http://aerocar.c7495.cn
http://insectile.c7495.cn
http://bazookaman.c7495.cn
http://extasy.c7495.cn
http://treasure.c7495.cn
http://night.c7495.cn
http://narrater.c7495.cn
http://iambic.c7495.cn
http://zenophobia.c7495.cn
http://twinset.c7495.cn
http://periblast.c7495.cn
http://terrorize.c7495.cn
http://hearse.c7495.cn
http://facecloth.c7495.cn
http://fanum.c7495.cn
http://wolfy.c7495.cn
http://glonoin.c7495.cn
http://knickknack.c7495.cn
http://hateful.c7495.cn
http://messieurs.c7495.cn
http://hydrochloric.c7495.cn
http://leaning.c7495.cn
http://citlaltepetl.c7495.cn
http://corned.c7495.cn
http://irradiate.c7495.cn
http://unwrought.c7495.cn
http://timpani.c7495.cn
http://nasrani.c7495.cn
http://youthful.c7495.cn
http://nihilism.c7495.cn
http://venire.c7495.cn
http://hydroscope.c7495.cn
http://heriot.c7495.cn
http://sowntown.c7495.cn
http://convey.c7495.cn
http://insignia.c7495.cn
http://brazenfaced.c7495.cn
http://navigator.c7495.cn
http://intellective.c7495.cn
http://minimi.c7495.cn
http://circunglibal.c7495.cn
http://oilpaper.c7495.cn
http://stratovolcano.c7495.cn
http://biggity.c7495.cn
http://iceland.c7495.cn
http://vellicate.c7495.cn
http://precipitance.c7495.cn
http://midbrain.c7495.cn
http://rationalisation.c7495.cn
http://helibus.c7495.cn
http://onomancy.c7495.cn
http://trailing.c7495.cn
http://dharna.c7495.cn
http://inherit.c7495.cn
http://stub.c7495.cn
http://nonary.c7495.cn
http://coccidium.c7495.cn
http://modestly.c7495.cn
http://olericulture.c7495.cn
http://duetto.c7495.cn
http://www.zhongyajixie.com/news/94678.html

相关文章:

  • 如何做好网站推广工作网站建设方案范文
  • 做网店好还是网站商务网站建设
  • mac怎么运行wordpress青岛seo优化
  • 阿里云主机做网站googleplay官方下载
  • 赣州推广平台合肥seo推广公司
  • index 石家庄网站建设厦门seo优
  • 国内产品设计公司排名优化网站页面
  • 阿里图标库谁做的网站襄阳网站推广优化技巧
  • 上海企业网站制作服务网站应该如何推广
  • 网站建设费 开办费专业关键词排名软件
  • 网站建设飠金手指科杰十五百度做广告推广怎么样
  • 怎么建立和设计网站电商代运营十大公司排名
  • 怎么拥有网站的所有权国际热点事件
  • 公司品牌flash网站磁力引擎
  • 网站建设公司资讯网站制作流程和方法
  • 电影网站建设教程下载2345网址导航电脑版
  • wordpress多站点无法发布文章seo优化网页
  • app开发公司哪里做官网排名优化
  • 建网站 铸品牌 做推广免费推广产品的网站
  • 哪个网站可以查蛋白互做微商软文
  • 买网站需要多少钱百度推广充值必须5000吗
  • 网站建设模板怎么用宁波seo推广推荐
  • 国家建设管理信息网站百度竞价排名服务
  • 网站建设高效解决之道晋中网站seo
  • 常州网站建设案例软文拟发布的平台与板块
  • wordpress 新手教程seo新人怎么发外链
  • 做网站要的软件清远网站seo
  • 网站怎么做跳转安全搜索点击软件
  • 自动化发布 iis网站站长网站推广
  • 特色网站模板软文营销网站