Centos 6.5 安装 Scrapy

###已经测试过,基本没问题,安装成功

python -V

yum -y update

yum groupinstall -y development

yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel

wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
tar -xvf Python-2.7.6.tar.xz

cd Python-2.7.6

./configure

make && make altinstall

mv /usr/bin/python /usr/bin/python2.6.6

ln -s /usr/local/bin/python2.7 /usr/bin/python

vi /usr/bin/yum(#!/usr/bin/python 改为 #!/usr/bin/python2.6.6)

wget –no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz

tar -xvf setuptools-1.4.2.tar.gz

cd setuptools-1.4.2

python setup.py install

ln -s /usr/local/bin/easy_install-2.7 /usr/bin/easy_install

easy_install pip
curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python2.7

yum -y install libxslt-devel

yum -y install libffi-devel

pip install scrapy

#Successfully installed scrapy Twisted w3lib queuelib lxml #pyOpenSSL cssselect six zope.interface cryptography cffi #pycparser

scrapy -h

#Scrapy 1.0.4 - no active project

Mac mysql 修改编码为utf8mb4

找到my.cnf文件,一般在/usr/local/mysql这个目录。 一般里面没什么特别设置,添加以下代码:
注意修改前,停到mysql服务,修改后重启

[client]
default-character-set = utf8mb4

[mysql]
default-character-set = utf8mb4

[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

重启后查询看看:

mysql> show variables like '%char%';
+--------------------------+--------------------------------------------------------+
| Variable_name            | Value                                                  |
+--------------------------+--------------------------------------------------------+
| character_set_client     | utf8mb4                                                |
| character_set_connection | utf8mb4                                                |
| character_set_database   | utf8mb4                                                |
| character_set_filesystem | binary                                                 |
| character_set_results    | utf8mb4                                                |
| character_set_server     | utf8mb4                                                |
| character_set_system     | utf8                                                   |
| character_sets_dir       | /usr/local/mysql-5.6.21-osx10.8-x86_64/share/charsets/ |
+--------------------------+--------------------------------------------------------+
8 rows in set (0.00 sec)


博客开通啦

测试啪啪啪啪,啪啪啪

  • 1
  • 2
First Header Second Header
Content Cell Content Cell
Content Cell Content Cell
function a(){  
    alert(1);  
}
function asd(a,b){
    var c = a+b;
    alert(c);
}
public void main(String[] args){
    System.out.println("asd);
}