host

docker-compose.yml常用命令

不想你离开。 提交于 2019-12-07 05:57:56
一 简介 docker-compose.yml是Compose的默认模板文件。该文件有多种写法,例如Version 1 file format、Version 2 file format、Version 2.1 file format、Version 3 file format等。其中,Version 1 file format将逐步不再使用,Version 2.x及Version 3.x基本兼容,是未来的趋势。考虑到目前业界的使用情况,本篇讨论Version 2 file format下的常用命令。 二 命令说明 1 build 配置构建时的选项,Compose会利用它自动构建镜像。build的值可以是一个路径,例如: build: ./dir 也可以是一个对象,用于指定Dockerfile和参数,例如: build: context: ./dir dockerfile: Dockerfile-alternate args: buildno: 1 2 command 覆盖容器启动后默认执行命令: command: bundle exec thin -p 3000 也可以是一个list,类似于Dockerfile中的CMD指令,格式如下: command: ["bundle", "exec", "thin", "-p", "3000"] 3 dns 配置DNS服务器。可以是一个值

Unknown Host error when attempting to connect to connect to Eclipse plugin repository

时间秒杀一切 提交于 2019-12-07 05:02:19
问题 I am running Ubuntu 9.10 and I'm attempting to install a plugin for Eclipse 3.5 from a repository that my company created. This worked in the past on this linux box and also works just fine on my laptop which has Windows XP installed. The exact error message I'm getting in Eclipse is: Unknown Host: <location of repository> org.eclipse.equinox.internal.provisional.p2.core.ProvisionException Any ideas what might be causing something that used to work not to work anymore? Thanks! EDIT: Also, it

怎样启动、关闭和重新启动oracle监听器 in linux

北城以北 提交于 2019-12-07 04:23:34
对于DBA来说,启动和关闭oracle监听器是很基础的任务,但是Linux系统管理员或者程序员有时也需要在开发数据库中做一些基本的DBA操作,因此了解一些基本的管理操作对他们来说很重要。 本文将讨论用LSNRCTL命令启动、关闭和查看监听器的状态的方法。 怎样启动、关闭和重新启动oracle监听器 在启动、关闭或者重启oracle监听器之前确保使用lsnrctl status命令检查oracle监听器的状态。除了得到监听器的状态之外,你还可以从lsnrctl status命令的输出中得到如下的信息: 监听器的启动时间 监听器的运行时间 监听器参数文件listener.ora的位置,通常位于$ORACLE_HOME/network/admin目录下 监听器日志文件的位置 如果oracle监听器没用运行,你将得到如下的信息 view plaincopy to clipboardprint? $ lsnrctl status LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:27:39 Copyright (c) 1991, 2007, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)

PHP:6种GET和POST请求发送方法

纵然是瞬间 提交于 2019-12-07 03:26:43
在 i94web 博客中,我试过了畅言和多说两种社会化评论框,后来还是抛弃了畅言,不安全。 无论是畅言还是多说,我都需要从远程抓取文章的评论数,然后存入本地数据库。对于多说,请求的格式如下: // 获取评论次数,参数是文章ID function getCommCount($postid) { $jsondata = file_get_contents("http://api.duoshuo.com/threads/counts.json?short_name=i94web&threads=$postid"); // 设置true返回数组,不设置或者是false则返回对象 $resjson= json_decode($jsondata,true); return $resjson['response'][$postid]['comments']; } 对于远程请求,有很多种方法。今天,LZ就搜罗了六种,供大家参考。 1、用file_get_contents 以get方式获取内容: <?php $url = 'http://www.ido321.com/' ; $html = file_get_contents ( $url ); echo $html ; ?> 2、用fopen打开url,用get方式获取 $fp = fopen($url, 'r'); stream_get_meta

Copy Razor-Views for Self-hosting NancyFx?

坚强是说给别人听的谎言 提交于 2019-12-07 03:09:34
问题 I started out with a simple MVC-site using NancyFx with Razor-views ( .cshtml ) and Nancy.Hosting.Aspnet , using IIS Express. Now I adapted the project to a self-hosting service using Nancy.Hosting.Self (and TopShelf). However, to provide the Views, it seems I need to change their properties from None & Do not copy to Content & Copy if newer , so they are copied to .\bin\Debug\ . One consequence is that changes to the Views will not be shown/updated until a restart. Even when working in debug

Linux安全攻略 SSH服务连接时常见问题解答

