localhost

http://localhost/ not working on Windows 7. What's the problem?

[亡魂溺海] 提交于 2019-12-17 10:47:13
问题 I have a big problem opening http://localhost/ on Windows 7 (beta). I installed this os and everything went great; when I installed Wamp I saw that localhost is not working at all. I just see this error: Failed to Connect Firefox can't establish a connection to the server at localhost. in Mozilla and Explorer. I removed Wamp and after some weeks (that means two weeks from today) I installed NetBeans on Windows 7. I created a test PHP script and when I debug it, I get the same error again. I

Can't see localhost from UWP app

怎甘沉沦 提交于 2019-12-17 10:42:56
问题 I’m working on UWP app on my laptop. On a previous laptop with a pre-release Windows 10, I was able to get my app to see my web API service on localhost, but on this laptop, no matter what I try, I always get this error using HTTP client: A connection with the server could not be established var response = await client.GetAsync(BuildGetRequest()).AsTask(source.Token); If I point to my published service on Azure, everything works fine. Here’s what I have tried: Allowed local network loopback

Tomcat项目部署方式

佐手、 提交于 2019-12-17 10:22:31
一、静态部署 1、直接将web项目文件件拷贝到webapps 目录中 Tomcat的Webapps目录是Tomcat默认的应用目录,当服务器启动时,会加载所有这个目录下的应用。所以可以将JSP程序打包成一个 war包放在目录下,服务器会自动解开这个war包,并在这个目录下生成一个同名的文件夹。一个war包就是有特性格式的jar包,它是将一个web程序的所有内容进行压缩得到。具体如何打包,可以使用许多开发工具的IDE环境,如Eclipse等。也可以用 cmd 命令:jar -cvf mywar.war myweb webapps这个默认的应用目录也是可以改变。打开Tomcat的conf目录下的server.xml文件,找到下面内容: <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> 将appBase修改即可。 2、在server.xml中指定 在Tomcat的配置文件中,一个Web应用就是一个特定的Context,可以通过在server.xml中新建Context里部署一个JSP应用程序。打开server.xml文件,在Host标签内建一个Context,内容如下。

Why doesn't zeromq work on localhost?

一曲冷凌霜 提交于 2019-12-17 08:28:34
问题 This code works great: import zmq, json, time def main(): context = zmq.Context() subscriber = context.socket(zmq.SUB) subscriber.bind("ipc://test") subscriber.setsockopt(zmq.SUBSCRIBE, '') while True: print subscriber.recv() def main(): context = zmq.Context() publisher = context.socket(zmq.PUB) publisher.connect("ipc://test") while True: publisher.send( "hello world" ) time.sleep( 1 ) But this code doesn't * work: import zmq, json, time def recv(): context = zmq.Context() subscriber =

Can't connect to MySQL server on '127.0.0.1' (10061) (2003)

怎甘沉沦 提交于 2019-12-17 08:25:08
问题 I know this question was asked a lot before but I tried some of the solutions which were given and nothing worked.. I have downloaded MySQL Workbench 6.1 on my windows 7 x64 and now as I want to start and do a simple DB I set a new MySQL Connection and let it as default the Hostname, port and the username I just set the name of the connection. In the beginning it was showing down in the action output that Could not connect.Server may not be run and in the msg part it was written Can't connect

ansible-安装与使用

我与影子孤独终老i 提交于 2019-12-17 06:26:59
1.安装ansible: 环境为centos7。 1) epel 采用阿里源的epel。安装方式连接:http://mirrors.aliyun.com/help/epel 2)yum install -y ansible 查看安装成功: ansible --help 2.ansible 测试 1)本机ssh无密码登录 >ssh-keygen >cat id_rsa.pub > authorized_keys 测试:ssh -l root localhost 登录成功 2)在ansible的host中增加本机 vi /etc/ansible/hosts 在localhost增加本机ip。我的pc地址为172.125.1.20。 3)ansible localhost -m ping 得到结果 172.125.1.20 | SUCCESS => { "changed": false, "ping": "pong" } 证明ansible安装成功。 来源: https://www.cnblogs.com/felixwa/p/6209067.html

