需求 :进行商品搜索的时候,要从索引中进行搜索,由于后台要更新商品和插入商品,当时考虑到了怎么来插入新的索引和更新索引的问题,通过讨论,大家决定用Httpsqs这个消息中间来通知插入新索引和删除索引最后合并索引,来做到商品信息的实时更新。

下面我来讲一下Httpsqs的安装过程 ,以及在安装过程遇到的问题。

准备工作:

你需要准备一个虚拟机这里我们采用VMware7.1,

Linux采用CentOS5.4 可以到http://vault.centos.org/5.4/isos/i386/CentOS-5.4-i386-bin-DVD.torrent这个网址进行下载。

安装 httpsqs

在安装httpsqs之前要安装

libevent-2.0.12-stable.tar.gz和okyocabinet-1.4.47.tar.gz  

ulimit -SHn 65535

1、安装libevent-2.0.12-stable.tar.gz

wget http://httpsqs.googlecode.com/files/libevent-2.0.12-stable.tar.gz##下载
tar zxvf libevent-2.0.12-stable.tar.gz##解压
cd libevent-2.0.12-stable/
./configure --prefix=/usr/local/libevent-2.0.12-stable/
make
make install
cd ../

安装tokyocabinet-1.4.47.tar.gz

wget http://httpsqs.googlecode.com/files/tokyocabinet-1.4.47.tar.gz
tar zxvf tokyocabinet-1.4.47.tar.gz
cd tokyocabinet-1.4.47/
./configure --prefix=/usr/local/tokyocabinet-1.4.47/
#注:在32位Linux操作系统上编译Tokyo cabinet,请使用./configure --enable-off64代替./configure,可以使数据库文件突破2GB的限制。
#./configure --enable-off64 --prefix=/usr/local/tokyocabinet-1.4.47/
make
make install
cd ../

当执行第二步骤的会出错,是由于缺少bzip2-1.0.6.tar.gz

下面进行安装

http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz安装开始;
wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
tar -xvzf bzip2-1.0.6.tar.gz
cd bzip2-1.0.6.
make
make install

在重复安装tokyocabinet-1.4.47.tar.gz还是失败,由于缺少zlib-1.2.5.tar.gz

下面进行安装

http://www.winimage.com/zLibDll/zlib-1.2.5.tar.gz安装开始;
wget http://www.winimage.com/zLibDll/zlib-1.2.5.tar.gz
tar -xvzf zlib-1.2.5.tar.gz
cd zlib-1.2.5.
./configure
make
sudo make instal

继续第2步骤 OK

3、安装httpsqs-1.7.tar.gz

wget http://httpsqs.googlecode.com/files/httpsqs-1.7.tar.gz
tar zxvf httpsqs-1.7.tar.gz
cd httpsqs-1.7/
make
make install
cd ../

如果安装成功 执行httpsqs –h 会出现