橙三吉。 提交于 2019-12-07 02:25:13
什么是SSH呢? SSH的英文全称是Secure SHell。通过使用SSH,你可以把所有传输的数据进行加密,这样"中间人"这种攻击方式就不可能实现了,而且也能够防止DNS和IP欺骗。还有一个额 外的好处就是传输的数据是经过压缩的,所以可以加快传输的速度。SSH有很多功能,它既可以代替telnet,又可以为ftp、pop、甚至ppp提供一 个安全的"通道"。SSH客户端与服务器端通讯时,用户名及口令均进行了加密,有效防止了对口令的窃听。最初SSH是由芬兰的一家公司开发的。但是因为受 版权和加密算法的限制,现在很多人都转而使用OpenSSH。OpenSSH是SSH的替代软件,而且是免费的,可以预计将来会有越来越多的人使用它而不 是SSH。SSH是由客户端和服务端的软件组成的。SSH安装容易、使用简单,而且比较常见,一般的Unix系统、Linux系统、FreeBSD系统都 附带有支持SSH的应用程序包。 SSH的安全验证是如何工作的? 从客户端来看,SSH提供两种级别的安全验证。 第一种级别(基于口令的安全验证)只要你知道自己帐号和口令,就可以登录到远程主机。所有传输的数据都会被加密,但是不能保证你正在连接的服务器就是你想连接的服务器。可能会有别的服务器在冒充真正的服务器,也就是受到"中间人"这种方式的攻击。 第二种级别(基于密匙的安全验证)需要依靠密匙,也就是你必须为自己创建一对密匙

SSRF漏洞攻击利用从浅到深

我的未来我决定 提交于 2019-12-07 01:51:04
梳理一下ssrf 不详细 简单记录 0x01 SSRF成因和基本利用 0x02 内网打未授权redis 0x03 关于ssrf打授权的redis 0x04 写redis shell和密钥的一点问题 0x05 SSRF Bypass 0x06 SSRFmap last 0x01 SSRF成因和基本利用 php vul function: file_get_contents () fsockopen () curl_exec() readfile() example: <? php function curl( $url ){ $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, $url ); curl_setopt( $ch , CURLOPT_HEADER, 0 ); curl_exec( $ch ); curl_close( $ch ); } $url = $_GET ['url' ]; curl( $url ); ?> <? php function Getfile( $host , $port , $link ){ $fp = fsockopen ( $host , intval ( $port ), $errno , $errstr , 30 ); if (! $fp ){ echo " $errstr (error

【笔记】docker的镜像笔记

冷暖自知 提交于 2019-12-07 01:35:07
【1】docekr镜像的save、load (1)查看要要保存的镜像的ID docker images (2)保存镜像 docker save spring-boot-docker -o /home/wzh/docker/spring-boot-docker.tar (3)加载镜像 可以在任何装 docker 的地方加载 刚保存的镜像了。 docker load -i spring-boot-docker.tar 【2】docker的export, import docker export -o pre_jdk8_centos.tar containerName docker的export,import是指docker的container 不是image。 千万不能export load/ save import混用,因为会导致启动不了container 【3】查看某container日志 docker logs -f -t --tail 100 containerName 【4】往/etc/hosts 写入host --add-host 在创建container的时候使用这个,多个host就使用多个这个参数 docker run --name predictionAlarm -itd --add-host hostname:ip -p 18022:18022 image

使用pip安装Python库超时解决办法

大憨熊 提交于 2019-12-06 23:09:35
如果在国内安装Python库,强烈推荐使用豆瓣的源 http://pypi.douban.com/simple/ 可以这样使用 pip install -i http: //pypi.douban.com/simple/ --trusted-host=pypi.douban.com/simple ipython 比如安装django pip install -i https://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com django 每次这样会很麻烦,配置一下 Windows下面可以这样配置 1、在C:\Users\Administrator\AppData\Roaming目录下新建文件夹pip, 2、在pip文件夹下新建pip.ini文件,然后在pip.ini 里输入 [global] timeout = 6000 index-url =http://pypi.douban.com/simple trusted-host = pypi.douban.com 来源: https://www.cnblogs.com/xu-xu/p/12000052.html

UnknownHostException: name or service not known

大城市里の小女人 提交于 2019-12-06 23:01:20
问题 I'm attempting to return some data from an API using OkHttpClient in com.squareup.okhttp. I've run into a few errors that i have eventually been able to overcome but i can't get past this host exception error and nothing on here seems to be specific enough to my case to be able to solve. Below is the code i have attempted along with the output with it, if anyone has any idea how to overcome the error i would appreciate it. CODE public void connect() { OkHttpClient client = new OkHttpClient();