Last active
December 29, 2016 04:19
-
-
Save clasense4/4459b38f588c11d6f82f to your computer and use it in GitHub Desktop.
scrapy on centos 7.3, work with digitalocean 512mb ram
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base package | |
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm | |
yum update -y | |
# Add swap | |
sudo fallocate -l 4G /swapfile | |
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 | |
yum install git python-pip python-devel gcc gcc-devel libxml2 libxml2-devel libxslt libxslt-devel openssl openssl-devel libffi libffi-devel -y | |
CFLAGS="-O0" pip install lxml | |
pip install scrapy | |
# Install pip package | |
pip install feedparser | |
pip install hiredis | |
pip install ipython | |
pip install MySQL-python | |
pip install MySQLdb | |
pip install pycurl | |
pip install python-wordpress-xmlrpc | |
pip install redis | |
pip install SQLAlchemy | |
# Install Redis | |
wget http://download.redis.io/releases/redis-3.2.6.tar.gz | |
tar xzf redis-3.2.6.tar.gz | |
cd redis-3.2.6 | |
make && make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment