使用Binary Package安装
wget -O aerospike.tgz 'http://aerospike.com/download/server/latest/artifact/tgz'
tar -xvf aerospike.tgz
cd aerospike-server
./bin/aerospike init
sudo ./bin/aerospike start && \
sudo tail -f ./var/log/aerospike/aerospike.log | grep cake
# wait for it. "service ready: soon there will be cake!"
Overview
本教程安装的aerospike使用Linux的glibc 2.11或以上版本。glibc 2.11发布2009年1月,和大多数的Linux发行版——Debian 6 +,Centos 6 + 12 + OpenSUSE,Ubuntu 10.04 +支持这个版本
这个包包含一个aerospike二进制安装包可以运行在一个没有安装其他软件的用户目录,并且不需要root权限
Download Aerospike
如果您已经下载到服务器,您可以跳过此步骤。
- 下载aerospike Community Edition
wget -O aerospike.tgz 'http://aerospike.com/download/server/latest/artifact/tgz'
有关发布的详细访问该下载页。
Install Aerospike
如果已经在服务器安装过,可以跳过此步骤,启动aerospike
解压安装包
tar -xvf aerospike.tgz && cd aerospike-server
Initialize Aerospike Server
接下来,我们将需要在主机上初始化一个目录作为 aerospike instance:
./bin/aerospike init --help # to see the initialization options
./bin/aerospike init
当一个目录被初始化后,你将会得到以下:
./bin/aerospike - The management script to manage this instance.
./bin/asd - The aerospike server daemon.
./etc/aerospike.conf - The configuration file used by this instance.
./share/ - Contains read-only files, used by this instance.
./var/ - Contains runtime files generated by asd, including logs and data files.
4.Install Aerospike Tools
安装这个工具需要.超级用户权限(sudo)。
要安装工具包,下载下列包之一:
# Red Hat Variants:
wget -O aerospike-tools.tgz 'http://aerospike.com/download/server/latest/artifact/el6'
# Debian 6:
wget -O aerospike-tools.tgz 'http://aerospike.com/download/server/latest/artifact/debian6'
# Debian 7:
wget -O aerospike-tools.tgz 'http://aerospike.com/download/server/latest/artifact/debian7'
# Ubuntu 12.04 LTS or newer:
wget -O aerospike-tools.tgz 'http://aerospike.com/download/server/latest/artifact/ubuntu12'
解压。tgz文件,然后安装工具软件包:
tar -xvf aerospike-tools.tgz && cd aerospike-server-community-
# Red Hat Variants:
rpm -Uvh aerospike-tools-.el6.x86_64.rpm
# Debian 6:
dpkg -i aerospike-tools-.debian6.x86_64.deb
# Debian 7:
dpkg -i aerospike-tools-.debian7.x86_64.deb
# Ubuntu 12.04 LTS or newer:
dpkg -i aerospike-tools-*.ubuntu12.04.x86_64.deb
此安装将增加有用的工具在 /opt/aerospike/bin 和 连接[link] them from /usr/bin.
Run Aerospike
Aerospike includes an init script for running the server, located in ./bin/aerospike. This script will manage the Aerospike Server Daemon (asd) located in ./bin.
The aerospike instance will store log files in ./var/log and system data in ./share. If you change the user for the Aerospike process, then you will need to ensure the user has permissions for ./var/log and ./share.
- Start Aerospike
sudo service aerospike start
6.检查运行状态 Verify Aerospike is Running
sudo service aerospike status
你也可以查看服务器日志 位置在/var/log/aerospike/aerospike.log,你可以看到
Jun 22 2014 03:35:33 GMT: INFO (as): (as.c::376) service ready: soon there will be cake!
在安装期间如果有错误,请参考故障排除指南。
- 接下来 Next Steps
验证服务器是否正确安装:
然后,选择一个客户,开始开发!