localhost

elasticsearch的基本用法

天大地大妈咪最大 提交于 2019-12-06 14:42:45
开始学习使用 elasticsearch, 把步骤记录在这里: 最大的特点: 1. 数据库的 database, 就是 index 2. 数据库的 table, 就是 tag 3. 不要使用browser, 使用curl来进行客户端操作. 否则会出现 java heap ooxx... curl: -X 后面跟 RESTful : GET, POST ... -d 后面跟数据。 (d = data to send) 1. create: 指定 ID 来建立新记录。 (貌似PUT, POST都可以) $ curl -XPOST localhost:9200/films/md/2 -d ' { "name":"hei yi ren", "tag": "good"}' 使用自动生成的 ID 建立新纪录: $ curl -XPOST localhost:9200/films/md -d ' { "name":"ma da jia si jia3", "tag": "good"}' 2. 查询: 2.1 查询所有的 index, type: $ curl localhost:9200/_search?pretty=true 2.2 查询某个index下所有的type: $ curl localhost:9200/films/_search 2.3 查询某个index 下, 某个

Linux - CentOS 7 通过Yum源安装 MySql 5.7

走远了吗. 提交于 2019-12-06 14:41:52
添加MySQL Yum存储库 从官网下载最新的mysql源 官网地址: https://dev.mysql.com/downloads/repo/yum/ 选择并下载适用于平台的发行包。 然后,在Linux上打开终端并输入命令进行下载: wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm 使用以下命令安装下载的发行包 -Uvh:升级软件包 rpm -Uvh mysql80-community-release-el7-3.noarch.rpm 选择发行版本,进行安装 使用MySQL Yum存储库时,默认情况下会选择要安装的最新GA版本MySQL。 如果这是您想要的,则可以跳到下一步。 默认情况下,默认启用最新GA系列(当前为MySQL 8.0)的子存储库,而所有其他系列(例如,MySQL 5.7系列)的子存储库均被禁用。 使用此命令可查看MySQL Yum存储库中的所有子存储库,并查看已启用或禁用了哪些子存储库。 列出所有版本 yum repolist all | grep mysql 发现8.0版本是enabled的,5.7版本是disabled的 这里我们需要安装5.7版本的,所以把8.0的进行禁用,然后再启用5.7版本 先禁用8.0版本: yum-config-manager -

How do I modify my Web API server code to add a Access-Control-Allow-Origin' header?

心已入冬 提交于 2019-12-06 14:33:13
I have a Web API app and am able to call its REST methods with a Windows forms util; I want to call them from an HTML/jQuery util, too, and tried to do so by following along with this tutorial . And I find info that indicates that I need to somehow add a directive on the server side allowing this type of call, such as from here . ...but do not know exactly what I need to add, and where, to get this to work. The specific message I get in the browser Console (in Chrome) is: XMLHttpRequest cannot load http://localhost:28642/api/VendorItems/GetAll. No 'Access- Control-Allow-Origin' header is

redis-exporter监控redis多实例

青春壹個敷衍的年華 提交于 2019-12-06 14:24:22
redis_exporter 项目地址: https://github.com/oliver006/redis_exporter version: 0.x.x 启动步骤 0.x.x版本使用一个exporter监控redis多实例启动方法 1.启动 redis_exporter nohup ./redis_exporter -redis.addr=redis://localhost:6379,redis://localhost:6380 -web.listen-address :50003 & 2.添加 prometheus 配置(也可添加在自动发现文件中) - job_name: 'redis_exporter' static_configs: - targets: - 127.0.0.1:9121 3.重载 prometheus 配置 curl -X POST http://localhost:9090/-/reload version 1.x.x 注意事项 1.x 版本监控redis多实例启动方式发生了变化,详情参考 github中的pr 注意添加 -redis.addr ,否则会试图连接本地6379端口 启动步骤 1.启动 redis_exporter [root@test-125 redis_exporter-v1.3.4.linux-amd64]# nohup .

sequel 远程连接 MySQL 连接错误Can't connect to MySQL server on (61)

