Java middleware environment to build - Single Version

Soft establish the connection:ln -s 源文件 目标目录

Download, unzip, enter dubbo-admin, run the mvn packagepackage, you need to install maven
and set the environment variable. The package is then copied to the web war package container starts.
The default administrative account rootand password root, you can modify dubbo.properties under the WEB-INF directory of the project.

Download, unzip, copy it to / usr / local directory, configuration, modify environment variables or create soft link.
Configuration:
establish a data directory in the home directory is modified zoo_sample.conf zoo.conf, zoo.conf set datadir configuration data for the new directory path.

Download, unzip, copy it to / usr / local directory, configuration, modify environment variables or create soft link.
The difference is, redis c is written, needs to be compiled, linux environment need to install c / c ++ environment. Under the guidance of the download page to write very detailed, enter the directory, you can make the next compilation.

Download, unzip, copy it to / usr / local directory, configuration, modify environment variables or create soft link.
solr need to use the Chinese word breaker. solr can be used directly downloaded package, built Jetty, the web can be, drawn to JAR package, place in a web running in the container. Herein alone do not smoke, was used as such.
Configuration:
enter solr / server / solr, build a folder new_core, the configsets / basic_configs / copied to the conf new_core.

  • Creating Core: go to the bin directory, run solr create –c new_coreor run into the front-end creation.
  • Configuring managed-schema, add fields, Chinese word breaker:
    (1), fieldType: to define the type of field, the most important role is to define the word, a word decides how to retrieve the keyword from the document.
    (2), analyzer: subelement fieldType is segmenter by the tokenizer and filter components.
    (3), field: field or domain name, used to create the index, the index needs to be generated if this field is indexed to be set to true, need to be stored stored attribute set to true.
<!-- 中文分词器 -->
<fieldType name="text_ik" class="solr.TextField">
    <analyzer type="index">
        <tokenizer class="org.wltea.analyzer.lucene.IKTokenizerFactory" useSmart="false" conf="ik.conf"/>
        <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
    <analyzer type="query">
        <tokenizer class="org.wltea.analyzer.lucene.IKTokenizerFactory" useSmart="true" conf="ik.conf"/>
        <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
</fieldType>

<!--
域:
相当于一个字段,当用属性
name 字段名
type 字段类型,分词类型
indexed 是否索引
stored 是否存储
required 是否必须
multValued 是否多值,默认为false -->

<field name="item_goodsid" type="long" indexed="true" stored="true"/>
<field name="item_title" type="text_ik" indexed="true" stored="true"/>
<field name="item_price" type="double" indexed="true" stored="true"/>
<field name="item_image" type="string" indexed="false" stored="true"/>
<field name="item_category" type="string" indexed="true" stored="true"/>
<field name="item_seller" type="text_ik" indexed="true" stored="true"/>
<field name="item_id" type="text_ik" indexed="true" stored="true"/>
<field name="item_brand" type="string" indexed="true" stored="true"/>

<!--
复制域
一个逻辑域,不占存储,相当于用逻辑运算符组合标准的域
source 源
dest 目标 -->

<field name="item_keyword" type="text_ik" indexed="true" stored="false" multValued="true"/>

<copyField source="item_title" dest="item_keyword"/>
<copyField source="item_seller" dest="item_keyword"/>
<copyField source="item_category" dest="item_keyword"/>
<copyField source="item_brand" dest="item_keyword"/>

动态域
使用*,来动态扩展域
<dynamicField name="item_spec_*" type="string" indexed="true" sorted="true"/>

Chinese word is arranged:
to ikanalyzer-solr5 in KAnalyzer.cfg.xml, stopword.dic, ext.dic copied to the / usr / local / solr / server / solr-webapp / webapp / WEB-INF / classes, without this directory create a new one,
the ik-analyzer-solr5-5.x.jar, solr- analyzer-ik-5.1.0.jar copied to the / usr / local / solr / server / solr-webapp / webapp / WEB-INF / lib directory
ext.dic extension dictionary, used to set the number of new words; stopword.dic to punctuate dictionary, the word is that some negligible. Modify IKAnalyzer.cfg.xml, the ext.dic remove the comment.
Start testing.

Official website have no access to, ah, there is no guidance on github, but fortunately there are fly blog. Temporarily resting the machine, take on another machine.

Download, unzip, copy it to / usr / local directory, configuration, modify environment variables or create soft link.
activemq startstart up. The default port 8161 management background, communication port 61616.

Download your favorite version (right version, such as the latest version to use docker, gradle, jdk11, temporarily do not have or did not learn these words, on the choice of a relatively old version), unpack, compile. Tomcat copied to a container (other web containers may be).

Due to always download, compile unsuccessful, temporarily download others compiled using -> PAN

Web into containers, start, or modify configuration, such as user data source, add the relevant JAR, the front end of the page, cancel https.

Cancel https:
  • WEN-INF / classes / services / HTTPSandIMAPS-10000001.json, modify serviceId, changed to "^ (http): //.*".
  • deployerConfigContext.xml under WEB-INF, modify HttpBasedServiceCredentialsAuthenticationHandler, add an attribute "p: requireSecure =" false "".
  • WEB-INF /spring-configuration/ticketGrantingTicketCookieGenerator.xml,设置 p:cookieSecure="false",p:cookieMaxAge="3600"。
  • warnCookieGenerator.xml in the same directory, set p: cookieSecure = "false", p: cookieMaxAge = "3600".
Modify data origin authentication:
  • deployerConfigContext.xml under WEB-INF, configuration data according to their source database types:
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
  p:driverClass="com.mysql.jdbc.Driver"
  p:jdbcUrl="jdbc:mysql://127.0.0.1:3306/mall?characterEncoding=utf-8"
  p:user="root"
  p:password="123456"/>
  • Configuration dbAuthHandler:
<bean id="dbAuthHandler" class="org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler"
  p:dataSource-ref="dataSource"
  p:sql="select password from tb_user where username= ?"
  p:passwordEncoder-ref="passwordEncoder" />
  • Configure password encryptor: If not the unworthy, comprising the above passwordEncoder-ref.
<bean id="passwordEncoder" class="org.jasig.cas.authentication.handler.DefaultPasswordEncoder"
  c:encodingAlgorithm="MD5"
  p:characterEncoding="UTF-8"/>

The <entry key-ref="primaryAuthenticationHandler" value-ref="primaryPrincipalResolver" />change <entry key-ref="dbAuthHandler" value-ref="primaryPrincipalResolver" />.
Once configured, the jar was added to the relevant lib, such as used here mysql connection packet, c3p0, cas-server-support -jdbc.

  • Modify WEB-INF / cas-servlet.xml, logoutAction the 'cas.logout.followServiceRedirects: true', so that after the logout can jump to a specified url.

The following is the cluster structures:
the Java middleware environment to build - Cluster Edition

Reproduced in: https: //www.jianshu.com/p/6309efb2a821

Guess you like

Origin blog.csdn.net/weixin_34415923/article/details/91273168