摘要: ik git 地址 https://github.com/medcl/elasticsearch-analysis-ik readme 包含各个版本ik对应的 es 版本 下载对应的ikzip包 命令如下 https://github.com/medcl/elasticsearch-analysis 阅读全文
posted @ 2016-05-04 20:28 jiang nan 阅读(2867) 评论(0) 推荐(0) 编辑
摘要: 本人目前使用的版本是2.0.0 client 基础代码如下 官网demo https://www.elastic.co/guide/en/elasticsearch/client/java-api/2.0/transport-client.html 官网给的demo 并没有设置setting 的方式 阅读全文
posted @ 2016-04-29 13:43 jiang nan 阅读(566) 评论(0) 推荐(0) 编辑
摘要: 下载解压elasticsearch-2.x.tar.gz 1.安装启动 安装监控插件 ./plugin install mobz/elasticsearch-head 修改es配置 elasticsearch2.0.0版本需要在启动之前修改 config elasticsearch.yml文件中的配 阅读全文
posted @ 2016-04-29 13:39 jiang nan 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 错误代码1045Access denied for user'root'@'localhost'(using password:YES)解决办法是重新设置root用户密码,在Windows平台下操作步骤如下:1、以系统管理员身份登录到系统;2、如果MySQL服务器正在运行,停止它。 如果是作为Win... 阅读全文
posted @ 2014-03-14 14:24 jiang nan 阅读(480) 评论(0) 推荐(0) 编辑
摘要: 编写一个工具类实现spring 的ApplicationContextAware接口代码如下: 1 package com.xnh.web.utils; 2 3 import org.springframework.beans.BeansException; 4 import org.springframework.context.ApplicationContext; 5 import org.springframework.context.ApplicationContextAware; 6 /** 7 * 8 * @author Kylin 9 *10 */11 public... 阅读全文
posted @ 2013-04-01 22:57 jiang nan 阅读(31812) 评论(0) 推荐(0) 编辑
摘要: cd /home/kylinwget http://www.fayea.com/apache-mirror/tomcat/tomcat-6/v6.0.36/bin/apache-tomcat-6.0.36.tar.gztar zxvf apache-tomcat-6.0.36.tar.gz cd /usr/local/mv /home/kylin/apache-tomcat-6.0.36 .vi /etc/profile将下面语句加到最后一行export TOMCAT_HOME=/usr/local/apache-tomcat-6.0.36搞定! 阅读全文
posted @ 2013-03-31 18:50 jiang nan 阅读(253) 评论(0) 推荐(0) 编辑
摘要: cd /home/kylin下载jdk wget https://edelivery.oracle.com/otn-pub/java/jdk/6u43-b01/jdk-6u43-linux-i586-rpm.bin cd /usr/local/ cp /home/kylin/jdk-6u43-linux-i586-rpm.bin . chmod +x jdk-6u43-linux-i586-rpm.bin ./jdk-6u43-linux-i586-rpm.bin chmod +x jdk-6u43-linux-i586.rpm rpm -ivh jdk-6u43-linux-... 阅读全文
posted @ 2013-03-31 18:32 jiang nan 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 昨晚,在自己的vps上搭建cms 的时候,发现需要开启被php禁用的函数,这个在安装的php路径下的php.ini 就可以我的机器安装在如下路径:/usr/local/php/etc/php.ini里面被封的函数如下:disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepass 阅读全文
posted @ 2013-03-30 21:10 jiang nan 阅读(1831) 评论(0) 推荐(1) 编辑
摘要: 今天继续使用mybatis搭建我的网站,在sql这块有个问题在sql的mapper中如下方式<select id="countByCate" parameterType="int" resultType="int"> select count(*) from article where <if test="cate!=0"> cate = #{cate} and </if> deletetype=0; </select>接口方法 :int countByCate(in 阅读全文
posted @ 2013-02-23 22:09 jiang nan 阅读(14688) 评论(1) 推荐(1) 编辑
摘要: 今天在自己的vps上搭建服务,好久没用过tomcat了、现在公司都是用resin 的。前一阵看见oschina 是用tomcat,打算自己的这个服务也用tomcat来搞。配置完jdk和tomcat 的环境变量后,打算把自己写的测试包传上来用用,但是不想直接放在默认的webapp下。于是上网搜了搜配置方式有如下三种:1.就是tomcat的默认webapp啦,这个不多说了用过的都知道2.就是在server.xml中增加context<Context path="/app" reloadable="true" docBase="/data/pr 阅读全文
posted @ 2013-02-22 21:35 jiang nan 阅读(1646) 评论(0) 推荐(0) 编辑