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 &

最新文章

  1. 《On Lisp》第四章第三节图4.6中的rmapcar函数中展现的apply陷阱
  2. Laravel5.1-错误和日志
  3. 组合数学 - 母函数的运用 --- hdu 1709 :The Balance
  4. 电视直播用的.m3u8 PC端和移动端地址 【流媒体播放测试专用】
  5. 设计师必看的10个HTML5动画工具
  6. 用Delphi实现文件关联
  7. 《UNIX环境高级编程》学习心得 四 文件I/O(一)
  8. LeetCode_Search a 2D Matrix
  9. jQuery模糊选择
  10. SpringMVC的web.xml配置注意
  11. js 的四种设计模式的优缺点
  12. SpringMVC 学习-返回字符串中文乱码问题解决
  13. spring boot跨域设置
  14. #WEB安全基础 : HTML/CSS | 0x11 浅谈GET和POST
  15. 建设工程造价数据服务云平台(计价BIM)
  16. nodejs02-fs模块
  17. SpringCloud(一)Eureka注册中心
  18. C++ 中 const、volatile、mutable的用法
  19. 重新学习Servlet
  20. MongoDB 备份恢复

热门文章

  1. Gradle笔记——关于Gradle 1.12
  2. Leetcode_58_Length of Last Word
  3. Chapter 2 User Authentication, Authorization, and Security(6):服务器权限授予粒度
  4. Linux Shell 命令--cut
  5. Cygwin获取root权限
  6. ARM Linux内核Input输入子系统浅解
  7. XBMC源代码分析 2:Addons(皮肤Skin)
  8. Dynamics CRM2013/2015 禁止欢迎界面(Disable the Welcome Screen)
  9. sublime text (ST)一篇通(安装、配置、扩展、使用)
  10. [转]Android长度单位详解