Master Linux operation and maintenance management tools Daquan

1. Unified account management

1.LDAP

Unified management of various platform accounts and passwords, including but not limited to various operating systems (Windows, Linux), Linux system sudo integration, system user grouping, host login restrictions, etc.; compatible with Apache, HTTP, FTP, SAMBA, ZABBIX, Jenkins and other integration; support password policy (password strength, password expiration time, forced modification, account lockout after exceeding the number of verification errors), etc.; support plug-in authentication module PAM; setting and division of permissions on different platforms;

 

2.JumpServer

An open source springboard machine (fortress machine) system written in python, which realizes the functions that the springboard machine should have. It is managed based on the ssh protocol, and the client does not need to install an agent. Currently, this version is in the beta stage, and it should be used with caution in the online environment. I tried the demo, and I feel that it is not mature in terms of unified account management.

 

3.NIS

Similar to LDAP.

 

2. Automated deployment

1. Fabric

Advantages: small size, no need to install agent, can do some simple server deployment operations, easy to use, easy to use, but the function is relatively limited, it took two days to switch to ansible;

Disadvantage: The deployment machine is not very friendly to interact with the server.

 

2. Ansible

Advantages: No agent is required, based on ssh implementation, it is good to initialize and expand the newly applied machine; there are many features, and the functions required for daily deployment are basically covered, such as git, packaging and decompression, copy files, yum installation, etc. have been integrated In the core module, alternatives, xattr and other modules are also integrated. Of course, in theory, all operations can be done with the command module.

Disadvantages: It is more dependent on the robustness of the network, if the network is not good, it will be more pitted;

There are also SaltStack, Pupet, Chef, etc.

 

3. DNS

1. dnsmasq

Provide DNS caching, DNS redirection, record forwarding, DNS reverse resolution, DHCP service functions, and simple configuration;

You can configure polling request records for the upper-layer DNS, and the configuration supports wildcards without batch modification of hosts.

 

2. pdnsd

Provide DNS caching service;

Set the request method to the upper-level DNS (TCP, UDP, Both), set up multiple upper-level DNS and set the request rules, and configure the cache retention time.

 

3. namebench

A DNS speed test tool developed by Google.

 

4. Stress test

1. ApacheBench

创建多并发线程模拟多用户对URL访问进行压力测试

Apache中有个自带的,名为ab的程序,ab可以创建很多的并发访问线程,模拟多个访问者同时对某一URL地址进行访问。

 

2. TCPcopy、UDPcopy

直接对某一机器流量copy到另一机器进行压力测试;

提到压力测试,可能大多数人首先想到的就是ApacheBench,但ab是模拟访问,模拟毕竟是模拟,然而线上会遇到的错误可能往往无法预知,其实国内已经有人开发了一款线上流量copy的工具,就是TCPcopy、UDPcopy,能够之间copy线上流量到测试环境,大大减少了上线前的风险。支持设置copy流量倍数放大、缩小,修改流量的客户端IP源地址。

 

3. TCPburn

类似ApacheBench

tcpburn是由网易自主研发的能够模拟千万级别并发用户的一个软件,目的是能够用较少的资源来模拟出大量并发用户,并且能够更加真实地进行压力测试, 以解决网络消息推送服务方面的压力测试的问题和传统压力测试的问题。

 

五、安全

1. PortSentry

对端口扫描的机器做防御策略;

特点:给出虚假的路由信息,把所有的信息流都重定向到一个不存在的主机;

自动将对服务器进行端口扫描的主机加到TCP-Wrappers的/etc/hosts.deny文件中,利用Netfilter机制、包过滤程序,比如iptables和ipchain等,把所有非法数据包(来自对服务器进行端口扫描的主机)都过滤掉;

通过syslog()函数给出一个目志消息,甚至可以返回给扫描者一段警告信息。

 

2.fail2ban

对SSH密码暴力破解的机器做防御策略;

防御 SSH 服务器的暴力破解攻击,对安全性要求过高的服务器还是建议禁止密码登入,使用密钥或者密钥+密码验证。

 

3. Google Authenticator

可以将第二部验证设置为通过短信或语音电话接收验证码,同时也支持 Android、iPhone 或 BlackBerry 设备来生成验证码;

一款开源的,可基于开放规则(如 HMAP/基于时间)生成一次性密码的软件。Google公司同时也支持插件式鉴别模块PAM,使其能和其他也适用PAM进行验证的工具(如OpenSSH)协同工作。

 

4. knockd

害怕服务器被入侵,但是奈何经常在不同的地方登入或者登入的IP经常变动?knock一下吧。在服务器端设置只有你知道的“暗语”来让服务器给你芝麻开门。

knockd可以让server监听特定的端口,如果client按指定的顺序及协议(TCP/UDP)访问server指定端口,则运行指定命令,于是我们就可以用它来做一些有趣的事,比如利用IPTABLES动态增加防火墙等等。
另外,knock client也可以用来模拟发包探测网络连通性。比如不确定本机到对端的某个端口是否可通,可以在远程用tcpdump监听对应端口,然后用knock客户端模拟发包。

 

六、虚拟化

1.vagrant

每次用想要新建一个虚拟机是不是都得设置虚拟机名称?设置虚拟机类型、版本、选择镜像、内存大小、虚拟机CPU核心数量、设备等一堆东西,然后还要装系统。。。

然而我只需要在终端下面输入一条vagrant up machine 就能新建一个预配置好的虚拟机哦,实为自己测试和给开发人员创建统一编程环境的一个好选择。

  • 支持快速新建虚拟机

  • 支持快速设置端口转发

  • 支持自定义镜像打包(原始镜像方式、增量补丁方式)

  • 基本上日常能用到的基础配置都能快速设置

  • 支持开机启动自动运行命令

  • 可以自己写扩展

 

2.docker

每次搭建一套新环境是不是很麻烦?有两个不同程序依赖于同一环境的不同版本怎么办?在程序里指定绝对路径?做软链接?

docker帮你解决了这个烦恼,镜像打包好之后推送到register之后再到对应机器上pull下来,放上代码,done..

 

七、日志采集

1. ELK

平常我们可能需要对一些日志进行分析、报警,比如nginx日志,我们想要统计http请求响应码的数量、统计请求IP的地域分布,对请求体的关键字及时报警等等。使用ELK能够很容易地做到上述事情,还能结合zabbix等工具进行报警。

 

八、监控

1. smokeping

IDC选址很头疼吧,不知道某一节点网络质量怎样,不相信供应商给的数据?试试smokeping吧,能够测试某地、多地到某一节点的质量情况(包括丢包率,速率)


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325257817&siteId=291194637