hadoop Zookeeper及hive安装,配置

hive安装步骤

1、前置需要安装Hadoop和MySQL

2、安装Zookeeper
hadoop Zookeeper及hive安装,配置_第1张图片
3、修改zoo.cfg 和配置环境变量
hadoop Zookeeper及hive安装,配置_第2张图片
hadoop Zookeeper及hive安装,配置_第3张图片
重启

source /ect/profile

hadoop Zookeeper及hive安装,配置_第4张图片

配置hive-site.xml
记得传连接数据库的jar包到hive110的lib目录下
启动hive之后不要退出窗口

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
        <property>
                <name>hive.metastore.warehouse.dir</name>
                <value>/usr/hive/warehouse</value>
        </property>
        <property>
                <name>hive.metastore.local</name>
                <value>flase</value>
        </property>
<!-- 如果是远程mysql数据库的话需要在这里写入远程的IP或hosts -->
        <property>
                <name>javax.jdo.option.ConnectionURL</name>
                <value>jdbc:mysql://192.168.56.120:3306/hive?createDatabaseIfNotExist=true</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>123456</value>
        </property>
        <--
        	beeline配置
			hive的hive-site.xml 配置文件
        -->
        <property>
                <name>hive.server2.authentication</name>
                <value>NONE</value>
        </property>

        <property>
                <name>hive.server2.thrift.client.user</name>
                <value>root</value>
        </property>
        <property>
                <name>hive.server2.thrift.client.password</name>
                <value>root</value>
        </property>
</configuration>

启动beeline,启动之后也不要关闭窗口

beeline -u jdbc:hive2://192.168.56.120:10000 -n root

你可能感兴趣的:(hive)