Install Baidu Cloud Crawler on Centos 7

Install Baidu Cloud Crawler on Centos 7

The crawler runs under MySQL, Python 2.7, and Mysql-python, so install MySQL and MySQL-python first.

1. Install MySQL
Install Dependencies

 yum install libaio

Install MySQL

 wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm yum localinstall mysql-community-release-el7-5.noarch.rpm yum install mysql-community-server

Start MySQL

 systemctl start mysqld

Set MySQL password

 mysql_secure_installation;

2. Firewall settings <br />Install iptables

 yum install iptables-services

Open port 3306

 vi /etc/sysconfig/iptables

Add to

 -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT -A RH-Firewall-1-INPUT -m state –state NEW -m udp -p udp –dport 3306 -j ACCEPT

Restart iptables

 service iptables restart

3. Install MySQL-python

 yum install MySQL-python

4. Set up the program

 wget https://github.com/x-spiders/baiduyun-spider/archive/master.zip unzip master.zip cd baiduyun-spider-master

Set the account and password for connecting to the database

打開bin/spider.py ,修改DB_HOST、DB_PORT、DB_USER、DB_PASS

Running the crawler for the first time

 python bin/spider.py --seed-user

Run the crawler

 python bin/spider.py

Source code: https://geekspider.org/senior/215.html

<<:  QuickPacket: $40/month/E3-1270/16GB memory/1TB hard disk/20TB traffic/5 IP/Los Angeles

>>:  DexHost: $5/month/1GB RAM/30GB SSD hard drive/2TB bandwidth/OpenVZ/Los Angeles

Recommend

DeinServerHost: €3.95/month/1GB memory/300GB space/2TB traffic/Windows/Germany

DeinServerHost, a German hosting provider, was es...

BudgetNode: $7/month/7GB memory/70GB space/7TB traffic/KVM/Netherlands

BudgetNode, a US hosting company, is a formally r...

NodeVPS: $10/month/6GB RAM/200GB SSD/4TB bandwidth/KVM/Windows

NodeVPS, an American hosting provider, was founde...

viHost: $18/year/1GB memory/10GB space/10TB traffic/OpenVZ/UK

viHost, a British hosting provider, was establish...

VPS9: €9.99/month/1GB RAM/40GB SSD space/4TB traffic/KVM/Singapore/Germany

VPS9, an Indian hosting provider, was established...

BudgetVM long-term 50% discount code

BudgetVM is a sub-brand of Enzu, providing low-co...