Ubuntu14.04部署pyspider的过程

时间:2023-02-28 07:33:04

1、安装,安装官方文档,应该先执行

  1. sudo apt-get install python python-dev python-distribute python-pip libcurl4-openssl-dev libxml2-dev libxslt1-dev python-lxml

再执行:

  1. sudo pip install --allow-all-external pyspider[all]

第一个错误:

  1. No distributions at all found for mysql-connector-python>=1.2.2

解决方法:换pip源,给~/.pip/pip.conf里面加上:

  1. [global]
  2. index-url = http://pypi.douban.com/simple/

第二个错误:

  1. Error: pg_config executable not found.

解决方法:

  1. sudo aptitude install libpq-dev

第三个错误:

    In file included from src/docstrings.c:::
src/pycurl.h::: fatal error: openssl/crypto.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status

解决方法:

sudo apt-get install libssl-dev

如果要用phantomjs,还得独立安装:

  1. sudo aptitude install phantomjs

建议使用MongoDB做数据存储:

  1. sudo aptitue install mongodb

建议使用redis做消息队列存储:

  1. sudo aptitude install redis-server

给个与官放文档略有不同的配置文件范本(config.json):

  1. {
  2. "taskdb":"mongodb+taskdb://mongodbuser:password@127.0.0.1:27017/taskdb",
  3. "projectdb":"mongodb+projectdb://mongodbuser:password@127.0.0.1:27017/projectdb",
  4. "resultdb":"mongodb+resultdb://mongodbuser:password@127.0.0.1:27017/resultdb",
  5. "message_queue":"redis://:redis_password@127.0.0.1:6379/1",
  6. "webui": {
  7. "username": "webUIusername",
  8. "password": "webUIpassword",
  9. "need-auth": true
  10. }
  11. }

启动shell脚本:

  1. #!/bin/bash
  2. sudo nohup pyspider -c config.json all &

Ubuntu14.04部署pyspider的过程的更多相关文章

  1. [原创]ubuntu14.04部署ELK+redis日志分析系统

    ubuntu14.04部署ELK+redis日志分析系统 [环境] host1:172.17.0.4 搭建ELK+redis服务 host2:172.17.0.3 搭建logstash+nginx服务 ...

  2. ubuntu14.04部署kickstart

    转自:http://www.mamicode.com/info-detail-1646465.html kickstart用于在内网自动安装系统. 使用pxe安装系统需要安装dhcp,tftp,htt ...

  3. Moses在Ubuntu14.04平台的安装过程

    平台环境:在windows 7中建立VMware虚拟机,操作系统为Ubuntu_14.04_amd_64 1.安装GIZA++ 安装步骤如下: wget http://giza-pp.googleco ...

  4. webrtc在ubuntu14.04上的编译过程(12.04亦可)

    转自:http://blog.csdn.net/xiangjai/article/details/44409751 一.虚拟机环境搭建 1.安装ubuntu 14.04虚拟机: 因为可以屏蔽svn版本 ...

  5. ubuntu14.04 部署nfs服务

    安装nfs服务 apt-get install nfs-kernel-server 修改配置文件,共享目录为/var/www,*号可替换为客户端IP地址,*默认为任何部署了nfs客户端的IP可以挂载该 ...

  6. ubuntu14.04安装pyspider

    sudo apt-get install libcurl4-openssl-dev libxml2-dev libxslt1-dev sudo atp-get install phantomjs 激活 ...

  7. 阿里云 Ubuntu14.04 部署 LAMP

    1.更新软件源 sudo apt-get update 2.安装Apache sudo apt-get install apache2 3.查看Apache是否安装成功 apache2 –v 如下所示 ...

  8. ubuntu14.04下安装爬虫工具scrapy

    scrapy是目前准备要学习的爬虫框架,其在ubuntu14.04下的安装过程如下: ubuntu14.04下默认安装了2.7的python以及setuptools,若未安装,可通过下面指令安装: s ...

  9. Ubuntu14.04 Django Mysql安装部署全过程

    Ubuntu14.04 Django Mysql安装部署全过程   一.简要步骤.(阿里云Ubuntu14.04) Python安装 Django Mysql的安装与配置 记录一下我的部署过程,也方便 ...

随机推荐

  1. Jquery实现兼容各大浏览器的Enter回车切换输入焦点的方法

    <script type="text/javascript"> $('input:text:first').focus(); document.onkeydown = ...

  2. 激活当前视图菜单高亮呈现 V2&period;0

    前一段时间,Insus.NET有分享一篇<激活当前视图菜单高亮呈现>http://www.cnblogs.com/insus/p/5287093.html 这篇只是同一控制器的菜单. 今天 ...

  3. Adobe Reader &amp&semi; PDF 护眼设置

    1.首先选择“编辑”--->“首选项” 选择其他颜色,把RGB如下设置

  4. 在Firefox浏览器中关闭缓存&period;命令

    在Firefox中关闭缓存 看看这里 在地址栏输入:about:config 然后在过滤器中输入:browser.cache.disk.enable 解释:When a page is loaded, ...

  5. 优秀的CSS预处理----Less

    Less语法整理 本人邮箱:kk306484328@163.com,欢迎交流讨论. 欢迎转载,转载请注明网址:http://www.cnblogs.com/kk-here/p/7601058.html ...

  6. ElasticSearch 学习记录之ES短语匹配基本用法

    短语匹配 短语匹配故名思意就是对分词后的短语就是匹配,而不是仅仅对单独的单词进行匹配 下面就是根据下面的脚本例子来看整个短语匹配的有哪些作用和优点 GET /my_index/my_type/_sea ...

  7. async源码学习 - 全部源码

    因为工作需要,可能我离前端走远了,偏node方向了.所以异步编程的需求很多,于是乎,不得不带着学习async了. 我有个习惯,用别人的东西之前,喜欢稍微搞明白点,so就带着看看其源码. github: ...

  8. 导航栏pop拦截

    一.新建一个分类 二.导入分类头文件 三.需要拦截的地方实现方法   - (BOOL)navigationShouldPopTwo  即可 .h #import <UIKit/UIKit.h&g ...

  9. C&num;访问SQLServer数据库访问帮助类

    SQLServer数据库访问帮助类 这里有一个Mysql帮助类的使用例子可以参考(大同小异) 写了一个Mysql的例子,SQLServer的差不多,一样的 C#简单三层结构设计UI.BLL.DAL 1 ...

  10. Scala实现乘法口诀

    object Test4 {  def main(args: Array[String]) {    for (i <- 1 to 9; j <- 1 to 9 if (j <= i ...