- 博客(19)
- 收藏
- 关注
原创 CentOS7安装ElasticSearch-Head
下载 Nodejswgethttps://nodejs.org/dist/v12.16.1/node-v12.16.1-linux-x64.tar.xz创建 nodejs 目录mkdir /usr/local/nodejs将node-v12.16.1-linux-x64.tar.xz解压到 /usr/local/nodejs 中tar -xvfnode-v...
2020-03-01 20:21:21
268
原创 ElasticSearch集群搭建
安装elasticsearch集群搭建修改 elasticsearch主目录/conf/elasticsearch.yml文件,每个节点的名称保持唯一,集群名称保持一致cluster.name: <集群名称>node.name: <节点名称>node.master: true # 参与主节点选举node.data: true # 是否作为数据节点...
2020-02-29 19:58:34
274
原创 解决scrpay-redis空爬问题
scrapy-redis在爬取页面完成后会处于空爬状态,不会自动结束可以通过配置scrapy扩展来解决这个问题在项目目录新建extensions.pyimport timefrom scrapy import signalsfrom scrapy.exceptions import NotConfiguredclass ScrapyRedisAutoClose(ob...
2020-02-26 11:39:37
363
1
原创 Scrapy配置Redis集群
安装第三方库pip install scrapy-redis-sentinel修改 setting.py文件ITEM_PIPELINES = {'scrapy_redis_sentinel.pipelines.RedisPipeline': 543,}# Bloomfilter 配置# 使用的哈希函数数,默认为 6BLOOMFILTER_HASH_NUMBER = ...
2020-02-25 18:49:07
955
原创 Redis5.0.7集群搭建
环境centos7.3 3台服务器,ip分别为192.168.56.30、192.168.56.31、192.168.56.32 redis5.0.7 三主三从集群 主:端口 9000、从:端口 9001 安装redis,可以参照我的另一篇博客Redis安装并开启远程访问在centos7根目录创建redis-cluster文件夹,然后在redis-cluster里面创建两...
2020-02-25 18:32:44
349
原创 pyppeteer隐藏window.navigator.webdriver
由于一些网站的反爬机制,会识别window.navigator.webdriver,对爬虫进行封禁通过阅读pyppeteer的源码,可以通过修改源码来达到隐藏window.navigator.webdriver的效果步骤找到pyppeteer的launcher.py一般在 Python的home目录\Lib\site-packages\pyppeteer\定位到60行,找到参数...
2020-02-18 22:48:40
659
原创 Elasticsearch5.2.2安装elasticsearch-analysis-hanlp-5.2.2插件
下载elasticsearch-analysis-hanlp-5.2.2.zip(es版本要和hanlp版本保持一致) https://github.com/KennFalcon/elasticsearch-analysis-hanlp.git 进入es目录/bin输入以下命令 elasticsearch-plugin install file:///路径/elasticse...
2020-02-13 19:30:37
417
原创 Pyppeteer的安装和使用
安装通过pip命令安装pip install pyppeteer对应的chromium在pyppeteer首次启动时会自动下载,不需要手动配置常见报错信息/root/.local/share/pyppeteer/local-chromium/575458/chrome-linux/chrome: error while loading shared libraries: li...
2020-02-08 12:48:22
3529
原创 Splash安装
目录系统环境安装Docker安装splash 系统环境 centos7.3 安装Docker 更新yum包yum update以yum方式安装 yum -y install docker启动docker service docker start测试运行docker docker run hello-worl...
2020-01-08 21:54:00
623
原创 Scrapy和Splash爬取iframe标签里的内容
Lua脚本function main(splash, args) splash:go(args.url) splash:wait(args.wait) splash:runjs("iframe = function(){ var f = document.getElementById('g_iframe'); return f.contentDocument....
2019-09-13 08:44:12
1279
3
原创 Ubuntu18.04搭建Hadoop3.2分布式集群
目录 运行环境修改每台服务器的主机名修改每台服务器的hosts文件配置免密登录安装jdk1.8安装hadoop3.2修改hadoop配置文件hadoop常用命令 运行环境 ubuntu18.04 hadoop3.2 jdk1.8 修改每台服务器的主机名 vim /etc/hostname 4台服务器的主机名分别为 Master...
2019-07-09 20:42:04
2040
3
原创 CentOS7安装python虚拟环境
目录安装虚拟环境创建 virtualenv 软连接设置虚拟环境目录virtualenvwrapper常用命令安装虚拟环境采用豆瓣源安装pip3 install -i https://pypi.douban.com/simple virtualenvpip3 install -i https://pypi.douban.com/simple virtualenvwra...
2019-06-27 13:32:48
1267
原创 Nginx+uwsgi+Python3.6部署Flask项目
目录安装python3.6.6安装flask和uwsgi安装nginx 安装python3.6.6 由于是编译安装,所以需要确认相应的依赖包已经安yum install -y gcc zlib* sqlite-devel libXcomposite libXcursor libXi libXtst libXScrnSaver libXrandr atk at-sp...
2019-06-27 13:15:53
1887
原创 Redis安装并开启远程访问
官网下载 Redis安装包https://redis.io/解压Redis安装包(当前版本为 redis-5.0.5 )并进入解压文件夹tar zxvfredis-5.0.5.tar && cdredis-5.0.5编译make && make install进入 redis-5.0.5 文件夹中的 utils文件夹,执行脚本cd ...
2019-06-27 12:37:58
978
原创 Nginx+uwsgi+Python3.6部署Django项目
目录系统环境安装python3.6.6安装nginx及配置配置uwsgi 系统环境 centos7.3 python3.6.6 django2.2 uwsgi2.0.18 nginx1.14.2 安装python3.6.6 下载python安装包,wget https://www.p...
2019-04-25 13:52:48
550
原创 Ubuntu Server 18.04修改主机名
Ubuntu Server 18.04直接进入/etc/hostname修改主机名的时候,重启后发现没有修改成功,这是因为Ubuntu18.04与之前的版本有些不同,需要先做一些额外的操作sudo vim /etc/cloud/cloud.cfg,将preserve_hostname设置为true sudo vim /etc/hostname,修改主机名 重启服务器...
2019-03-25 21:41:40
1819
原创 搭建FTP服务器
初次搭建ftp的过程中经过多次尝试,总结了一个较为简单的ftp搭建步骤1.首先购买一个服务器,个人使用的是阿里云的ECS云服务器,系统选64位的CentOS7.2版本阿里云官网 https://www.aliyun.com/2.安装vsftpyum install vsftpd遇到问号直接按回车看到Complete!表示已安装完成设置vsftpd系统自启动 syst...
2018-09-24 10:36:52
1158
原创 JDBC Driver连接MySQL8.0 失败
错误提示java.sql.SQLException:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone c...
2018-05-19 17:44:15
1260
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人