假如想象 提交于 2019-12-06 14:23:40
Mac sequel Pro链接时报错Can’t connect to MySQL server on ‘xx.xx.xx.xx’ (61)。 PS. win版Navicat 报错Can’t connect to MySQL server on ‘xx.xx.xx.xx’ (10038) 其中xx.xx.xx.xx是ip地址。 1、查看该用户是否有远程登录的权限 mysql> SELECT * FROM mysql.user; +-----------+-----------+ | User | Host | +-----------+-----------+ | M | % | | mysql.sys | localhost | | root | localhost | | tommy | % | | showhilllee | % | +-----------+-----------+ 5 rows in set (0.00 sec)   很显然,M是允许从其它服务器登陆的。 2、查看 MySQL Server 是不是监听了 3306 端口   执行命令 netstat -tulpen netstat -tulpen Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address

Ubantu 安装Laravel

与世无争的帅哥 提交于 2019-12-06 14:03:12
Ubantu 安装Laravel Ubuntu版本 :14.04 1 安装apche mysql php 安装apachesudo apt-get install apache2 localhost有apache页面显示即可 //阿里云显示错误 Err http://mirrors.aliyun.com/ubuntu/ trusty-updates/main apache2-bin amd64 2.4.7-1ubuntu4.4 //即可 sudo apt-get update 安装phpsudo apt-get install php5 libapache2-mod-php5 //重启apache 加载php模块 sudo service apache2 restart 新增sudo vim /var/www/html/php_info.php,输入内容 <?php phpinfo(); ?> 浏览器输入localhost/php_info.php,浏览到php配置信息即为正确. 安装MySQLsudo apt-get install mysql-server mysql-client 过程中设置MySQL密码请谨记 安装phpmyadminsudo apt-get install phpmyadmin 过程中设置服务器类型和phpmyadmin密码 phpmyadmin安装完后

502 Bad Gateway - NGINX no resolver defined to resolve

最后都变了- 提交于 2019-12-06 13:41:24
I have created a proxy pass for multi URLs. listen 80; listen [::]:80; server_name ~^(.*)redzilla\.11\.75\.65\.21\.xip\.io$; location / { set $instname $1; proxy_pass http://${instname}redzilla.localhost:3000; } When I call to this service using chrome, It was triggered 502 error. http://test.redzilla.11.75.65.21.xip.io/ I put below location tag by hard coding the URL. location /redzilla { proxy_pass http://test.redzilla.localhost:3000; } Then It is working for only above URL. I want to know how to create proxy pass for multiple URL within single location tag. ( please note : URL pattern is *

Missing a Temporary Folder

眉间皱痕 提交于 2019-12-06 13:18:33
I'm working on a mac OSX 10.8 using the built in apache server and php/mysql to develop on moodle 2.4 the problem i'm having is that why I try and upload anything I get the error message PHP is missing a Temporary Folder. I then downloaded the live copy onto my laptop as i know this is working, and still got the same error on my localhost. How can i fix this? Open your php.ini file look at the value for upload_tmp_dir and double check that the path exists. And that apache has write access to it also, obviously. Just to add to this, on windows refer to the same upload_tmp_dir setting in your

How to intercept local server web requests using Burp in Internet Explorer

限于喜欢 提交于 2019-12-06 13:14:32
问题 I have properly configured Burp to intercept at a proxy location at 127.0.0.1:9090 My Internet Explorer proxy settings are as follows: Also I have a webserver named WebGoat running in http://localhost:8080/WebGoat/ All the requests are not being intercepted by Burp, in any way. What Should I do? 回答1: Try adding a '.' after "localhost". This should solve your problem. eg. http://localhost.:8080/WebGoat/ This will force the localhost to use the same proxy settings as one would with an internet

CentOS7安装mysql8.0.12

。_饼干妹妹 提交于 2019-12-06 13:06:29
一、配置yum源 1.下载mysql源安装包 2.安装mysql源 3.检查是否安装成功 4.修改安装版本(非必须) 二、安装mysql 三、启动mysql服务 1.启动 2.查看启动状态 3.设置开机启动 四、配置及部分命令 1.修改登录密码 2.添加远程登录用户 3.sqlyog链接时出现2058异常 4.修改默认编码方式 5.部分参数配置查询命令 五、彻底卸载mysql 1.卸载软件 2.删除文件 一、配置yum源 1.下载mysql源安装包 在MySQL官网中下载YUM源rpm安装包:http://dev.mysql.com/downloads/repo/yum/ 复制下载链接:https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm 本次下载目录为:/home/目录,因此进入:cd /home 执行下载命令: wget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm 2.安装mysql源 下载完成后使用下面命令安装源: yum localinstall mysql80-community-release-el7-1.noarch.rpm 3.检查是否安装成功 yum repolist enabled |