ssh tunnel 实现内网穿透

Submitted by dravenk on Wed, 08/08/2018 - 16:06

所需条件:  

一台具有公网地址的服务器

一台局域网内的电脑    

在内网的电脑上执行:  

ssh -qTfNn -R '[::]:8787:localhost:8887' User@RemoteHost

解释:访问远程服务器(RemoteHost)的 8787 端口,会将访问转发到内网电脑的 8887 端口。  

还需要  

vim /etc/ssh/sshd_config

加上 

GatewayPorts yes

 

解决Mac下tar命令打包文件产生._文件

Submitted by dravenk on Tue, 05/08/2018 - 10:24
例如,我需要将当前目录下的 back 文件夹用tar命令使用gzip方式压缩,按下面的命令打包文件夹后,会在当前目录生产back.tar.gz压缩文件:
sudo COPYFILE_DISABLE=1 tar -zcvf back.tar.gz back

Cannot load Xdebug - it was already loaded

Submitted by dravenk on Fri, 05/04/2018 - 15:48
dravenk:d8 longxianwen$ php -v
Cannot load Xdebug - it was already loaded
PHP 7.2.5 (cli) (built: Apr 26 2018 12:07:32) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
    with Zend OPcache v7.2.5, Copyright (c) 1999-2018, by Zend Technologies

检查php配置文件所在目录