1.下载安装包
wget --no-check-certificate https://github.com/ideawu/ssdb/archive/master.zip
2.解压安装包
unzip master
解压过程中如果出现 bash: unzip: command not found
安装unzip命令
yum install -y unzip zip
3.cd ssdb-master/deps/jemalloc-4.1.0/进入到此目录
./autogen.sh && make 编译
4.cd ssdb-master 进入解压文件目录
make 编译
5.在ssdb-master目录执行
make
make install
ssdb安装完成
安装完成后会生成一个ssdb的文件夹
然后修改ssdb.conf文件
另外一台机器也相同,只是在slaveof中的id和host这里修改成另外一台机器的信息
可能出现的问题:
1.出现问题
Makefile:4: build_config.mk: No such file or directory make: *** No rule to make target `build_config.mk'. Stop
解决方法:
安装
yum install apt-get update yum install apt-get install autoconf
2.出现问题:
error: no acceptable C compiler found in $PATH
解决方法:
安装gcc
yum install gcc
3.出现问题:
make[1]: g++: Command not found make[1]: *** [db/builder.o] Error 127
解决方法:
yum -y update gcc yum -y install gcc+ gcc-c++
4.出现问题:
g++: /app/test/ssdb-master/deps/snappy-1.1.0/.libs/libsnappy.a: No such file or directory
原因:这是因为 snappy 没有编译成功, 这一般是因为你的系统时钟有问题. 可以这样解决
解决方法:
cd deps/snappy-1.1.0; ./configure make
安装Snappy成功后,返回到ssdb-master目录
5.出现问题:
运行autoreconf --force --install可能会报错
ERROR! autoconf required! install autoconf first Makefile:4: build_config.mk: No such file or directory make: *** No rule to make target `build_config.mk'. Stop.
原因:没有autoconf不能实现自动编译
解决方法:
sudo yum update sudo yum install gcc gcc-c++ libstdc++-devel
6.出现问题:
运行autoreconf --force --install可能会报错
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326. autoreconf: failed to run aclocal: No such file or directory
原因:开发版本常常是通过autogen.sh使用程序源代码生成的,构建过程包括验证程序功能和生成配置脚本。autogen.sh脚本依赖于autoreconf来调用autoconf,automake,aclocal和其它相关工具。
丢失的aclocal是automake包的一部分,因此,要修复该错误,请安装以下包。
解决方法:
yum install automake
7.出现问题:
运行autoreconf --force --install可能会报错
Makefile.am:4: Libtool library used but `LIBTOOL' is undefined Makefile.am:4: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL' Makefile.am:4: to `configure.ac' and run `aclocal' and `autoconf' again. Makefile.am:4: If `AC_PROG_LIBTOOL' is in `configure.ac', make sure Makefile.am:4: its definition is in aclocal's search path. autoreconf: automake failed with exit status: 1
解决方法:
sudo yum install libtool