localhost

在tomcat下部署工程

ⅰ亾dé卋堺 提交于 2020-01-14 09:00:02
xx系统第一期工程完成,今天老大要我去部署系统,从来就没有在tomcat下部署过,一直都是在myeclipse下部署、启动、运行即可,所以这次遇到了几个问题,记录下来。 tomcat启动 在安装tomcat后,配置好环境变量,双击tomcat\bin路径下的startup.bat,并没有出现我预期的命令框,而是一闪而过。这里肯定有错,至于是什么错误我还不知道,所以cmd命令启动报如下错误: The CATALINA_HOME enviernment variable is not defined correctly This environment variable is needed to run this program 大致的意思就是说运行这个程序需要的环境变量CATALINA_HOME没有定义。对于这个CATALINA_HOME是什么东东我还真的木有遇到过,百度一把:原来在Tomcat 4.0以后采用了新的Servlet容器Catalina,所以很显然CATALINA_HOME是tomcat运行时的环境变量,类似于JAVA_HOME。所以在环境变量中配置CATALINA_HOME=” D:\tomcat-6.0.29\tomcat-6.0.29”,该值为tomcat的解压(安装)路劲。 重新启动tomcat即可。 总结:

Sending email from localhost in php in windows

血红的双手。 提交于 2020-01-14 03:55:11
问题 I am using this very tiny piece code to test whether an email reaches the email destination: <?php mail('woodsy013@hotmail.com','Test mail','The mail function is working!'); echo 'Mail sent!'; ?> But it doesnt seem to be working. I am using WAMP. I have installed a free SMTP server. And my php.ini file is configured to the following: [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = smtp.tools.sky.com ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net

WebSocket Secure localhost connection

会有一股神秘感。 提交于 2020-01-14 02:53:28
问题 I've built a simple Node.js WebSocket chat server. I can run it on localhost in a terminal tab. In another terminal tab, I can connect to it with wscat , using ws:// . How do I connect to it on localhost with wss:// ? 回答1: Look at this example code for how to establish an HTTPS server which will handle the TCP and TLS layers and then the ws module can handle the websocket aspects integrating with that server. You'll need a TLS certificate. For development you can generate your own and sign it

mysql主从复制

烈酒焚心 提交于 2020-01-14 02:49:44
1、拓扑图 2、原理 从库生成两个线程,一个I/O线程,一个SQL线程; i/o线程去请求主库 的binlog,并将得到的binlog日志写到relay log(中继日志) 文件中; 主库会生成一个 log dump 线程,用来给从库 i/o线程传binlog; SQL 线程,会读取relay log文件中的日志,并解析成具体操作,来实现主从的操作一致,而最终数据一致; 3、如何安装第二个mysql mysql5.7版安装教程 1、同mysql5.7版安装教程第一步 2、同mysql5.7版安装教程第二步 3、用管理员身份运行cmd,执行mysqld --install命令(指定服务名) mysqld --install MySQL8.0.17MASTER --defaults-file=“D:\development-software\mysql\one-master-one-slave\mysql-8.0.17-winx64-master\my.ini” 4、修改注册表 HKEY_LOCAL_MACHINE–>SYSTEM–>CurrentControlSet–>Services 找到刚才创建的MySQL8.0.17MASTER,将ImagePath修改成如下 D:\development-software\mysql\one-master-one-slave\mysql-8

使用pypi-server搭建简单的PyPI源

心不动则不痛 提交于 2020-01-13 13:46:37
pypiserver 是一个最基本的PyPI服务器实现, 可以用来上传和维护python包. 本文介绍 pypiserver 在ubuntu上的基本安装, 配置和使用. 1. 基本安装和使用 1.1 安装和启动 pypiserver 可以在Python 2或者Python 3下运行. 使用 pip 就可以安装: pip install pypiserver 启动 pypiserver 使用以下命令: pypi-server 在没有显示指定任何启动参数的时候, pypiserver 是使用 ~/packages 来保存Python包, 同时监听8080端口来提供PyPI服务. 1.2 上传Python包 此时, 在创建 ~/packages 目录后, 可以将Python包上传到此目录下. 比如, 有一个Python项目叫 demo , 它的 setup.py 文件内容如下: from setuptools import setup setup( name='demo', version='0.0.1', packages=['demo'] ) 在项目根目录下执行以下命令来生成Python代码分发包: python setup.py sdist 执行完上面这条命令后, 可以在项目下的 dist 目录找到分发包 demo-0.0.1.tar.gz . 将分发包上传到 ~/packages

ReactJS localhost Ajax call: No 'Access-Control-Allow-Origin' header

半世苍凉 提交于 2020-01-13 05:49:41
问题 Working on the ReactJS tutorial I spinned up a local server with >npm install -g http-server >http-server -c-1 And got local server working fine located at http://localhost:8080 Though, when I attempted to use an AJAX call within one of my components, I got the following error in my chrome console: XMLHttpRequest cannot load http://localhost:8080/comment.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The

es6安装中文分词插件-ik(3)

浪子不回头ぞ 提交于 2020-01-12 21:51:27
IK官网: https://github.com/medcl/elasticsearch-analysis-ik/releases 如下图:下载对应版本即可 1 、进入elasticsearch安装目录,执行以下命令( elasticsearch-analysis-ik 可以下载对应版本): ./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.3.1/elasticsearch-analysis-ik-6.3.1.zip 2 、安装完毕之后 重启elasticsearch 3 、使用:查询是要带: -H 'Content-Type: application/json' 查看集群中所有的索引: curl -X GET 'http://192.168.1.107:9200/_cat/indices?v' 查看集群的所有节点 curl -X GET 'http://192.168.1.107:9200/_cat/nodes?v' 查看集群的健康情况 curl -X GET 'http://192.168.1.107:9200/_cat/health?v' 1.create a index :创建索引 curl -XPUT

Docker 打开远程API服务

自古美人都是妖i 提交于 2020-01-12 21:16:28
一.开发环境 1.系统环境 LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.6.1810 (Core) Release: 7.6.1810 Codename: Core 2.docker版本 Docker version 1.13.1, build 07f3374/1.13.1 二.步骤 1.查看docker配置文件路径 systemctl show --property=FragmentPath docker 2.编辑配置文件 ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 3.重启docker systemctl daemon-reload systemctl restart docker 三.测试 1.查看docker客户端服务端版本 docker -H localhost:2375 version Client: Version: 1.13.1 API version: 1.26 Package version: docker-1.13.1-88.git07f3374.el7.centos.x86_64

docker 安装mysql mongo

左心房为你撑大大i 提交于 2020-01-12 17:29:36
Docker安装Mysql 1.拉取镜像 docker pull mysql/mysql-server 2.运行mysql docker run -d -p 3306:3306 --name [Name] [ImageName] //示例 docker run -d -p 3306:3306 --name mysql01 mysql/mysql-server 3.进入容器 docker exec -it [ContainerName] bash //示例 docker exec -it mysql01 bash 4.进入mysql的命令行 命令行进入mysql的root账户: mysql -uroot -p 这时候操作mysql会报错 ,让修改密码 请看 常见错误解决模块 创建新用户 mysql> CREATE USER 'test'@'localhost' IDENTIFIED BY 'pwd123456'; mysql> GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost' WITH GRANT OPTION; mysql> CREATE USER 'test'@'%' IDENTIFIED BY 'pwd123456'; mysql> GRANT ALL PRIVILEGES ON *.* TO 'test'@'%' WITH

node-http创建服务端和客户端

China☆狼群 提交于 2020-01-12 17:12:22
http模块是nodeJS的核心模块。它可以创建客户端(发起请求)和服务端(监听请求)。 1. 客户端client 应用: 1. 爬虫 2. 中间层-解决跨域问题 let http = require('http'); // 服务端发送的请求不存在跨域问题 let client = http.request({ hostname: 'localhost', port: 3000, path: '/aaa?name=lyra', method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }, function(response) {// response可读流 response.on('data', function(data) { console.log(JSON.parse(data.toString())); }) }); // client相当于可写流 client.end("a=1&b=2");// 发送请求体 2. 服务端server let http = require('http'); let querystring = require('querystring'); let url = require('url'); let server = http