1、首先进入home目录
[victor@hadoop102 opt]$ cd ~
[victor@hadoop102 ~]$ cd
[victor@hadoop102 ~]$ pwd
/home/victor
2、在用户home目录下创建.irbrc 文件
[victor@hadoop102 ~]$ touch .irbrc
3、编辑 .irbrc 文件
[victor@hadoop102 ~]$ vim .irbrc
require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-history"
Kernel.at_exit do
IRB.conf[:AT_EXIT].each do |i|
i.call
end
end
尖叫提示
编码问题很是个大问题,注意一下
4、进入hbase shell 终端
[victor@hadoop102 hbase]$ bin/hbase shell
hbase> scan 'student'
hbase > put 'student','1001','info:name','Thomas'
hbase > put 'student','1001','info:sex','male'
hbase > quit
5、在home用户目录下,查看.irb-history文件
[victor@hadoop102 ~]$ vim .irb-history
scan 'student'
put 'student','1001','info:name','Thomas'
put 'student','1001','info:sex','male'
quit