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
pip
before. 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 ...
随机推荐
- idea中git合并切换分支等操作
https://blog.csdn.net/autfish/article/details/52513465
- NO.3 Android SDK 高效更新
一.修改协议 SDK Manager下Tools->Options,选中 “Force https://… sources to be fetched using http://…” 既 ...
- WebSocket相关
原文:http://www.cnblogs.com/jinjiangongzuoshi/p/5062092.html 前言 今天看了一些资料,记录一下心得. websocket是html5引入的一个新 ...
- scala学习手记5 - 元组与多重赋值
假定要在一个方法中返回多个值.比如需要返回一个人的名.姓和邮箱地址.在Java中最常用的方法是定义一个Person类,其中包括相对应的字段:还有些不常用的方法就是返回一个集合或数组,拿到结果后再进行循 ...
- LeetCode第[44]题(Java):Wildcard Matching
题目:通配符匹配 难度:hard 题目内容: Given an input string (s) and a pattern (p), implement wildcard pattern match ...
- pycharm(v 2018.1)新建工程没有导入本地包
新版的pycharm默认新建的工程Virtualenv(虚拟的环境),在创建环境时一定要注意勾选 Inherit global site-packages: 导入本地包 Make available ...
- tomcat学习篇
要求: 为Apache HTTP Server服务器添加JSP网页支持. 能够访问Tomcat容器的Web管理界面,以便管理各种JSP.Servelet应用. u 知识提示 在各种企业级网站应用系统中 ...
- PCB寻找器件
1.如果你知道元件的序号(designator),可以按下J,C,然后输入序号跳到元件所在位置,元件会出现在屏幕中心.2.如果是sch跟pcb在同一个project下,你从原理图选定元件,然后右键元件 ...
- LeetCode OJ:Compare Version Numbers(比较版本字符串)
Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 &l ...
- Python基础学习(第7天)
第6课 1.循环对象:包括一个next方法,这个方法的目的是进行到下一个结果,结束后抛出StopInteration异常: 当循环结构如for循环调用一个循环对象时,每次循环的时候都会调用next方法 ...