您的位置:首页 > 运维架构

安装配置hadoop组件hive问题集锦

2016-08-27 11:51 519 查看
用了1天时间,才完成hive的安装配置,
一:首先安装mysql
下载mysql for ubuntu版本,是deb版本
sudo apt-get libaio
sudo apt-get libmecab2

之后使用dpkg -i mysql一系列的deb文件
libmysql*
mysql-community*
mysql-client*
mysql-server*

查看whereis mysql,看到安装到了不同的路径
可执行文件/etc/bin,配置文件/etc/mysql/conf,等到

二、启动mysql
sudo service mysql status
sudo service mysql start
mysql -uroot -proot ;连接登录
修改密码
sudo mysqld-safe --skip-grant-tables &
use mysql;
update user set authentication_string=password('password') where user='root';这是个狠大的改变,因为5.7版本没有password子弹了

flush privileges;

grant all privileges on mysql.* to hive@localhost;
grant all on hive.* to hive@'%' identified by 'hive';

三、下载hive2.1
tar -xvf apache-hive*****.tar.gz
mv 改变路径
chown 修改所有者
chmod 755
修改/conf/hive-env.sh
/conf/hive_site.xml
<property>

<name>hive.metastore.uris</name>

<value>thrift://xxxxxxxx</value>

<description>Thrift uri for the remote metastore. Used by metastore client to connect to remote metastore.</description>

</property>

我不知道这个配置是干什么用的。果断清空value的值。再次运行show databases命令。成功!!!!5)再次提醒读者朋友们:当你们的错误信息与上述错误相似时,请认真检查 hive.metastore.uris 的value 配置是否正确。建义新手不要配置。

<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://10.1.195.50:3306/hivedb?createDatabaseIfNotExist=true&useUnicode=true&ssl=false</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>umobile</value>
<description>username to use against metastore database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>umobile</value>
<description>password to use against metastore database</description>
</property>

注意上面的联机字符串,&是用来解决ssl警告错误的

遇到Hive metastore database is not initialized. Please use schematool错误

先用命令schematool -dbType mysql -initSchema

然后启动hive即可
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  hadoop hive