AS(aeroSpike)集群部署安装和常用命令

1.linux安装Aerospike

首先要准备好安装包,安装包的下载地址
https://www.aerospike.com/download/server/4.3.0.10-el7

1.1在Linux选择安装路径
  /home/admin/aerospike
1.2安装操作
tar -xf  aerospike-server-community-4.3.0.10-el7.tar
cd /home/admin/softwares/aerospike-server-community-4.3.0.10-el7
1.3 执行安装
./asinstall
1.4 修改配置
安装完毕之后存在/etc/aerospike/aerospike.conf文件,该文件是Aerospike的配置文件。详细配置解释如下(此处需要根据实际需求配置):
# Aerospike database configuration file for use with systemd.
service {
paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
proto-fd-max 15000
}
logging {
file /home/admin/aerospike-server-community-4.3.0.10-el7/logs/aerospike.log {                //日志文件路径(目录需要提前创建)
context any info
}
}
network {
service {
address any
port 3000
}
heartbeat {
mode mesh
address 10.10.10.1                                              //本机IP
port 3002                                                                //端口号
mesh-seed-address-port 10.10.10.1 3002         //集群模式下其他节点信息
mesh-seed-address-port 10.10.10.2 3002
mesh-seed-address-port 10.10.10.3 3002
interval 150
timeout 10
}
fabric {
port 3001
}
info {
port 3003
}
}
namespace ns1 {                                                  //namespace配置(一个namespace相当于一个数据库),HDD及索引储存方案
replication-factor 2
memory-size 16G                                                 
default-ttl 0
storage-engine device {
file /home/admin/aerospike-server-community-4.3.0.10-el7/data/ns1.dat                      //数据持久化存储地址(目录需要提前创建)
filesize 16G
data-in-memory true
}
}
1.5 启动服务

service aerospike start  启动
service aerospike restart 重启
service aerospike stop 停止
service aerospike status 查看状态

2. AS常用命令

Asadm 进入aerospike
aql 进入aerospike 只能执行sql
显示所有命名空间:show namespaces
显示所有的表:show sets
显示所有的字段:show bins
查询信息:select * from 命名空间.表名 where PK=‘主键名’
查看配置了哪些namespaces:show namespaces;

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值