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

Nexus 7 device and app recommendations

Among the 7-inch tablets, from the current situat...

VPS9: €3.6/month/1GB RAM/25GB SSD space/6TB traffic/1Gbps port/KVM/Netherlands

VPS9, an Indian hosting provider (under Apeiron G...

kangle web server installation tutorial

Product Introduction Kangle web server (abbreviat...

xenpower: €28.8/year/1 vCPU/1G/200G/2T/1 IP/Xen

Previously introduced: xenpower: €5.9/month/2 vCP...

PowerVPS: $16/month/Atom D425/2GB RAM/500GB hard drive/unlimited traffic/France

PowerVPS, a Russian hosting provider, mainly prov...

PeakServers:$12/year/1 CPU/1G/25G/2T/1 IP/OpenVZ

I have introduced it many times. Now it seems tha...

domainmonster Christmas offer.com/.net$7.99/year

No coupon code is needed, just register directly....

NatCloud: New Year's Day 60% discount, HKT, HKBN, Taiwan, etc. NAT KVM VPS

https://www.natcloud.net/cart.php?gid=5 HKT and H...

EnterSys: $7/month/512MB memory/20GB SSD space/1TB traffic/1Gbps/KVM/Sri Lanka

EnterSys, also known as Enterprise Systems (Pvt) ...