wget http://download.savannah.gnu.org/releases/libunwind/libunwind-0.99-alpha.tar.gz
tar zxvf libunwind-0.99-alpha.tar.gz
cd libunwind-0.99-alpha/
CFLAGS=-fPIC ./configure
make CFLAGS=-fPIC
make CFLAGS=-fPIC install
Step 2、安装google-perftools:
1
2
3
4
5
6
7
8
wget http://google-perftools.googlecode.com/files/google-perftools-1.8.1.tar.gz
tar zxvf google-perftools-1.8.1.tar.gz
cd google-perftools-1.8.1/
./configure --disable-cpu-profiler --disable-heap-profiler --disable-heap-checker --disable-debugalloc --enable-minimal
make && make install
sudo echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf #如果没有这个文件,自己建一个
sudo /sbin/ldconfig
Step 3. 安装Redis
1
2
3
4
5
$ curl -O http://redis.googlecode.com/files/redis-2.2.12.tar.gz
$ tar xzvf redis-2.2.12.tar.gz
$ cd redis-2.2.12
$ make USE_TCMALLOC=yes
$ sudo make install
# 修改配置文件:
vim redis.conf
# 找到 daemonize,将后面的no改为yes,让其可以以服务方式运行
# 然后启动 redis:
$ ./redis-server ./redis.conf
#连接数据库进行测试
$ src/redis-cli
redis> set foo bar
OK
redis> get foo
"bar"