配置HBase单机版

  • 配置JAVA_HOME

编辑conf/hbase-env.sh,指定包含/bin/java的路径为JAVA_HOME

export JAVA_HOME=/usr
  • 编辑HBase主配置文件

conf/hbase-site.xml

<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>file:///home/ubuntu/hbase/hbase</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/home/ubuntu/hbase/zookeeper</value>
  </property>
  <property>
    <name>hbase.unsafe.stream.capability.enforce</name>
    <value>false</value>
    <description>
      Controls whether HBase will check for stream capabilities (hflush/hsync).

      Disable this if you intend to run on LocalFileSystem, denoted by a rootdir
      with the 'file://' scheme, but be mindful of the NOTE below.

      WARNING: Setting this to false blinds you to potential data loss and
      inconsistent system state in the event of process and/or node failures. If
      HBase is complaining of an inability to use hsync or hflush it's most
      likely not a false positive.
    </description>
  </property>
</configuration>
  • 启动HBase

执行bin/start-hbase.sh

搭梯子

系统

Ubuntu 16.04 64bit

安装
apt-get install python-pip
pip install --upgrade pip
pip install shadowsocks
使用

配置文件  /etc/shadowsocks.json

{
    "server":"0.0.0.0",
    "server_port":8388,
    "local_address": "127.0.0.1",
    "local_port":1080,
    "password":"mypassword",
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open": false
}

后台运行

ssserver -c /etc/shadowsocks.json -d start
ssserver -c /etc/shadowsocks.json -d stop

配置服务

/etc/init.d/shadowsocks

#!/bin/bash

start(){
    echo "Starting Shadowsocks..."
    /usr/local/bin/ssserver -c /etc/shadowsocks.json -d start
}

stop(){
    echo "Stoping Shadowsocks..."
    /usr/local/bin/ssserver -c /etc/shadowsocks.json -d stop
}
case $1 in
start):
start
;;
stop):
stop
;;
esac

exit 0

添加到service

update-rc.d shadowsocks defaults
service shadowsocks start
service shadowsocks stop

愉快的玩耍吧~~~

Ubuntu 14.04/14.04.1 Eclipse文字没有等宽显示怎么办

编辑字体配置文件

$sudo gedit /etc/fonts/conf.avail/69-language-selector-zh-cn.conf

在配置文件的monospace段添加 <string>Droid Sans Mono</string> 并放在第一个位置

例:

	<match target="pattern">
		<test qual="any" name="family">
			<string>monospace</string>
		</test>
        <test name="lang">
            <string>zh-cn</string>
        </test>
		<edit name="family" mode="prepend" binding="strong">
			<string>Droid Sans Mono</string>
			<string>WenQuanYi Zen Hei Mono</string>
			<string>HYSong</string>
			<string>AR PL UMing CN</string>
			<string>AR PL UMing HK</string>
			<string>AR PL New Sung</string>
			<string>AR PL UKai CN</string>
			<string>AR PL ZenKai Uni</string>
		</edit>
	</match>

ubuntu下如何运行QtCreator控制台程序

很多人发现在ubuntu下面运行qt的控制台程序的时候仅仅出来个终端窗口,但是执行内容显示不出来。进行下面的设定后就可以了!

菜单:工具->选项->环境->概要->终端

原来:x-terminal-emulator -e

修改为:xterm -e

如果想显示中文,修改/etc/X11/Xresources/x11-common,增加下面的内容:

xterm*faceName:Monospace:antialias=True:pixelsize=15
xterm*faceNameDoublesize:WenQuanYi Zen Hei:antialias=True:pixelsize=15