这是94采集器下载链接最新版本5.2.4 下载
/var/www/94caiji
目录为例。virtualenv venv
创建虚拟环境。激活venv . venv/bin/activate
pip install -r requestments.txt
, 在安装的过程中可能提示错误如下,修改requestments.txt 为 pyppeteer==0.2.6
ERROR: Cannot install pyppeteer==0.2.5 and pyppeteer==0.2.6 because these package versions have conflicting dependencies.
cfscrape
, 错误如下, 需要安装 pip install cfscrape
ModuleNotFoundError: No module named 'cfscrape'
执行python3 index.py
看是否可以运行, 如果没有错误,可以正常运行,说明python环境依赖安装完成。
创建supervisor配置文件94caiji.conf
[program:94caiji]
directory=/var/www/94caiji
command=/var/www/94caiji/venv/bin/python3 /var/www/94caiji/index.py
stdout_logfile=/var/www/94caiji/logs/supervisor.log
stderr_logfile=/var/www/94caiji/logs/supervisor.log
supervisorctl reload
supervisorctl status
查看94caiji进行是否正常运行。信息如下 正常运行。
(venv) root@debian:/var/www/94caiji# supervisorctl status
94caiji RUNNING pid 3649216, uptime 0:00:03
创建nginx 配置文件 94caiji.conf
server {
listen 80;
listen [::]:80;
server_name yourdomain.com;
return 301 https://yourdomain.com$request_uri;
}
server {
listen 443 http2;
#listen 443 ssl http2;
listen [::]:443 http2;
#listen [::]:443 ssl http2;
# root /var/www/html;
root /var/www/94caiji;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name yourdomain.com;
#location /favicon.ico{
# root /var/www/94caiji;
#}
location /robots.txt {
allow all;
}
location /sitemap.xml {
allow all;
}
location ~ \.txt$ {
root /var/www/94caiji;
}
#static files
#location ~ ^\/static\/.*$ {
# root /var/www/94caiji;
#}
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# try_files $uri $uri/ =404;
proxy_pass http://localhost:9001;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
配置好nginx,使用域名就可以正常访问了,
94采集器后台管理 默认用户名: admin
, 密码: admin
get_connection-Authentication plugin 'caching_sha2_password' is not supported,文件地址:/var/www/94caiji/app/helper/mysqlDB.pyc,错误行号:32
解决方法,安装 pip install mysql-connector-python
参考:https://stackoverflow.com/questions/50557234/authentication-plugin-caching-sha2-password-is-not-supported
还没有人评论,抢个沙发吧...