Using VPS to create a Tumblr analysis station

Using VPS to create a Tumblr analysis station

This article was successfully run on CentOS 7.

1. Install necessary components <br />Install git

 yum install -y git yum install screen wget unzip gcc gcc-c++ python-devel -y

Install pip

 wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py

Turn off firewall

 systemctl stop firewalld.service ; systemctl disable firewalld.service

Or open port 5000

 firewall-cmd --add-port=5000/tcp --permanent

2. Install MySQL 5.6
1. Download the source and install

 wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm rpm -ivh mysql-community-release-el7-5.noarch.rpm yum install mysql-server

2. Reset MySQL password and set permissions first

 chown -R root:root /var/lib/mysql service mysqld restart

Reset Password

 mysql -u root //直接回車進入mysql控制臺mysql > use mysql; mysql > update user set password=password('123456') where user='root'; mysql > exit;

Restart the database

 service mysqld restart

Create a database

 mysql -uroot -p mysql > create database tumblr;

3. Get the source code and install dependent libraries

 git clone https://github.com/tangrela/tumblr_clawer或者wget https://zhujiwiki.com/wp-content/uploads/2017/09/tumblr_clawer.zip unzip tumblr_clawer.zip cd tumblr_clawer pip install -r requirement.txt pip install grequests

4. Modify the configuration file to support Mysql
Modify config.py: Comment out the sixth line –> Remove the # at the beginning of the fifth line, and modify user, passwd, and 'database'

5. Operation

 python rebuildDB.py gunicorn -w4 -b 0.0.0.0:5000 run:app

Use IP:5000 to access

6. Add auto-start

1. Modify supervisord.conf and change directory to the script root directory
2. echo "supervisord -c website root directory/supervisord.conf" >> /etc/rc.d/rc.local
3. chmod +x /etc/rc.d/rc.local

7. nginx configuration

The main modified root directory is the tumblr_clawer/app/static directory, which can also be reversed to use SSL.

via: https://github.com/tangrela/tumblr_clawer

<<:  AYKsolutions: $499/month/e5-2620/384GB memory/4TB hard disk/100TB traffic/256 IP/Kansas

>>:  NOCIX: $50/month/Xeon 5639/32GB memory/480GB SSD hard disk/100TB traffic/5 IP/Kansas

Recommend

Krypt: $15/month/2GB memory/40GB space/2TB traffic/VMware/Los Angeles

Krypt, an American hosting provider, has its own ...

7 Free Web Management Panels That Can Replace cPanel

It is more convenient to install the web panel on...

UOVZ: Tanabata Special

Xuzhou KVM virtualization optional Telecom, Unico...

DirectSpace openvz vps simple review (512M Portland)

之前站點一直建在DirectSpace上,速度和穩定性都不錯,下面是一些簡單評測: 1、主機性能CP...

(MT)MediaTemple host lifetime discount code

Registration code for lifetime 20% discount: reta...

NAMECHEAP offers $5.99 domain name discounts

This discount code should have been released at t...

MAPn3.1.1 Special Edition

MAPn is an automatic compiler for the service env...

Sentris: $2.17/year/128MB memory/3GB space/500GB traffic/1IP/OpenVZ/Seattle

Sentris is now offering a 50% discount, with the ...