Riak安装

  • 新包
apt-get install build-essential libncurses-dev libssh-dev unixodbc-dev libwxgtk2.8-dev libglu-dev fop xsltproc default-jdk
  • 安装环境
wget http://www.erlang.org/download/otp_src_R13B04.tar.gz
tar xzvf otp_src_R13B04.tar.gz 
cd otp_src_R13B04/
export LANG=C
./configure 
make
sudo make install
cd ../
  • 安装riak包
wget http://downloads.basho.com/riak/riak-0.14/riak_0.14.2-1_amd64.deb
sudo dpkg -i riak_0.14.2-1_amd64.deb
  • 环境检查:
系统ulimit 设置
cat <<EOF>>/etc/security/limits.conf 
* soft nofile 51200 
* hard nofile 51200
EOF
echo "session required        pam_limits.so" >> /etc/pam.d/common-session
echo "ulimit -SHn 51200" >> /etc/profile
ulimit -SHn 51200
ulimit -n
cat <<EOF>>/etc/sysctl.conf 
# set 115
fs.file-max =65535
kernel.panic=10
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_syncookies=1
EOF
设置生效 sysctl -p

  • 修改配置文件:
vi /etc/riak/app.config
将{ring_state_dir, "/var/lib/riak/ring"}             改为            {ring_state_dir, "/data/riak/ring"}
将 {http, [ {"127.0.0.1", 8098 } ]}                  改为            {http, [ {"10.201.100.24", 8098 } ]}(本机地址)
将{mapred_queue_dir, "/var/lib/riak/mr_queue" }      改为            {mapred_queue_dir, "/data/riak/mr_queue" }
将{data_root, "/var/lib/riak/bitcask"}               改为            {data_root, "/data/riak/bitcask"}
vi vm.args
将 -name [email protected]                             改为             -name [email protected](本机地址)
将 -env ERL_MAX_PORTS 4096                          改为             -env ERL_MAX_PORTS 51200
  • 新建目录
mkdir -p /data/riak/bitcask
mkdir -p /data/riak/mr_queue
mkdir -p /data/riak/ring
赋予ria权限 chown -R riak:riak /data/riak/
  • 添加riak:riak-admin join [email protected]
  • 启动riak: riak start
  • 查看状态: riak-admin status

你可能感兴趣的:(安装,职场,RIAK,休闲)