There are 2 ways to install Scrapy Portia in Ubuntu Server 14.04: Install via virtualenv/pip or Install Docker. Please see the details below
Option 1: Install Portia via Virtualenv/pip
Please make sure that virtualenv and pip is ready to use in your server.
Do activate Portia environment:
1 2 |
virtualenv portia --no-site-packages source portia/bin/activate |
Download Protia source code:
1 2 |
cd portia/ git clone https://github.com/scrapinghub/portia.git |
Install libraries, packets:
1 2 3 4 5 |
pip install -r requirements.txt sudo pip install -r requirements.txt pip install -e ./slybot sudo apt-get install libxml2-dev libxslt-dev python-dev zlib1g-dev libffi-dev libssl-dev pip install cryptography |
Check port 9001, and run Portia:
1 2 |
sudo lsof -i :9001 sudo twistd -n slyd |
Test Portia at link: http://localhost:9001/static/main.html
Install Portia via Docker (recommended):
Make sure that Docker was installed in your server and ready to use:
Download source code:
1 2 |
git clone https://github.com/scrapinghub/portia cd portia/ |
Build Portia Image:
1 2 |
docker build -t portia . sudo docker build -t portia . |
And run Protia Docker container:
1 2 3 |
docker run -i -t --rm -v <PROJECT_FOLDER>/data:/app/slyd/data:rw -p 9001:9001 --name portia portia -v data:/app/slyd/data:rw -p 9001:9001 --name portia portia |