1. 将hive 的metastore用mysql连接储存
2 在/etc/init.d/文件夹中编辑文件hive-thrift
#!/bin/bash
# init script forHive Thrift Interface.
#
# chkconfig: 2345 90 10
# description: Hive Thrift Interface
# Source functionlibrary.
. /etc/rc.d/init.d/functions
# Paths toconfiguration, binaries, etc
HIVE_BIN=/usr/bin/hive
HIVE_ARGS="--service hiveserver"
HIVE_LOG=/var/log/hive-thrift.log
HIVE_USER="hadoop"
ANT_LIB=/usr/share/java
if [ ! -f $HIVE_BIN ]; then
echo "File not found: $HIVE_BIN"
exit 1
fi
# pid file for/sbin/runuser
pidfile=${PIDFILE-/var/run/hive-thrift.pid}
# pid file forthe java child process.
pidfile_java=${PIDFILE_JAVA-/var/run/hive-thrift-java.pid}
RETVAL=0
start() {
# checkt