git clone <repo>
If you don't install vitualenv:
sudo pip install virtualenv
virtualenv env
source env/bin/activate
pip install -r requirements.txt
You should set the db name of your mysql server. So there is DATABASES variable in olx-site/settings.py like this.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': '<db_name>',
'USER': '<username>',
'PASSWORD': '<password>',
'HOST': '<hostname>',
}
}
You can set the db_name, username, password of your mysql database. and if mysql host is remote, hostname maybe would be host ip. but if localhost, you can set hostname with 'localhost'.
python manage.py makemigrations product
python manage.py migrate
python manage.py createsuperuser
node version is 6.9.0 If you are use nvm ( node version manager ):
nvm use 6.9.0
npm install phantomjs -g
* * * * * python /root/olx-Scraper/cron_task.py