ubuntu14.04安装pyspider
sudo apt-get install libcurl4-openssl-dev libxml2-dev libxslt1-dev
sudo atp-get install phantomjs
激活虚拟环境(python3.6.7)
pip install pyspider
执行pysqpider 即可
如果出现mysql相关的错误执行下面的语句先。
sudo apt-get purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get dist-upgrade
发布
This document is based on MySQL + RabbitMQ
config.json
Although you can use command-line to specify the parameters. A config file is a better choice.
{
"taskdb": "mysql+taskdb://username:password@host:port/taskdb",
"projectdb": "mysql+projectdb://username:password@host:port/projectdb",
"resultdb": "mysql+resultdb://username:password@host:port/resultdb",
"message_queue": "amqp://username:password@host:port/%2F",
"webui": {
"username": "some_name",
"password": "some_passwd",
"need-auth": true
}
}
Database Connection URI type: should be one of `taskdb`, `projectdb`, `resultdb`.
running
You should run components alone with subcommands. You may add & after command to make it running in background and use screen or nohup to prevent exit after your ssh session ends. It's recommended to manage components with Supervisor.
# start **only one** scheduler instance
pyspider -c config.json scheduler
# phantomjs
pyspider -c config.json phantomjs
# start fetcher / processor / result_worker instances as many as your needs
pyspider -c config.json --phantomjs-proxy="localhost:25555" fetcher
pyspider -c config.json processor
pyspider -c config.json result_worker
# start webui, set `--scheduler-rpc` if scheduler is not running on the same host as webui
pyspider -c config.json webui
you can get complete options by running pyspider --help and pyspider webui --help for subcommands.
"webui" in JSON is configs for subcommands. You can add parameters for other components similar to this one.
To deploy pyspider components in each single processes, you need at least one database service. pyspider now supports MySQL, MongoDB and PostgreSQL. You can choose one of them.
And you need a message queue service to connect the components together. You can use RabbitMQ, Beanstalk or Redis as message queue.
pip install --allow-all-external pyspider[all]
Even if you had install pyspider using
pipbefore. Install withpyspider[all]is necessary to install the requirements for MySQL/MongoDB/RabbitMQ
ubuntu14.04安装pyspider的更多相关文章
- Ubuntu14.04安装配置web/ftp/tftp/dns服务器
目录: 1.安装ftp服务器vsftpd --基于tcp,需要帐号密码 2.安装tftp服务器tftpd-hpa,tftp-hpa --udp 3.web服务器--使用Apache2+Mysql+PH ...
- Ubuntu14.04安装intel集显驱动
Ubuntu14.04安装intel集显驱动 标签(空格分隔): ubuntu linux 驱动安装 1.查看本机显卡型号 使用lspci命令来获取PCI接口硬件信息 o@o-pc:~$ lspci ...
- Ubuntu14.04安装中文输入法以及解决Gedit中文乱码问题
1 设置中文显示环境 1. 打开System Settings 2. 打开Personal-> Language Support. 会弹出如下对话框,提示你“语言支持没安装完整”. 点击“Rem ...
- Ubuntu14.04安装配置ndnSIM
Ubuntu14.04安装配置ndnSIM 预环境 Ubuntu14.04官方系统 请先使用sudo apt-get update更新一下源列表 安装步骤 安装boost-lib sudo apt-g ...
- Ubuntu14.04 安装QQ国际版wine-qqintl
Ubuntu14.04安装qq国际版方式: 首先下载,链接为: https://pan.baidu.com/s/1boPitVD 密码:jp1j 也可去Ubuntu中文的Kylin(优麒麟)官网下载 ...
- 一.ubuntu14.04安装、亮度设置、显卡设置等一体化讲解
一.ubuntu14.04安装 安装步骤很简单的,相信你只要知道并且决定安装ubuntu,你就不会在安装上有问题,下载网址 http://www.ithome.com/html/soft/81539. ...
- Ubuntu14.04安装samba
Ubuntu14.04安装samba 按照惯例,首先介绍Samba.Samba是在Linux系统上实现的SMB(Server Messages Block,信息服务块)协议的一款免费软件.它实现在局域 ...
- Ubuntu14.04安装有道词典
Ubuntu14.04安装有道词典之前要更新系统: sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade 在有道官网下载 ...
- ubuntu14.04 安装redis 2.8.9
ubuntu14.04安装前准备工作,为了保证安装顺利,请先执行apt-get update 然后安装make 和gcc(已安装的可忽略) apt-get install make apt-get i ...
随机推荐
- 蓝屏代码大全 & 蓝屏全攻略
转载自http://diybbs.zol.com.cn/15/86_141447.html 一.蓝屏含义 1.故障检查信息 ***STOP 0x0000001E(0xC0000005,0xFDE38A ...
- hibernate 实体对象的三种状态以及转换关系。
最新的Hibernate文档中为Hibernate对象定义了四种状态(原来是三种状态,面试的时候基本上问的也是三种状态),分别是:瞬时态(new, or transient).持久态(managed, ...
- spring的几个通知(前置、后置、环绕、异常、最终)
1.没有异常的 2.有异常的 1.被代理类接口Person.java package com.xiaostudy; /** * @desc 被代理类接口 * * @author xiaostudy * ...
- hdu1596 find the safest road - floyd
2017-08-04 14:42:56 writer:pprp 题意: Problem Description XX星球有很多城市,每个城市之间有一条或多条飞行通道,但是并不是所有的路都是很安全的,每 ...
- BZOJ3205/UOJ107 [Apio2013]机器人
本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作. 本文作者:ljh2000 作者博客:http://www.cnblogs.com/ljh2000-jump/ ...
- java加载jdbc驱动三种方式的比较
一.引言 平时连接数据库的时候首先要加载jdbc驱动,这一步骤其实有三种方式,他们的区别?优劣? 二.快速了解三种加载方式 Class.forName(“com.mysql.jdbc.Driver”) ...
- yii2:frontend/frontactoin curl生成
yii2:frontend/frontactoin curl生成 想要覆写已存在文件,选中 “overwrite” 下的复选框然后点击 “Generator”.如果是新文件,只点击 “Generato ...
- 委托,lambda,匿名方法
lambda表达式其实就是匿名方法的变体或者说简写. 原来我们用 delegate void Del(int x); Del d = delegate(int x) { return x + 1; } ...
- web项目在iis配置好后不能正确访问问题集锦,以及IIS常规设置
6.IIS配置好,项目无法访问,注意项目对应的应用程序池的net版本是否正确,是否集成(一般都是集成,很少是经典) 本项目用的4.0,可IIS默认程序池为2.0,将2.0改为4.0就行. 7.HT ...
- css预处理器sass学习
SASS 叫做css预处理器,他的基本思想是用一门专门的编程语言来进行页面样式的设计,然后在编译成正常的css文件. Sass的用法 安装 sass是用ruby语言写的,所以我们在安装sass之前要先 ...