I have tried use the example on https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2 but gets the following errors:
/usr/lib/python2.7/dis
You are missing some dependencies, make sure you install cyrus-sasl-devel and cyrus-sasl-gssapi:
On an RHEL-based distro:
sudo yum install cyrus-sasl-devel cyrus-sasl-gssapi cyrus-sasl-md5 cyrus-sasl-plain
... or on a Debian-based distro:
sudo apt-get install sasl2-bin libsasl2-2 libsasl2-dev libsasl2-modules
Per @KenKennedy, also add the libsasl2-modules-gssapi-mit package if using GSSAPI for authentication.