refer and revise from 

please sudo all automatically...

#set swap
sudo dd if=/dev/zero of=/swapfile count=4096 bs=1MiB
#instead of original command : sudo fallocate -l 4G /swapfile , 'cause it didn't work on my CentOS ...
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo "/swapfile swap swap sw 0 0" >> /etc/fstab
echo "vm.swappiness = 10" >>/etc/sysctl.conf
echo "vm.vfs_cache_pressure = 50" >> /etc/sysctl.conf

#install scrapy
sudo rpm -Uvh
#pay attention on version
yum update -y
yum install python-pip -y
yum install python-devel -y
yum install gcc gcc-devel -y
yum install libxml2 libxml2-devel -y
yum install libxslt libxslt-devel -y
yum install openssl openssl-devel -y
yum install libffi libffi-devel -y
pip install --upgrade pip
CFLAGS="-O0" pip install lxml
pip install scrapy

#check scrapy install successfully
scrapy -v



swapoff -v /swapfile
rm /swapfile



創作者 nobodyzxc 的頭像

Nobody's Zero

nobodyzxc 發表在 痞客邦 留言(0) 人氣()