首页 文章 精选 留言 我的

精选列表

搜索[最权威安装],共10000篇文章
优秀的个人博客,低调大师

vue-jstree安装使用备忘

vue-jstree在这里https://github.com/zdy1988/vue-jstree 我是vue-cli建的项目 npm install vue-jstree --save 组件里这样写 import VJstree from 'vue-jstree'; import axios from "axios"; export default { name: 'Mytree', components: { VJstree }, data() { return { data: [] } }, created() { axios.get('http://192.168.x.x/a2hs/treedata.php') .then(response => { this.data=response.data; }) .catch(e => { console.log(e) }); }, 动态返回的JSON数据格式如下 [{"id":1,"pid":0,"text":"node1","opened":0,"children":[{"id":43,"pid":1,"text":"node2","opened":0}...]}...] 如果有跨域问题,treedata.php输出前加 header('Access-Control-Allow-Origin: *');

优秀的个人博客,低调大师

CentOS7.x 安装Hive

1. 准备 1.1 apache-hive-2.1.0-bin.tar.gz包 1.2 mysql中创建新的数据库hive 2. 解压 3. 修改环境变量 vim /etc/profile export HIVE_HOME=xxxx export PATH=$PATH:$HIVE_HOME/bin 然后刷新配置source /etc/profile 4. 修改配置文件 首先需要下载并把mysql-connector-java-5.1.17.jar拷贝到hive/lib目录下,作为驱动要用到。 配置文件都在hive/conf目录下 4.1 hive-site.xml 更名:mv hive-default.xml.template hive-site.xml 然后搜索关键字,把下面这部分做修改 <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://192.168.27.166: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>hive</value> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <value>hive</value> </property> <property> <name>hive.metastore.warehouse.dir</name> <value>/user/hive/warehouse</value> </property> 然后把全文中的${system:java.io.tmpdir} 替换成/home/fantj/hive/fantj ${system:user.name}替换成 root 最后,创建该目录 mkdir -p /home/fantj/hive/fantj/root 4.2 hive-env.sh 更名:mv hive-env.sh.template hive-env.sh 添加环境参数: export JAVA_HOME=/soft/jdk export HIVE_HOME=/soft/hive export HADOOP_HOME=/soft/hadoop 5. 创建数据库表到mysql里面 schematool -initSchema -dbType mysql [root@s166 conf]# schematool -initSchema -dbType mysql which: no hbase in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/fantj/jdk/bin:/home/fantj/hadoop/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/fantj/jdk/bin:/home/fantj/hadoop/sbin:/root/bin:/home/fantj/jdk/bin:/home/fantj/hadoop/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/fantj/jdk/bin:/home/fantj/hadoop/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/fantj/jdk/bin:/home/fantj/hadoop/sbin:/root/bin:/home/fantj/jdk/bin:/home/fantj/hadoop/sbin:/home/fantj/hive/bin) SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/home/fantj/download/apache-hive-2.1.0-bin/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/home/fantj/download/hadoop-2.7.0/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory] Metastore connection URL: jdbc:mysql://192.168.27.166:3306/hive?createDatabaseIfNotExist=true Metastore Connection Driver : com.mysql.jdbc.Driver Metastore connection User: hive Starting metastore schema initialization to 2.1.0 Initialization script hive-schema-2.1.0.mysql.sql Initialization script completed schemaTool completed 运行成功后查看hive数据库: 6. 测试hive环境 注意:注意hadoop要启动 6.1 输入hive命令 [root@s166 bin]# hive which: no hbase in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/fantj/jdk/bin:/home/fantj/hadoop/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/fantj/jdk/bin:/home/fantj/hadoop/sbin:/root/bin:/home/fantj/jdk/bin:/home/fantj/hadoop/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/fantj/jdk/bin:/home/fantj/hadoop/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/fantj/jdk/bin:/home/fantj/hadoop/sbin:/root/bin:/home/fantj/jdk/bin:/home/fantj/hadoop/sbin:/home/fantj/hive/bin) SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/home/fantj/download/apache-hive-2.1.0-bin/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/home/fantj/download/hadoop-2.7.0/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory] Logging initialized using configuration in jar:file:/home/fantj/download/apache-hive-2.1.0-bin/lib/hive-common-2.1.0.jar!/hive-log4j2.properties Async: true Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases. hive> 6.2 sql语言测试 hive> show databases; OK default mydb2 Time taken: 1.55 seconds, Fetched: 2 row(s) hive> create database fantj; OK Time taken: 0.801 seconds hive> use fantj; OK Time taken: 0.035 seconds hive> create table test(id int,name string,age int); OK Time taken: 0.833 seconds hive> insert into test values(1,'fantj',18); WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases. Query ID = root_20180727115808_c39d95f3-9bbd-4a60-b627-d5f0016ff6c3 Total jobs = 3 Launching Job 1 out of 3 Number of reduce tasks is set to 0 since there's no reduce operator Job running in-process (local Hadoop) 07-27 11:58:19,477 Stage-1 map = 0%, reduce = 0% 07-27 11:58:20,487 Stage-1 map = 100%, reduce = 0% Ended Job = job_local1311590634_0001 Stage-4 is selected by condition resolver. Stage-3 is filtered out by condition resolver. Stage-5 is filtered out by condition resolver. Moving data to directory hdfs://s166/user/hive/warehouse/fantj.db/test/.hive-staging_hive_07-27_11-58-08_359_7490410987943534015-1/-ext-10000 Loading data to table fantj.test [Warning] could not update stats. MapReduce Jobs Launched: Stage-Stage-1: HDFS Read: 11 HDFS Write: 88 SUCCESS Total MapReduce CPU Time Spent: 0 msec OK Time taken: 39.138 seconds hive> select * from test; OK 1 fantj 18 Time taken: 3.26 seconds, Fetched: 1 row(s)

优秀的个人博客,低调大师

CentOS7.x 安装Sqoop

sqoop是apache旗下一款“Hadoop和关系数据库服务器之间传送数据”的工具。 1. 下载并解压 2. 修改配置文件 2.1 进入/sqoop/conf目录 mv sqoop-env-template.sh sqoop-env.sh export HADOOP_COMMON_HOME=/home/fantj/hadoop/ export HADOOP_MAPRED_HOME=/home/fantj/hadoop/ export HIVE_HOME=/home/fantj/hive 2.2 配置/etc/profile export SQOOP_HOME=/xxx/sqoop export PATH=$PATH:$SQOOP_HOME/bin 3. 加入mysql的jdbc驱动包 /hive/lib/mysql-connector-java-5.1.28.jar 4. 验证环境 sqoop-version [root@s166 ~]# sqoop-version Sqoop 1.4.2 git commit id Compiled by ag on Tue Aug 14 18:38:15 IST 2012

资源下载

更多资源
腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册