准备好 Ubuntu14.04 System.html
1. 安装 scrapy:python
1) 按照这个 http://doc.scrapy.org/en/1.0/topics/ubuntu.html#topics-ubunturedis
可是可能会遇到下面的问题:ubuntu
尝试了如下方式解决了该问题:windows
1>>sudo apt-get install python-pip【若是已经安装pip就没必要操做此步】bash
2>>sudo pip install scrapy服务器
2)另外,还有可能遇到pyasn1版本的问题:scrapy
解决方法:编码
1>>sudo apt-get install python-pipspa
2>>sudo pip install pyasn1 --upgrade
2. 安装 redis-server
1)按照 http://jingyan.baidu.com/article/948f592401d172d80ff5f99a.html
sudo apt-get install redis-server
可是默认server绑定了本地IP,不支持远程访问,须要Redis服务器的配置文件redis.conf。
1)修改redis.conf:
sudo vi /etc/redis/redis.conf
2)注释bind:
#bind 127.0.0.1
3)修改后,重启Redis服务器:
sudo /etc/init.d/redis-server restart
redis-cli -h IP地址
【注意】:千万不要在windows下面修改以后再copy覆盖Ubuntu中的redis.conf,以前由于用SecureCRT,它对vi的支持不太好,因此用rz和sz命令把ubuntu中的文件下载到windows本地进行修改以后再上传覆盖,因为删掉了原来的文件,修改后的文件因为编码问题致使各类报错,最后redis崩溃了。尝试了各类方法均很差使,最后卸载了redis,因为存在某些文件的残留,致使redis安装失败。最后只能重装系统,从新开始。
经验教训:获得一个教训在作重要操做以前必定要备份,而后即便犯了错误,也能够返回到最后一次能正确运行的地方。