
运维技术
山中无仙
这个作者很懒,什么都没留下…
展开
-
两个处理IP好用的Python库ipaddr和netaddr
Python中关于IP处理的两个模块这里介绍的两个处理IP好用的Python库名为:ipaddr和netaddr顺便提一个不好用的:IPy。上面两个能完全胜任这个库的功能,但这个库容错性不好,常报错。1.ipaddr简单介绍:Google开发的IP处理模块,地址:http://pythonhosted.org/ipaddr/可用pip安装:pip install ipaddr所有包含的类和方法使用help命令查看:help(ipaddr)Class总共分为:BaseIP、IPv4、IPv6原创 2020-06-15 10:26:50 · 4510 阅读 · 0 评论 -
CentOS6.4上ruby安装&升级
#现在的版本[root@hd4 /]# ruby --versionruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]#升级过程[root@hd4 /]# curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -[root@hd4 /]# curl -L https://get.rv...原创 2019-09-19 10:12:30 · 467 阅读 · 0 评论 -
Linux(CentOS)GLIBC出错补救方式
Linux(CentOS)GLIBC出错补救方式报错如下:xargs: relocation error: /lib64/libc.so.6: symbol _dl_starting_up, version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference命令如下:LD_PREL...原创 2019-09-12 14:01:42 · 3211 阅读 · 0 评论 -
Nginx反向代理中error_page的使用
回到上面的例子,如果访问一个url中途会有多个302,那如果需要用Nginx设计一个proxy,来隐藏掉中间所有的这些302,该怎么做呢?server { listen 80; proxy_intercept_errors on; recursive_error_pages on; location / { ...原创 2019-09-04 15:52:01 · 2618 阅读 · 0 评论 -
linux系统调优:file-max与ulimit -n 控制文件句柄的区别
file-max 表示系统级别的能够打开的文件句柄的数量。是对整个系统的限制,并不是针对用户的。ulimit -n 控制进程级别能够打开的文件句柄的数量。提供对shell及其启动的进程的可用文件句柄的控制。这是进程级别的。概要:linux系统默认open files数目为1024, 有时应用程序会报Too many open files的错误,是因为open files 数目不够。这就需...原创 2019-08-14 15:03:42 · 1648 阅读 · 0 评论 -
多级nginx反向代理,如何获取客户端真实IP
1、Nginx Proxy直接把请求往后转发,没有做任何处理。Nginx Proxy10.10.107.107 nginx.conflocation /test { proxy_pass http://10.10.107.112:8080;}10.10.107.112 nginx.conflocation /test { proxy_pass http://10.10....原创 2019-08-06 14:05:35 · 1221 阅读 · 0 评论 -
Nginx 开启gzip
在nginx.conf http配置项里增加以下配置.重启NGINX gzip on; gzip_min_length 2k; gzip_buffers 4 16k; gzip_comp_level 2; gzip_types text/plain application...原创 2019-02-26 11:10:49 · 173 阅读 · 0 评论 -
官网Nginx+Openresty编译
http://nginx.org/en/download.htmlnginx的Mainline version、Stable version、Legacy version的版本区别Nginx官网提供了三个类型的版本Mainline version:Mainline 是 Nginx 目前主力在做的版本,可以说是开发版Stable version:最新稳定版,生产环境上建议使用的版本Lega...原创 2019-01-15 22:49:03 · 512 阅读 · 0 评论 -
Nginx支持HLS配置
准备工作:1.安装nginx和rtmp模块2.安装ffmepg(用来推流)以上准备工作参见这篇博客:http://www.jianshu.com/p/99f7b4581f8b1.配置nginx用记事本工具打开/usr/local/etc/nginx/nginx.conf 找到server 修改server { listen 8080; ...转载 2018-09-14 10:09:50 · 12355 阅读 · 0 评论 -
Python3 ssl not available问题彻底解决
Python3.7为例编译安装the ssl module in Python is not available 问题执行一下两步解决:1)查看openssl openssl-devel两个包是否安装?版本是多少? 如果版本号不对,需要单独下载高版本编译安装: Python 3.7.0要求1.0.2p版本的openssl库 下载、解压 ./config –...原创 2018-08-30 09:18:40 · 17307 阅读 · 2 评论 -
nginx location正则写法
nginx location正则写法一个示例:location = / { # 精确匹配 / ,主机名后面不能带任何字符串 [ configuration A ] }location / { # 因为所有的地址都以 / 开头,所以这条规则将匹配到所有请求 # 但是正则和最长字符串会优先匹配 [ configuration B ] }location /do...原创 2018-08-27 14:01:07 · 305 阅读 · 0 评论 -
nmap命令详解
NMap,也就是Network Mapper,是Linux下的网络扫描和嗅探工具包。 nmap是在网络安全渗透测试中经常会用到的强大的扫描器。功能之强大,不言而喻。下面介绍一下它的几种扫描命令。具体的还是得靠大家自己学习,因为实在太强大了。 1) 获取远程主机的系统类型及开放端口nmap -sS -P0 -sV -O 这里的 < target > 可以是单一 IP, 或主机...原创 2018-08-27 09:13:48 · 11026 阅读 · 2 评论