标签:
1,centos7的安装,
安装软件时选择的是“基础webserver”选项;
2,centos的网络设置(参考:http://www.centoscn.com/CentOS/config/2014/1012/3923.html)
1)找到以太网卡配置文件ifcfg-enp**文件,过面的数字好像是随机生成的。
2)使用Root打开并编辑些文件,将onboot的"no"改为“yes”,然后重启网络。
最后输入:wq 保存并退出,再重启一下network:
3)重启网络命令
# service network restart
这样再启动系统时,网络也会自动启动。
3,安装mysql(参考:http://blog.csdn.net/u013434493/article/details/45535443)
1)Add mysql community into your rpm repo
yum install http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
2)install mysql
yum install mysql-community-server
3)start mysql
systemctl start mysqld
4,安装python-pip(参考:http://superuser.com/questions/877759/how-to-install-python-pip-in-centos7-docker-container)
yum -y install epel-release; yum clean all yum -y install python-pip; yum clean all
5,安装scrapy1.0
1)pip install scrapy –U
报错1:libffi 相关的错误
解决方法:yum install libffi-devel
报错2:openssl相关错误
解决方法:yum install openssl-devel
报错3:出现libxml相关的错误
解决方法:yum install libxml2-devel;yum install libxslt-devel;
yum install python-devel
最终解决问题,scrapy1.0安装成功
6,安装mysqldb
wget http://downloads.sourceforge.net/project/mysql-python/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz tar xzf MySQL-python-1.2.3.tar.gz cd MySQL-python-1.2.3 python setup.py install
标签:
原文地址:http://www.cnblogs.com/python-life/p/4680191.html