Centos8.2 Python3 安装Selenium+Chrome

前言

本来准备装Selenium+PhantomJS的,但是Selenium已经停止支持,果断更换Chrome.

/usr/local/lib/python3.6/site-packages/selenium/webdriver/phantomjs/webdriver.py:49: UserWarning: Selenium support for PhantomJS has been deprecated, please use headless versions of Chrome or Firefox instead
  warnings.warn('Selenium support for PhantomJS has been deprecated, please use headless '

安装Python3+Pip3

yum install -y python3-devel python3
python3 -V
Python 3.6.8
pip3 -V
pip 9.0.3 from /usr/lib/python3.6/site-packages (python 3.6)

注:pip3已和python3捆绑安装

继续阅读 »

下载安装Zabbix4.0 LTS

官网

https://www.zabbix.com

服务器版本

[root@localhost vhosts]# cat /etc/redhat-release 
CentOS Linux release 7.4.1708 (Core) 
[root@localhost vhosts]# php -v
PHP 5.4.16 (cli) (built: Mar  7 2018 13:34:47) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
[root@localhost vhosts]# mysql -V
mysql  Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1

... ...

继续阅读 »

Samba安装

#安装服务
yum install -y samba
#修改文件
vim /etc/samba/smb.conf
#文件尾部加以下内容后,保存退出
client lanman auth = yes
lanman auth = Yes
client ntlmv2 auth = no
#============================ Share Definitions ==============================
[homes]
        comment = Home Directories
        browseable = no
        writable = yes
... ...

继续阅读 »

mount: wrong fs type, bad option, bad superblock

mount: wrong fs type, bad option, bad superblock on sh2.cifang.org:/nfs/vhosts/img/,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

继续阅读 »

防止Memcached的DDOS攻击

攻击的原理

memcached反射攻击利用了在互联网上暴露的大批量memcached服务器(一种分布式缓存系统)存在的认证和设计缺陷,攻击者通过向memcached服务器IP地址的默认端口11211发送伪造受害者IP地址的特定指令UDP数据包(stats、set/get指令),使memcached服务器向受害者IP地址反射返回比原始数据包大数倍的数据(理论最高可达5万倍,通过持续跟踪观察攻击流量平均放大倍数在100倍左右),从而进行反射攻击。

互联网应急中心给出的3条建议:

1、在memcached服务器或者其上联的网络设备上配置防火墙策略,仅允许授权的业务IP地址访问memcached服务器,拦截非法的非法访问。

2、更改memcached服务的监听端口为11211之外的其他大端口,避免针对默认端口的恶意利用。

3、升级到最新的memcached软件版本,配置启用SASL认证等权限控制策略(在编译安装memcached程序时添加-enable-sasl选项,并且在启动memcached服务程序时添加-S参数,启用SASL认证机制以提升memcached的安全性)。

继续阅读 »