--------------------------------------------------------------------------------------------------
HTTP Simple Queue Service - httpsqs v1.7 (April 14, 2011) Author: Zhang Yan (http://blog.s135.com), E-mail: net@s135.com
This is free software, and you are welcome to modify and redistribute it under the New BSD License -l <ip_addr> interface to listen on, default is 0.0.0.0
-p <num> TCP port number to listen on (default: 1218)
-x <path> database directory (example: /opt/httpsqs/data)
-t <second> keep-alive timeout for an http request (default: 60)
-s <second> the interval to sync updated contents to the disk (default: 5)
-c <num> the maximum number of non-leaf nodes to be cached (default: 1024)
-m <size> database memory cache size in MB (default: 100)
-i <file> save PID in <file> (default: /tmp/httpsqs.pid)
-a <auth> the auth password to access httpsqs (example: mypass123)
-d run as a daemon
-h print this help and exit Use command "killall httpsqs", "pkill httpsqs" and "kill `cat /tmp/httpsqs.pid`" to stop httpsqs.
Please note that don't use the command "pkill -9 httpsqs" and "kill -9 PID of httpsqs"! Please visit "http://code.google.com/p/httpsqs" for more help information.

但是没有 出现的是:

error while loading shared libraries: /usr/local/tokyocabinet-1.4.47/lib/libtokyocabinet.so.9: cannot restore segment prot after reloc: Permission denied

在google一下,说是没有建立它的软连接:

ln -s /usr/local/tokyocabinet-1.4.47/lib/libtokyocabinet.so.9 /usr/lib/libtokyocabinet.so.9

可是做了,还是报错 继续google,解决办法为:

vi /etc/sysconfig/selinux file
修改SELINUX=disabled

然后重启

再来一次

httpsqs -h
--------------------------------------------------------------------------------------------------
HTTP Simple Queue Service - httpsqs v1.7 (April 14, 2011) Author: Zhang Yan (http://blog.s135.com), E-mail: net@s135.com
This is free software, and you are welcome to modify and redistribute it under the New BSD License -l <ip_addr> interface to listen on, default is 0.0.0.0
-p <num> TCP port number to listen on (default: 1218)
-x <path> database directory (example: /opt/httpsqs/data)
-t <second> keep-alive timeout for an http request (default: 60)
-s <second> the interval to sync updated contents to the disk (default: 5)
-c <num> the maximum number of non-leaf nodes to be cached (default: 1024)
-m <size> database memory cache size in MB (default: 100)
-i <file> save PID in <file> (default: /tmp/httpsqs.pid)
-a <auth> the auth password to access httpsqs (example: mypass123)
-d run as a daemon
-h print this help and exit Use command "killall httpsqs", "pkill httpsqs" and "kill `cat /tmp/httpsqs.pid`" to stop httpsqs.
Please note that don't use the command "pkill -9 httpsqs" and "kill -9 PID of httpsqs"! Please visit "http://code.google.com/p/httpsqs" for more help information.

安装成功!!linux

——————————————————————————————————————————————————————————

http://blog.s135.com/httpsqs/

http://www.linuxidc.com/Linux/2011-08/39902.htm

Httpsqs的安装以及安装过程错误的解决方法 转的更多相关文章

  1. 在安装mysql出现的错误以及解决方法

    因为手贱更新了一下驱动,结果导致无线网卡出了问题.然而就算是从官网上下载了驱动各种折腾也没有弄好,心里特别堵.无奈只有重装系统这一条路了.这里表示特别难过,因为电脑上东西实在太多了,而且各种环境变量. ...

  2. tensorflow安装使用过程错误及解决方法

    tensorflow2.x 使用过程中常见错误(持续更新) 安装配置,使用tensorflow训练模型,转换为tflite模型,并部署与移动端过程中,虽然不难,但是也常出现一些莫名其妙的问题,下面简单 ...

  3. 树莓派安装 MySQL 时出现错误的解决方法

    今天被要求解决一个树莓派无法正常安装 MySQL 的问题.以下是解决过程记录. 我在 Mac 上利用 SSH 连接到树莓派,执行 sudo apt-get install mysql-server m ...

  4. ubuntu16.04下安装openssh-server报依赖错误的解决方法

    问题:系统重装后,安装和配置SSH,防火墙配置 #安装install openssh-server sudo apt install openssh-server -y 遇到问题: sudo apt ...

  5. Windows 上安装 Redis 及可能出现的错误和解决方法!

    前言 Redis(REmote Dictionary Server) 是一种以key-value写得存储系统.他是开源的ANSI语言编写的.遵守BSD协议.被称作“数据结构服务器”,因为它的值(val ...

  6. Python: 安装 sklearn 包出现错误的解决方法

    今天在安装 Python 的 sklearn 包时出现了 Cannot uninstall 'numpy' 和 Cannot uninstall 'scipy' 错误,下面记录了我尝试了很多网上的方法 ...

  7. 【UE4游戏开发】安装UE4时报SU-PQR1603错误的解决方法

    马三在开发过程中一直用的都是UE4.9版本(很久没有更新了.),因为功能都够用,所以也懒得去更新.这不最近UE4 发布了最新的4.14版本,本来想尝个鲜,试试新版的UE引擎怎么样,结果这一安装上就一直 ...

  8. 安装MySql-Python遇到的错误及解决方法

    用pip安装mysql-python时报错: _mysql.c _mysql.c(42) : fatal error C1083: Cannot open include file: 'config- ...

  9. CentOS 安装hping3工具及安装遇到的错误及解决方法

    hping是用于生成和解析TCPIP协议数据包的开源工具.创作者是Salvatore Sanfilippo.目前最新版是hping3,支持使用tcl脚本自动化地调用其API.hping是安全审计.防火 ...

随机推荐

  1. 必须知道的.net——学习笔记1

    1.对象的生成(出生) Person aperson=new Person("小张",25) 构造过程:分配存储空间—初始化附加成员—调用构造函数 2.对象的旅程(在一定的约定与规 ...

  2. 分分钟教会大家第一个Spring入门案例

    1.下载Spring jar包,并添加到项目中. 官网地址http:springsource.org 2.在项目中新建一个类      package cn.test; public class He ...

  3. STAR-H1208M集线器不支持同时挂载多个nfs

    今天在两个触摸屏上都加入了开机加载nfs的操作. 没想到会出现以下错误: pmap_getmaps.c: rpc problem: RPC: Unable to receive; errno = Co ...

  4. git之常用指令

    参考:Git教程 - 廖雪峰的官方网站 1.git  //linux上检测是否安装git 2.sudo apt-get install git //linux上安装git 3.git config - ...

  5. SDK 移动应用开发系统

    AppCan SDK 是一套跨平台移动应用开发系统,基于业内领先的Hybrid App 开发引擎,采用HTML5 标准作为开发语言,支持一次开发多平台适配.AppCan SDK 提供应用向导和界面向导 ...

  6. phpMyAdmin 缺少 mysqli 扩展。请检查 PHP 配置

    好久没有在windows下配置php了,今天,按照前一篇文章配置好,打开phpmyadmin时,出现如下问题: phpMyAdmin 缺少 mysqli 扩展.请检查 PHP 配置 网上搜索解决方案, ...

  7. The report for triangle problem

    本次实验主要使用eclipse 编写三角形判定的代码,并用junit进行测试. 1.安装junit和hamcrest 下载junit-4.12.jar和hamcrest-all-1.3.jar 并且拖 ...

  8. lintcode 75 Find Peak Element

    Hi 大家,这道题是lintcode上的find peak element的题,不是leecode的那道, 这两道题是有区别的,这道题的题目中说明了:只有左右两侧的数都小于某个元素,这种才是峰值, 而 ...

  9. block 在ARC和非ARC下的不同含义

    Block的循环引用 对于非ARC下, 为了防止循环引用, 我们使用__block来修饰在Block中使用的对象: 对于ARC下, 为了防止循环引用, 我们使用__weak来修饰在Block中使用的对 ...

  10. am335x UART1输入u-boot 调试信息代码修改

    AM335x 调试信息UART1输出代码修改1. 关于pin_mux  的配置代码修改位置:/board/forlinx/ok335x/mux.c void enable_uart0_pin_mux( ...