首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

用户必会的 20 个 Linux 基础命令

在黝黑的终端窗口中输入命令,这样的方式对某些人群来说可能好像过时了,但对许多专业计算机人员来说,这几乎是计算机完成能够执行的所有任务的最有效、最简便和最清晰的方式。如今,一些项目将开源命令引入了 macOS 和 Windows 等非开放平台,因此终端命令不仅仅是针对 Linux 和 BSD 用户,更是与每个人都息息相关。你可能会惊讶地发现,在一台普通的 POSIX 计算机上安装了数千个命令,当然,其中很多命令并不是真的有用,至少不是直接或经常性被使用。而其中的一部分命令虽然不是有效终端必须使用的命令,但相比其他命令而言使用频率较高,值得大家学习一下。

02

Hbase在HDFS上的各个目录作用

1、/hbase/.META. 就是存储1中介绍的 META 表的存储路径。 2、/hbase/.archive HBase 在做 Split或者 compact 操作完成之后,会将 HFile 移到.archive 目录中,然后将之前的 hfile 删除掉,该目录由 HMaster 上的一个定时任务定期去清理。 3、/hbase/.corrupt 存储HBase做损坏的日志文件,一般都是为空的。 4、/hbase/.hbck HBase 运维过程中偶尔会遇到元数据不一致的情况,这时候会用到提供的 hbck 工具去修复,修复过程中会使用该目录作为临时过度缓冲。 5、/hbase/WAL 大家都知道 HBase 是支持 WAL(Write Ahead Log) 的,HBase 会在第一次启动之初会给每一台 RegionServer 在.log 下创建一个目录,若客户端如果开启WAL 模式,会先将数据写入一份到.log 下,当 RegionServer crash 或者目录达到一定大小,会开启 replay 模式,类似 MySQL 的 binlog。 6、/hbase/oldlogs 当.logs 文件夹中的 HLog 没用之后会 move 到.oldlogs 中,HMaster 会定期去清理。 7、/hbase/.snapshot hbase若开启了 snapshot 功能之后,对某一个用户表建立一个 snapshot 之后,snapshot 都存储在该目录下,如对表test 做了一个 名为sp_test 的snapshot,就会在/hbase/.snapshot/目录下创建一个sp_test 文件夹,snapshot 之后的所有写入都是记录在这个 snapshot 之上。 8、/hbase/.tmp 当对表做创建或者删除操作的时候,会将表move 到该 tmp 目录下,然后再去做处理操作。 9、/hbase/hbase.id 它是一个文件,存储集群唯一的 cluster id 号,是一个 uuid。 10、/hbase/hbase.version 同样也是一个文件,存储集群的版本号,貌似是加密的,看不到,只能通过web-ui 才能正确显示出来。

02

liunx 安装zk

1、创建 /usr/local/services/zookeeper 文件夹:     mkdir -p /usr/local/services/zookeeper 2、进入到 /usr/local/services/zookeeper 目录中:     cd /usr/local/services/zookeeper 3、下载 zookeeper-3.4.9.tar.gz:     wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar.gz 4、解压缩 zookeeper-3.4.9.tar.gz:     tar -zxvf zookeeper-3.4.9.tar.gz 5、进入到 /usr/local/services/zookeeper/zookeeper-3.4.9/conf 目录中:     cd zookeeper-3.4.9/conf/ 6、复制 zoo_sample.cfg 文件的并命名为为 zoo.cfg:     cp zoo_sample.cfg zoo.cfg 7、用 vim 打开 zoo.cfg 文件并修改其内容为如下:     # The number of milliseconds of each tick     # zookeeper 定义的基准时间间隔,单位:毫秒     tickTime=2000     # The number of ticks that the initial      # synchronization phase can take     initLimit=10     # The number of ticks that can pass between      # sending a request and getting an acknowledgement     syncLimit=5     # the directory where the snapshot is stored.     # do not use /tmp for storage, /tmp here is just      # example sakes.     # dataDir=/tmp/zookeeper     # 数据文件夹     dataDir=/usr/local/services/zookeeper/zookeeper-3.4.9/data     # 日志文件夹     dataLogDir=/usr/local/services/zookeeper/zookeeper-3.4.9/logs     # the port at which the clients will connect     # 客户端访问 zookeeper 的端口号     clientPort=2181     # the maximum number of client connections.     # increase this if you need to handle more clients     #maxClientCnxns=60     #     # Be sure to read the maintenance section of the      # administrator guide before turning on autopurge.     #     # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance     #     # The number of snapshots to retain in dataDir     #autopurge.snapRetainCount=3     # Purge task interval in hours     # Set to "0" to disable auto purge feature     #autopurge.purgeInterval=1 8、保存并关闭 zoo.cfg 文件: 9、进入到 /usr/local/services/zookeeper/zookeeper-3.4.9/bin 目录中:     cd ../bin/ 10、用 vim 打开 /etc/ 目录下的配置文件 profile:     vim /etc/profile     并在其尾部追加如下内

02
领券