RMI connection refused on localhost

孤者浪人 提交于 2019-12-17 06:18:56
问题 I am trying to learn RMI coding and when I run server side of RMI I get connection refused. This is my server main method public static void main(String[] args)throws Exception { Implementation impl=new Implementation(); Naming.rebind("//localhost:2020/RMI", impl); System.out.println("Implementation has been bind to the name RMI and is ready for use"); } I believe that the code for Implementation does not matter as it simply is the implemented interface that will run the code. The exception I

Linux安装mysql数据库

帅比萌擦擦* 提交于 2019-12-17 05:58:25
一.安装mysql 1.检查和卸载 # mysqlyum list installed mysql* # rpm -qa|grep -i mysql 1.1安装过并且需要卸载 # service mysql stop # rpm -ev MySQL-client-5.5.25a-1.rhel5 # rpm -ev MySQL-server-5.5.25a-1.rhel5 1.1.1删除原来的mysql目录 # find / -name mysql # whereis mysql # /var/lib/mysql # /var/lib/mysql/mysql # /usr/lib64/mysql # rm -rf /var/lib/mysql # rm -rf /var/lib/mysql # rm -rf /usr/lib64/mysql 1.1.2手动删除my.cnf文件 # rm -rf /etc/my.cnf 1.1.3检查是否删除干净 # rpm -qa|grep -i mysql 卸载依赖 # yum remove mysql-libs # yum remove mysql-server # yum remove perl-DBD-MySQL # yum remove mysql 或者 # yum remove mysql-community-client mysql

java 使用 pdf.js 在线查看 pdf 文档

大城市里の小女人 提交于 2019-12-17 05:23:34
1. 下载对应的 pdf.js 文件:   推荐地址: https://github.com/mozilla/pdf.js/ http://mozilla.github.io/pdf.js/ 2. 下载完成后打开对应的 viewer.js 文件。 可以看到,默认打开的是 compressed.tracemonkey-pldi-09.pd f文件,如果后面我们需要打开我们指定的地址,于是清空默认地址。 3. 这样,我们就可以使用传递 file 形参来动态指定打开的 pdf 文件,如: 1 http://localhost:8080/mypdf/web/viewer.html?file=123.pdf Tips: 必须加载到服务器访问 4. 现在我们利用 controller 来动态找到磁盘的 pdf 并加载显示: 1    @RequestMapping(value = "showViewPDF") 2 public void showViewPDF() throws IOException { 4 File f = new File("d:/aaa/123.pdf"); 5 getResponse().reset(); 6 getResponse().setContentType("multipart/form-data"); 7 getResponse().setHeader(

ZooKeeper系列(三)

僤鯓⒐⒋嵵緔 提交于 2019-12-17 05:15:17
前面虽然配置了集群模式的Zookeeper,但是为了方面学建议在伪分布式模式的Zookeeper学习Zookeeper的shell命令。 一、Zookeeper的四字命令 Zookeeper支持某些特定的四字命令字母与其的交互。他们大多数是查询命令,用来获取Zookeeper服务的当前状态及相关信息。用户在客户端可以通过telnet或nc向Zookeeper提交相应的命令。Zookeeper常用的四字命令见图1.1所示。 图 1.1 图1.2是Zookeeper四字命令的一个简单用例。 [root@hadoop ~]# echo ruok|nc localhost 2181 [root@hadoop ~]# zkServer.sh start zoo1.cfg JMX enabled by default Using config: /usr/local/zk/bin/../conf/zoo1.cfg Starting zookeeper ... STARTED [root@hadoop ~]# zkServer.sh start zoo2.cfg JMX enabled by default Using config: /usr/local/zk/bin/../conf/zoo2.cfg Starting zookeeper ... STARTED [root@hadoop ~]