linux+rel+安装教程,pika安装教程

快速试用

如果想快速试用pika,目前提供了Centos5,Centos6和Debian(Ubuntu16) binary版本,可以在release页面看到,具体文件是pikaX.Y.Z_xxx_bin.tar.gz。1. unzip file

$ tar zxf pikaX.Y.Z_xxx_bin.tar.gz

2. change working directory to output

note: we should in this directory, caz the RPATH is ./lib;

$ cd output

3. run pika:

$ ./bin/pika -c conf/pika.conf

编译安装

CentOS (Fedora, Redhat)

1.安装必要的lib$ sudo yum install snappy-devel protobuf-compiler protobuf-devel bzip2-devel zlib-devel bzip2

2.安装gcc$ sudo yum install gcc-c++

3.如果机器gcc版本低于4.8,需要切换到gcc4.8或者以上,下面指令可临时切换到gcc4.8$ sudo wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo

$ sudo yum install --nogpgcheck devtoolset-2

$ scl enable devtoolset-2 bash

4.获取项目源代码$ git clone --recursive https://github.com/Qihoo360/pika

$ cd pika

4.1 更新子模块(如果是从已有旧的代码库升级到2.2+的版本)pika目前submodule依赖glog,pink,slash,nemo(nemo -> nemo-rocksdb -> rocksdb);$ git submodule update --recursive --init某些版本的git在有init的时候,如果已经init的子库,不会update, 需要再执行git submodule update --recursive

5.编译$ make __REL=1note: 若编译过程中,提示有依赖的库没有安装,则有提示安装后再重新编译

Debian (Ubuntu)

1.安装必要的lib$ sudo apt-get install libzip-dev libsnappy-dev libprotobuf-dev protobuf-compiler bzip2

2.安装gcc4.8或者以上$ sudo apt-get install gcc-4.8

$ sudo apt-get install g++-4.8

3.如果机器gcc版本低于gcc4.8,需要切换到gcc4.8或者以上,下面为切换到4.8的方法$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50

$ sudo update-alternatives --config gcc

There are 2 choices for the alternative gcc (providing /usr/bin/gcc).

Selection Path Priority Status

------------------------------------------------------------

* 0 /usr/bin/gcc-4.6 100 auto mode

1 /usr/bin/gcc-4.8 50 manual mode

Press enter to keep the current choice[*], or type selection number: 1

update-alternatives: using /usr/bin/g++-4.6 to provide /usr/bin/g++ (g++) in manual mode.

4.获取项目源代码$ git clone --recursive https://github.com/Qihoo360/pika

$ cd pika

4.1 更新子模块(如果是从已有旧的代码库升级到2.2+的版本)pika目前submodule依赖glog,pink,slash,nemo(nemo -> nemo-rocksdb -> rocksdb);$ git submodule update --recursive --init某些版本的git在有init的时候,如果已经init的子库,不会update, 需要再执行git submodule update --recursive

5.编译$ make __REL=1note: 若编译过程中,提示有依赖的库没有安装,则有提示安装后再重新编译

使用$ ./output/bin/pika -c ./conf/pika.conf

若启动失败,把./output/lib/的内容拷贝到Makefile定义的rpath目录下,然后重新启动$ cp output/lib/* RPATHnote: RPATH已在Makefile定义,表示的是程序运行的库预先加载路径

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值