摘要: 1.开发环境:以下列出的是部分必要库,详细请安装项目内的requirements.txt Python==3.6.8rc1 注意:不能使用python3.7以上版本,有版本兼容问题 Django==2.1.3 注意:2.2版本以上有兼容性问题 channels==2.1.4 channels-red 阅读全文
posted @ 2020-03-18 10:33 chenjianwen 阅读(474) 评论(0) 推荐(0) 编辑
摘要: 一、nginx安装 1.必要软件准备: 为了支持rewrite功能,我们需要安装pcre: yum install pcre-* 需要ssl的支持,如果不需要ssl支持,请跳过这一步: yum install openssl* 增加:yum install gcc gcc-c++ autoconf 阅读全文
posted @ 2016-10-19 22:49 chenjianwen 阅读(737) 评论(0) 推荐(0) 编辑
摘要: 参考:http://www.centoscn.com/CentosServer/www/2015/0422/5245.html 安装mysql5.6.17 1.按照标准需要给mysql创建所属用户和用户组 2.MySQL从5.5版本开始,通过./configure进行编译配置方式已经被取消,取而代之 阅读全文
posted @ 2016-09-14 09:10 chenjianwen 阅读(321) 评论(0) 推荐(0) 编辑
摘要: mysql服务器负载太大,卡死 mysql> SELECT concat('KILL ',id,';') FROM information_schema.processlist WHERE user='root'; + + | concat('KILL ',id,';') + + | KILL 31 阅读全文
posted @ 2023-02-06 19:52 chenjianwen 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 1.查看数据占用空间 cd /data/mysql/zabbix/ du -sh * | grep G 2.对应到数据库中就是history_uint和history两个表数据比较大 mysql> select table_name, (data_length+index_length)/1024/ 阅读全文
posted @ 2023-01-31 10:41 chenjianwen 阅读(436) 评论(0) 推荐(0) 编辑
摘要: Dell T320 RAID 1 磁盘替换坏的一块盘的操作 阅读全文
posted @ 2023-01-09 13:08 chenjianwen 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 1. 初始化数据库后,想导入数据,发现报错: ERROR 1227 (42000) at line 75612: Access denied; you need (at least one of) the SYSTEM_USER privilege(s) for this operation 解决办 阅读全文
posted @ 2022-12-02 09:41 chenjianwen 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 1.执行命令报错 pip install pycrypto Installing collected packages: pycrypto Running setup.py install for pycrypto ... error ERROR: Command errored out with 阅读全文
posted @ 2022-11-17 10:20 chenjianwen 阅读(1144) 评论(0) 推荐(1) 编辑
摘要: server { listen 8910 ssl; server_name localhost,xxx.xxx.com; client_max_body_size 2048m; #ssl on; ssl_certificate ssl/xxx.crt; ssl_certificate_key ssl 阅读全文
posted @ 2022-11-16 10:22 chenjianwen 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 常用的防暴力破解软件有 fail2ban、DenyHosts,但在使用过程中发现DenyHosts只支持python2,刚好把系统python版本升级到了python3,导致DenyHosts不可用,所以改用fail2ban了;如果不是python环境的影响,还是比较推荐DenyHosts的。 1. 阅读全文
posted @ 2022-11-15 10:56 chenjianwen 阅读(1361) 评论(0) 推荐(1) 编辑
摘要: 为加强远程桌面的安全,请各位按照以下指引自查及设置。 一、修改系统默认账号名Administrator 按win r键,打开操作,输入:gpedit.msc 点击确定(组策略)。 选择【计算机配置】-->【windows设置】-->【安全设置】-->【本地策略】-->【安全选项】,找到【账户:重命名 阅读全文
posted @ 2022-11-14 16:17 chenjianwen 阅读(233) 评论(0) 推荐(0) 编辑
摘要: from operator import or_ from django.db.models import Q from functools import reduce filter_ip_list = ["不能为空"] # 排除 models.ServerHost.objects.filter(b 阅读全文
posted @ 2022-10-14 19:19 chenjianwen 阅读(416) 评论(0) 推荐(0) 编辑
摘要: 1.提示文件冲突 解决办法: 1.CODE.txt中保留需要的代码,其余的删掉。 2.在冲突目录下,选中文件--右键菜单—TortoiseSVN—Resolved(解决)。会列出冲突的文件列表,如果确认已经解决,点OK。 3.最后重新提交 2.提交提示 解决办法: 在提交的时候写上超过10个字符的说 阅读全文
posted @ 2022-09-29 11:40 chenjianwen 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 1.公司换了办公室,发现frp无法连接上服务器,报错 2022/09/25 23:42:47 [W] [service.go:82] login to server failed: EOF EOF 开始怀疑是frp的版本问题,于是客户端和服务端都换上了最新的版本,结果还是无法解决问题,继续尝试更换端 阅读全文
posted @ 2022-09-26 10:14 chenjianwen 阅读(2803) 评论(0) 推荐(0) 编辑
摘要: 1.执行命令"badblocks -v /dev/sda1 > result.txt ",执行检测,并将操作结果重定向到result.txt内 badblocks -s -b4096 /dev/sda1 对硬盘数据的操作存在风险,请谨慎操作 扫描硬盘坏道Permalink 命令: badblocks 阅读全文
posted @ 2022-09-22 09:32 chenjianwen 阅读(502) 评论(0) 推荐(0) 编辑
摘要: 查询全部的记录: select * from test_limit ; 查第一条记录: select * from test_limit limit 1; 查前面两条记录: select * from test_limit limit 0,2; 查第二和第三条记录: select * from te 阅读全文
posted @ 2022-09-16 17:09 chenjianwen 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 1.查看svn命令 svn help 2.拉取svn数据指定用户 svn checkout http://10.21.210.xxx/svn/dddjs/tool/server/web_gm_tools/ --username=chenjianwen 3.提交文件 svn add file 例如:s 阅读全文
posted @ 2022-09-14 15:12 chenjianwen 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 1.隐藏版本信息 1.在nginx.conf里面添加 在 http{ server_tokens off;} 2.在当前的conf目录下编辑php-fpm配置文件,如fastcgi.conf或fcgi.conf。(这个配置文件名也可以自定义的,根据具体文件名修改): 找到 fastcgi_param 阅读全文
posted @ 2022-08-25 16:45 chenjianwen 阅读(59) 评论(0) 推荐(0) 编辑
摘要: -A INPUT -m state --state NEW -m tcp -p tcp -s 10.0.0.0/8 -j ACCEPT 防火墙ip地址后边加个/8(16,24,32) 是掩码的位数, A类IP地址的默认子网掩码为255.0.0.0 (由于255相当于二进制的8位1,所以也缩写成“/8 阅读全文
posted @ 2022-07-23 10:05 chenjianwen 阅读(162) 评论(0) 推荐(0) 编辑
摘要: from PIL import Image import os # 获取文件名 file_names = os.listdir("./") #print(file_names) # 文件名拼接路径 #file_list = [os.path.join("./",file) for file in f 阅读全文
posted @ 2022-06-30 10:34 chenjianwen 阅读(826) 评论(0) 推荐(0) 编辑
摘要: 1.机器详细配置 https://item.jd.com/10033480986333.html 戴尔(DELL)Precision3240 至强W-1250 6核 主频3.3GHz 64G内存 512G固态 P620显卡 2G独显 处理器 Intel(R) Xeon(R) W-1250 CPU @ 阅读全文
posted @ 2022-06-13 12:08 chenjianwen 阅读(678) 评论(0) 推荐(0) 编辑
摘要: 1.前言 由于公司购买了一台戴尔(DELL) Precision3240 工作站,需要安装centos系统,按照传统的安装方式,但不管怎么弄,只要选择 Install Centos 7 ,就进入了黑屏状态,怎么搞都无法顺利安装到系统,郁闷了两天。终于看到一个有关的说法是:CentOS 7 内核版本太 阅读全文
posted @ 2022-06-10 15:49 chenjianwen 阅读(4721) 评论(0) 推荐(0) 编辑
摘要: 初始化: sys.stdout.write('Initializing MySQL database...\n') self.cmd = '/usr/local/mysql/bin/mysqld --initialize-insecure --datadir=%s --basedir=%s --us 阅读全文
posted @ 2022-05-05 16:40 chenjianwen 阅读(277) 评论(0) 推荐(0) 编辑