Firewall 命令

一、查看系统防火墙状态(如果返回 running 代表防火墙启动正常)

firewall-cmd --state

二、开启端口外网访问

1、添加端口 返回 success 代表成功(--permanent永久生效,没有此参数重启后失效)

firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent

开放多个端口

firewall-cmd --zone=public --add-port=80-85/tcp --permanent

2、重新载入 返回 success 代表成功

firewall-cmd --reload

3、查看 返回 yes 代表开启成功

firewall-cmd --zone=public --query-port=80/tcp

继续阅读 »

Unable to negotiate with x.x.x.x port xx: no matching host key type found. Their offer: ssh-rsa

背景

最近升级git到最新版 发现pull代码报错

$ git version
git version 2.33.1.windows.1

$ git pull
Unable to negotiate with 47.98.49.44 port 22: no matching host key type found. Their offer: ssh-rsa
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

继续阅读 »

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捆绑安装

继续阅读 »

Vue的钩子函数[路由导航守卫、keep-alive、生命周期钩子]

前言

说到Vue的钩子函数,可能很多人只停留在一些很简单常用的钩子(created,mounted),而且对于里面的区别,什么时候该用什么钩子,并没有仔细的去研究过,且Vue的生命周期在面试中也算是比较高频的考点,那么该如何回答这类问题,让人有眼前一亮的感觉呢...

Vue-Router导航守卫:

有的时候,我们需要通过路由来进行一些操作,比如最常见的登录权限验证,当用户满足条件时,才让其进入导航,否则就取消跳转,并跳到登录页面让其登录。

为此我们有很多种方法可以植入路由的导航过程:全局的, 单个路由独享的, 或者组件级的,推荐优先阅读路由文档

继续阅读 »

下载安装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

... ...

继续阅读 »