localhost

kafka 安装与配置

落花浮王杯 提交于 2019-12-21 14:39:01
下载 地址: https://kafka.apache.org/downloads 这里下载的是kafka_2.11-0.11.0.1.tgz 解压 tar -xzf kafka_2.11-0.11.0.1.tgz cd kafka_2.11-0.11.0.1 启动zookeeper $ bin/zookeeper-server-start.sh config/zookeeper.properties 默认使用的2181端口,可在配置文件修改。 启动kafka server bin/kafka-server-start.sh config/server.properties (非本地生产者和消费者访问Kafka,记得修改 config/server.properties中的listeners, 例如 listeners=PLAINTEXT://192.168.33.152:9092) create a topic bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test 查看topic bin/kafka-topics.sh --list --zookeeper localhost:2181 好像没有输出 启动生产者 $ bin

Localhost Server Refusing Connection

烈酒焚心 提交于 2019-12-21 12:29:49
问题 I just set up Django on a dreamhost server. Ran through everything, but can't seem to get the welcome page. I got to the point where it says "Development server is running at 127.0.0.1:8002 (tried with 8000 but got the "that port is already in use error). When I try to access that address in my browser in Chrome I get Error 102 (net::ERR_CONNECTION_REFUSED): The server refused the connection. Any idea why this is happening? I am stuck in a loop, I have no clue what is going on. Help is

How to validate HTML/CSS running in localhost?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 12:28:02
问题 I have some local web pages running dynamically in localhost that need to be validated, Doing cut n paste is an option but very tedious. What are some alternative offline validation options for HTML/CSS pages? 回答1: Install unicorn locally. 回答2: Firefox's Web Developer toolbar has a "Validate local" option. 回答3: Try out the HTML Validator extension for Firefox - works locally. 回答4: You can download the local page using curl and then validate it using a local validator or post again using curl

receiving UDP packets send to 127.0.0.1 when using SO_REUSEADDR

廉价感情. 提交于 2019-12-21 09:24:39
问题 I am trying to make a set of applications discover each other using UDP and broadcasting messages. The applications will periodically send out an UDP packet saying who they are and what they can do. Initially we only use to broadcast to INADDR_BROADCAST. All applications share the same port to listen to (hence the SO_REUSEADDR). An event kernel object is attached to the socket so we get notified when we can fetch a new packet and use that in a WaitFor loop. The socket is used async. Opening

springcloud~服务注册与发现Eureka的使用

假装没事ソ 提交于 2019-12-21 08:49:21
服务注册与发现是微服务里的概念,也是一个基本的组件,负责服务组件的认证,即实现『你是谁』的功能,在服务注册与发现里,存在两种模式,即服务端发现和客户端发现,咱们今天说的eureka属于客户端发现! 下面概念来自文章:https://blog.csdn.net/forezp/article/details/73017664 下面看几个服务注册与发现的基本概念: Register:服务注册 当Eureka客户端向Eureka Server注册时,它提供自身的元数据,比如IP地址、端口,运行状况指示符URL,主页等。 Renew:服务续约 Eureka客户会每隔30秒发送一次心跳来续约。 通过续约来告知Eureka Server该Eureka客户仍然存在,没有出现问题。 正常情况下,如果Eureka Server在90秒没有收到Eureka客户的续约,它会将实例从其注册表中删除。 建议不要更改续约间隔。 Fetch Registries:获取注册列表信息 Eureka客户端从服务器获取注册表信息,并将其缓存在本地。客户端会使用该信息查找其他服务,从而进行远程调用。该注册列表信息定期(每30秒钟)更新一次。每次返回注册列表信息可能与Eureka客户端的缓存信息不同, Eureka客户端自动处理。如果由于某种原因导致注册列表信息不能及时匹配,Eureka客户端则会重新获取整个注册表信息。

MySQL用户管理-创建、授权、查看、删除

混江龙づ霸主 提交于 2019-12-21 08:21:07
测试环境 服务器版本:WSL 2 Ubuntu 18.04 MySQL版本:5.7.28-0ubuntu0.18.04.4 (Ubuntu) 在开始之前,请确保服务器已安装 MySQL,并拥有 root 权限。 创建一个新的用户账号 MySQL 中的用户账号是由用户名和主机名组成,例如 'root'@'localhost' 。 运行以下命令即可创建一个用户名为 database_user ,密码为 user_password 的用户: mysql> CREATE USER '`database_user`'@'localhost' IDENTIFIED BY '`user_password`'; 上述命令中,主机名为 localhost ,表示只能从本地主机(即运行该 MySQL Server 的服务器),如果要授予该用户来自其他主机的访问权限,只需将 localhost 改为远程登录 IP 或者 % , % 表示通配符,意味着该用户能够从任何主机进行远程连接。 如果不确定用户是否存在,可以使用以下命令: mysql> CREATE USER IF NOT EXISTS '`database_user`'@'localhost' IDENTIFIED BY '`user_password`'; 修改MySQL用户密码 其实不同的 MySQL 版本修改用户密码的命令是不一样的。

Why does my service always bind to ipv6 localhost instead of ipv4?

匆匆过客 提交于 2019-12-21 07:36:35
问题 I have a service that creates a ServerSocket and binds to localhost:7060 . When I did "netstat -an" on my android device, I see it is using ipV6 localhost instead of ipv4 localhost interface. The output is like this: tcp6 0 0 ::ffff:127.0.0.1:7060 :::* LISTEN The ports that use ipV4 are listed like this: tcp 0 0 127.0.0.1:5060 0.0.0.0:* LISTEN What is the trick to force it to use IPv4 always? I am setting up a port forward rule using iptables. The version I have supports ipv4 destination

Enable ZipArchive on localhost [closed]

僤鯓⒐⒋嵵緔 提交于 2019-12-21 07:34:34
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I need to enable ZipArchive php class on my localhost , How can I enable it !? 回答1: add extension=zip.so to your php.ini if you already have it installed (not sure what OS you're on) Linux: pecl install zip Restart the web server once php.ini is edited. 来源: https://stackoverflow.com/questions/12477837/enable

How can I get Yahoo OAuth to work when I develop locally when my local domain is not registered with Yahoo?

若如初见. 提交于 2019-12-21 07:26:25
问题 I'm working on an app that uses Yahoo OAuth. The OAuth had been working fine but I just registered my domain with Yahoo and now it will not let me use the OAuth when I develop locally because "Custom port is not allowed or the host is not registered with this consumer key." The issue is because my call back URL is to a domain that is not registered with Yahoo (http://localhost:8080/welcome). I'm not sure what to do. I'm also new to development so if you could be specific with suggestions that

四,Spring Cloud 网关

梦想的初衷 提交于 2019-12-21 05:16:21
Spring Cloud 网关 EnableZuulProxy 新建项目 ApiGetway pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.9.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.example</groupId> <artifactId>demo</artifactId>