[huiyunltd@hadoop-senior ~]$ tar xf /opt/softwares/apache-hive-0.13.1-bin.tar.gz -C /opt/app/ [huiyunltd@hadoop-senior ~]$ /opt/app/hadoop-2.5.0/sbin/start-dfs.sh hadoop-senior.huiyunltd.com:50070 [huiyunltd@hadoop-senior02 ~]$ /opt/app/hadoop-2.5.0/sbin/start-yarn.sh http://hadoop-senior02.huiyunltd.com:8088 [huiyunltd@hadoop-senior03 ~]$ /opt/app/hadoop-2.5.0/bin/hdfs dfs -mkdir /tmp [huiyunltd@hadoop-senior03 ~]$ /opt/app/hadoop-2.5.0/bin/hdfs dfs -chmod g+x /tmp [huiyunltd@hadoop-senior03 ~]$ /opt/app/hadoop-2.5.0/bin/hdfs dfs -mkdir -p /user/hive/warehouse [huiyunltd@hadoop-senior03 ~]$ /opt/app/hadoop-2.5.0/bin/hdfs dfs -chmod g+x /user/hive/warehouse [huiyunltd@hadoop-senior ~]$ /opt/app/hadoop-2.5.0/sbin/mr-jobhistory-daemon.sh start historyserver /opt/app/apache-hive-0.13.1-bin/conf/hive-env.sh HADOOP_HOME=/opt/app/hadoop-2.5.0 export HIVE_CONF_DIR=/opt/app/apache-hive-0.13.1-bin/conf [huiyunltd@hadoop-senior ~]$ /opt/app/apache-hive-0.13.1-bin/bin/hive hive> show databases; hive> use default; hive> create table kms_log(ip string,user string,requesturl string); hive> show tables; hive> desc kms_log; hive> select count(*) from kms_log; hive> create table student(id int,name string) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; [huiyunltd@hadoop-senior ~]$ touch /opt/datas/student.txt student.txt --------------- 1001 jack 1002 mary 1003 thomas 1004 tom hive> load data local inpath '/opt/datas/student.txt' into table student; hive> select * from student; hive> select * from student; hive> select id from student; [huiyunltd@hadoop-senior ~]$ unzip -o -d /opt/softwares/ /opt/softwares/mysql-libs.zip [huiyunltd@hadoop-senior ~]$ rpm -qa|grep mysql [huiyunltd@hadoop-senior ~]$ sudo rpm -e --nodeps mysql-libs-5.1.66-2.el6_3.x86_64 [huiyunltd@hadoop-senior ~]$ rpm -qa|grep mysql [huiyunltd@hadoop-senior ~]$ sudo rpm -ivh /opt/softwares/mysql-libs/MySQL-server-5.6.24-1.el6.x86_64.rpm [huiyunltd@hadoop-senior ~]$ sudo rpm -ivh /opt/softwares/mysql-libs/MySQL-client-5.6.24-1.el6.x86_64.rpm [huiyunltd@hadoop-senior ~]$ sudo cat /root/.mysql_secret [huiyunltd@hadoop-senior ~]$ service mysql status [huiyunltd@hadoop-senior ~]$ rpm -qa|grep MySQL [huiyunltd@hadoop-senior ~]$ sudo service mysql start mysql> SET PASSWORD=PASSWORD('123456') mysql> select User,Host,Password from user; mysql> update user set Host='%' where User='root' and Host='localhost'; mysql> delete from user where User='root' and Host='hadoop-senior.huiyunltd.com'; mysql> delete from user where User='root' and Host='127.0.0.1'; mysql> delete from user where User='root' and Host='::1'; [huiyunltd@hadoop-senior ~]$ sudo service mysql restart [huiyunltd@hadoop-senior ~]$ cp /opt/app/apache-hive-0.13.1-bin/conf/hive-default.xml.template /opt/app/apache-hive-0.13.1-bin/conf/hive-site.xml [huiyunltd@hadoop-senior ~]$ tar xf /opt/softwares/mysql-libs/mysql-connector-java-5.1.27.tar.gz -C /opt/softwares/mysql-libs/ [huiyunltd@hadoop-senior ~]$ cp /opt/softwares/mysql-libs/mysql-connector-java-5.1.27/mysql-connector-java-5.1.27-bin.jar /opt/app/apache-hive-0.13.1-bin/lib/成都創(chuàng)新互聯(lián)是一家網(wǎng)站設計公司,集創(chuàng)意、互聯(lián)網(wǎng)應用、軟件技術為一體的創(chuàng)意網(wǎng)站建設服務商,主營產(chǎn)品:成都響應式網(wǎng)站建設、品牌網(wǎng)站設計、成都營銷網(wǎng)站建設。我們專注企業(yè)品牌在網(wǎng)站中的整體樹立,網(wǎng)絡互動的體驗,以及在手機等移動端的優(yōu)質呈現(xiàn)。網(wǎng)站制作、網(wǎng)站設計、移動互聯(lián)產(chǎn)品、網(wǎng)絡運營、VI設計、云產(chǎn)品.運維為核心業(yè)務。為用戶提供一站式解決方案,我們深知市場的競爭激烈,認真對待每位客戶,為客戶提供賞析悅目的作品,網(wǎng)站的價值服務。
--------------hive-site.xml-------------------
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://hadoop-senior.huiyunltd.com:3306/metastore?createDatabaseIfNotExist=true</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>root</value> <description>username to use against metastore database</description> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <value>123456</value> <description>password to use against metastore database</description> </property> </configuration>
另外有需要云服務器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。
文章標題:hive本地安裝-創(chuàng)新互聯(lián)
當前地址:http://aaarwkj.com/article20/gdpco.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供App設計、網(wǎng)站內鏈、標簽優(yōu)化、做網(wǎng)站、ChatGPT、網(wǎng)站建設
聲明:本網(wǎng)站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)