junctioner

再次开始centric crm研究

上次看centric crm,是一年多前的事了,这一年中,忙忙碌碌的,都不知道做了些什么,但还是一直关注crm的相关信息。
年初,有个朋友需要一套CRM软件,我就给他推荐centric crm,但他不懂技术,希望我帮他搞搞,这就应了下来,又一次开始认真的看centric crm。
[温故而知新] 看以前贴的关于centric crm的blog,心有惭愧,希望产生误导的影响不会很大。

今天作一些更正,算是补偿。
1、获取centric crm源码,得先注册,注册地址:http://www.centriccrm.com/Register.do
   先输入你的邮箱地址(登录用这个);
   个人名称可随便填写;
   注册成功后,密码会发送到你邮箱中,

2、官方用SubVersion管理centic crm的源码,可以当一个subverion的客户端,指定到要下载版本的链接,   输入注册的邮箱和密码,就可以获取源码。
  现在有4.0和4.1两个版本,subverion链接分别如下,   
  4.1源码:https://svn.centricsuite.com/webapp/branches/branch-41   
  4.0源码:https://svn.centricsuite.com/webapp/tags/rel-200611151353-402   

  我使用eclipse,装了个SVN插件,配好后,直接check out成eclipse的项目。   
  SVN eclipse plugin是subclipse,插件获取网站:http://subclipse.tigris.org/update_1.2.x

3、源码获取下来目录如下图
centric crm源文件目录结构

[源码check out到eclipse后,把整个项目编码方式改为UTF-8,因源文件注释中有些时间戳是中文简体字,不设成UTF-8,就显示为乱码,看起来没什么大碍,但若修改源文件再保存就会弹出编码格式不正确错误信息]
bin:暂没看这个目录中的内容
doc:基本文件目录
    Binary EULA.rtf:版权申明的文件;
    CRM Installation and Setup.pdf:安装配置文件,描述的比较简单;
    db-schema.html:库表设计说明文件,了解centric CRM表结构这个文件最佳参考资料
lib:项目需要的jar文件目录
pref:特定情况下需要的配置文件目录
src:源码基本目录
    src目录内有下面四个主要目录:
    java:java源文件目录
    web:web展示源文件目录
    sql:库表脚本文件目录
    testcases:单元测试文件目录

    src目录内有下面四个主要文件:
    build.xml:项目编译、发布的ant配置文件
    home.properties.example:build.xml的辅助文件样例,定义一些基本路径信息,如:服务发布目录
    master.properties:build.xml的辅助文件,定义系统的一些属性配置
    README.txt:比较详细的安装配置文件(我就是看这个文件进行安装配置的,有时间可以把安翻译成中文)
4、开始安装配置
    1)安装需求Java JDK,就不用说了,1.4以上都可以,1.4以下行不行,我也没试,有兴趣的朋友可试试,测试结果能告之当是感激了。我装的是JDK 5.0。
    2)应用服务用tomcat 5.0,5.5都可以(不过tomcat5.5得在JDK5.0上才能运行起来),Jboss、Weblogic、WebSphere、Resin也可以运行。我用Tomcat 5.5.3。
    3)数据库支持DB、MSSQL、MySQL、Oracle等,具体信息可看README.txt。我用的是MySQL 5.0.21。驱动jar是MySQL官网下载的 mysql-connector-java-5.0.4-bin.jar。
    4)还需要有ant工具,申明是要1.6的,我用eclipse自带的1.6.5。
    5)centric CRM中用到WebServices,可去下载一个,
    下载地址:http://apache.downlod.in/ws/axis/1_4/axis-src-1_4.zip。
    解开zip包,把webapp下面的axis目录拷贝到$tomcat/webapps/目录下。

    准备好上几步要求的,可以开始配置build.xml运行的两个属性文件。
    复制home.properties.example文件为 home.properties,相关属性做如下修改:
## The following properties can be set instead of using environment variables

## Declare the webapp server's directory to compile using web app server libraries
## based on the webapp type configured in build.properties
## 设置Tomcat安装路径
CATALINA_HOME=D:/java/tomcat5.5.3
#GERONIMO_HOME=/path/to/geronimo or websphere ce
#JBOSS_HOME=/path/to/jboss
#WEBLOGIC_HOME=/path/to/weblogic
#WEBSPHERE_HOME=/path/to/websphere

## CENTRIC_HOME can be used to compile directly to the webapp's deployment
## directory (for development), or to any directory for later generating a .war
## 设置centric CRM 发布到tomcat中的路径
CENTRIC_HOME=D:/java/tomcat5.5.3/webapps/centric
#CENTRIC_HOME=/path/to/weblogic/domain/autodeploy/directory

## At times, scripts will need to install or upgrade fileLibrary documents when
## deploying from source
## 设置项目中配置文件存放目录
CENTRIC_FILELIBRARY=D:/Project.java/Centric CRM 4.1/fileLibrary
## To skip web based GUI the fileLibrary must be in the WEB-INF folder, useful
## for development
## 设置配置文件发布目录
CENTRIC_FILELIBRARY=D:/java/tomcat5.5.3/webapps/centric/WEB-INF/fileLibrary

## If using Axis Web Services, then declare the webapp home so that the
## Centric CRM descriptors can be installed with "ant ws"
## 设置axis在tomcat中的发布目录
AXIS_HOME=D:/java/tomcat5.5.3/webapps/axis
    
    master.properties 相关属性做如下修改:

##
## NOTE: Do not edit "master.properties" -- edit a copy of it
## These settings are used by ant for the build and installation process
##




## PART 1: Are you reading the instructions? (required)

## The following is a control, uncomment the following line after modifying
## these properties... we just want to make sure you're paying attention and
## the build process doesn't do something it shouldn't!
## 确认修改过此配置文件标识
PROPERTIES=configured




## PART 2: Deployment settings (required for compiling)

## Default language setting: even though any locale can be specified, the
## following have Centric CRM translations and supporting database data
## args="de_DE,en_US,es_VE,fr_FR,it_IT,ja_JP,nl_NL,pt_BR,ro_RO,ru_RU,sl_SI"/>
SYSTEM.LANGUAGE=en_US

## Web server debug level:
## Extended debug information can be displayed in the web server's log file
## Comment out for no debugging, especially production server
DEBUGLEVEL=2
#DEBUG=true
#DEBUGLEVEL=lines,vars,source

## Specify the web server to build/deploy against (required):
## Use catalina for Tomcat
## Use geronimo for WAS-CE or Apache Geronimo
## All others untested but planned for
## 指定Web Server 应用服务类型
WEBSERVER.TYPE=catalina
#WEBSERVER.TYPE=geronimo
#WEBSERVER.TYPE=jboss
#WEBSERVER.TYPE=weblogic
#WEBSERVER.TYPE=websphere

## A self-signed SSL Certificate will be generated with the following parameters,
## which can then be added to Tomcat's SSL configuration and/or
## signed by an authority
## Common name should be a domain name
## Ex. *.yourcompany.com or www.yourcompany.com
KEYSTORE.COMMONNAME=127.0.0.1
KEYSTORE.ORGANIZATION=Company
KEYSTORE.ORGANIZATIONALUNIT=Unit
KEYSTORE.CITY=City
KEYSTORE.STATE=State
KEYSTORE.COUNTRY=US
KEYSTORE.VALIDITY=1000

## Force users to use SSL in Centric CRM
## The web server must be configured for SSL if this option is set to true as
## Centric CRM will redirect non-secure URLs to the secure URL
FORCESSL=false




## PART 3: Database installation settings (required for database installation)

## Uncomment and set the connection information for your specific database
## NOTE: The gatekeeper URL includes your database name, the site URL does not;
## The ant script will insert the database name after the specified url


## DB2
## CREATE DATABASE centric USING CODESET UTF-8 TERRITORY US pagesize 32 k
#GATEKEEPER.DBTYPE=db2
#GATEKEEPER.DRIVER=com.ibm.db2.jcc.DB2Driver
#GATEKEEPER.URL=jdbc:db2://127.0.0.1:50000/centric
#GATEKEEPER.USER=db2admin
#GATEKEEPER.PASSWORD=
#SITE.DBTYPE=db2
#SITE.DRIVER=com.ibm.db2.jcc.DB2Driver
#SITE.URL=jdbc:db2://127.0.0.1:50000/
#SITE.USER=db2admin
#SITE.PASSWORD=

## POSTGRESQL
## createdb -E UNICODE centric_crm
#GATEKEEPER.DBTYPE=postgresql
#GATEKEEPER.DRIVER=org.postgresql.Driver
#GATEKEEPER.URL=jdbc:postgresql://127.0.0.1:5432/centric_crm
#GATEKEEPER.USER=postgres
#GATEKEEPER.PASSWORD=
#SITE.DBTYPE=postgresql
#SITE.DRIVER=org.postgresql.Driver
#SITE.URL=jdbc:postgresql://127.0.0.1:5432/
#SITE.USER=postgres
#SITE.PASSWORD=

## MySQL
## CREATE DATABASE centric_crm CHARACTER SET utf8 COLLATE utf8_general_ci
## 指定数据库类型及连接配置
GATEKEEPER.DBTYPE=mysql
GATEKEEPER.DRIVER=com.mysql.jdbc.Driver
GATEKEEPER.URL=jdbc:mysql://127.0.0.1:3306/my_centric_crm
GATEKEEPER.USER=my_centric_crm
GATEKEEPER.PASSWORD=crm
SITE.DBTYPE=mysql
SITE.DRIVER=com.mysql.jdbc.Driver
SITE.URL=jdbc:mysql://127.0.0.1:3306/
SITE.USER=my_centric_crm
SITE.PASSWORD=crm


## MS SQL SERVER
#GATEKEEPER.DBTYPE=mssql
#GATEKEEPER.DRIVER=net.sourceforge.jtds.jdbc.Driver
#GATEKEEPER.URL=jdbc:jtds:sqlserver://127.0.0.1:1433/centric_crm
#GATEKEEPER.USER=centric_crm
#GATEKEEPER.PASSWORD=
#SITE.DBTYPE=mssql
#SITE.DRIVER=net.sourceforge.jtds.jdbc.Driver
#SITE.URL=jdbc:jtds:sqlserver://127.0.0.1:1433/
#SITE.USER=centric_crm
#SITE.PASSWORD=

## CodeGear's InterBase (formally owned by Borland) www.codegear.com
## Do NOT put the database in the centric file library, or at least the root,
## as the build.xml copies its prefs into there using the same name as your database file!
## "e:/centriccrm_db" is only an example
#GATEKEEPER.DBTYPE=interbase
#GATEKEEPER.DRIVER=interbase.interclient.Driver
#GATEKEEPER.URL=jdbc:interbase://127.0.0.1:3050/e:/centriccrm_db/centric_crm.ib
#GATEKEEPER.USER=sysdba
#GATEKEEPER.PASSWORD=masterkey
#SITE.DBTYPE=interbase
#SITE.DRIVER=interbase.interclient.Driver
#SITE.URL=jdbc:interbase://127.0.0.1:3050/e:/centriccrm_db/
#SITE.USER=sysdba
#SITE.PASSWORD=masterkey

## FIREBIRD SQL
#GATEKEEPER.DBTYPE=firebird
#GATEKEEPER.DRIVER=org.firebirdsql.jdbc.FBDriver
#GATEKEEPER.URL=jdbc:firebirdsql:127.0.0.1/3050:${CENTRIC_FILELIBRARY}/centric_crm.fdb
#GATEKEEPER.USER=sysdba
#GATEKEEPER.PASSWORD=masterkey
#SITE.DBTYPE=firebird
#SITE.DRIVER=org.firebirdsql.jdbc.FBDriver
#SITE.URL=jdbc:firebirdsql:127.0.0.1/3050:${CENTRIC_FILELIBRARY}/
#SITE.USER=sysdba
#SITE.PASSWORD=masterkey

## DAFFODIL DB EMBEDDED
#GATEKEEPER.DBTYPE=daffodildb
#GATEKEEPER.DRIVER=in.co.daffodil.db.jdbc.DaffodilDBDriver
## YOU MUST EDIT THE path in the following line to where you want the database
## created.
## The user and password must be set to daffodil
#GATEKEEPER.URL=jdbc:daffodilDB_embedded:centric_crm;create=true;path=/home/fileLibrary/centric_crm/daffodildb
#GATEKEEPER.USER=daffodil
#GATEKEEPER.PASSWORD=daffodil
#SITE.DBTYPE=daffodildb
#SITE.DRIVER=in.co.daffodil.db.jdbc.DaffodilDBDriver
#SITE.URL=jdbc:daffodilDB_embedded:
## YOU MUST EDIT THE path in the following line to where you want the database
## created.
## Ex. Use the same path as Centric CRM's deployed file library, then the name of
## the database, then end in daffodildb
## The user and password must be set to daffodil
#SITE.APPEND=;create=true;path=/home/fileLibrary/centric_crm/daffodildb
#SITE.USER=daffodil
#SITE.PASSWORD=daffodil

## ORACLE
## During installdb, use XE (or whatever you add under gatekeeper) for the
## database name since the install has not been adjusted for Oracle yet
#GATEKEEPER.DBTYPE=oracle
#GATEKEEPER.DRIVER=oracle.jdbc.driver.OracleDriver
#GATEKEEPER.URL=jdbc:oracle:thin:@//127.0.0.1:1521/XE
#GATEKEEPER.USER=
#GATEKEEPER.PASSWORD=
#SITE.DBTYPE=oracle
#SITE.DRIVER=oracle.jdbc.driver.OracleDriver
#SITE.URL=jdbc:oracle:thin:@//127.0.0.1:1521/
#SITE.USER=
#SITE.PASSWORD=

## Derby
#GATEKEEPER.DBTYPE=derby
#GATEKEEPER.DRIVER=org.apache.derby.jdbc.EmbeddedDriver
## YOU MUST EDIT THE path in the following line to where you want the database
## created.
#GATEKEEPER.URL=jdbc:derby:/home/fileLibrary/centric_crm/derbydb;create=true;upgrade=true
#GATEKEEPER.USER=centric_crm
#GATEKEEPER.PASSWORD=
#SITE.DBTYPE=derby
#SITE.DRIVER=org.apache.derby.jdbc.EmbeddedDriver
## YOU MUST EDIT THE path in the following line to where you want the database
## created.
#SITE.URL=jdbc:derby:/home/fileLibrary/centric_crm/
#SITE.APPEND=;create=true;upgrade=true
#SITE.USER=centric_crm
#SITE.PASSWORD=


## PART 4: Advanced configuration (optional)

## Web-based configuration is recommended and is the default setting
##
## If you uncomment the following CONTROL line then you must configure the
## remaining parameters yourself. You will also have to create a new Centric
## CRM user and password before using Centric CRM.
##
## If you DO NOT uncomment the CONTROL line, then the first time you use
## Centric CRM, you will be presented with a configuration wizard which will
## assist you in defining these parameters and creating a new Centric CRM
## user and password.
##
#CONTROL=BYPASS_WEB-BASED_APPLICATION_SETUP

## The following are methods for working with multiple development databases
## The APPCODE must be the same for the following Gatekeeper prefs and Site prefs
GATEKEEPER.APPCODE=centric
SITE.APPCODE=centric

## Define the web address used in communications when using a single development
## database
#WEBSERVER.URL=127.0.0.1:8080/centric

## Define the web address used in communications when using multiple development
## databases
#WEBSERVER.ASPMODE=true
#WEBSERVER.PORT=8080
#WEBSERVER.CONTEXT=/centric

## The server's default timezone for new users (using standard Java names)
SYSTEM.TIMEZONE=America/New_York
## Default currency for all users
SYSTEM.CURRENCY=USD
## Default country for all users
SYSTEM.COUNTRY=UNITED STATES

## External Servers used by the system
MAILSERVER=127.0.0.1
FAXSERVER=127.0.0.1
FAXENABLED=false
PROXYSERVER=false
PROXYSERVER.HOST=
PROXYSERVER.PORT=

## Apache Axis Web Services
## 指定WebService 服务路径
AXIS.WEBAPP=/axis
AXIS.HOST=127.0.0.1
AXIS.PORT=8080


## Asterisk integration
ASTERISK.OUTBOUND.ENABLED=false
ASTERISK.INBOUND.ENABLED=false
ASTERISK.URL=
ASTERISK.USERNAME=
ASTERISK.PASSWORD=
ASTERISK.CONTEXT=from-internal

## XMPP/Jabber integration
XMPP.ENABLED=false
XMPP.CONNECTION.SSL=false
XMPP.CONNECTION.URL=
XMPP.CONNECTION.PORT=5222
XMPP.MANAGER.USERNAME=
XMPP.MANAGER.PASSWORD=

## LDAP integration
LDAP.ENABLED=false
# Validate username OR email against LDAP: username|email
LDAP.CENTRIC_CRM.FIELD=username
LDAP.FACTORY=com.sun.jndi.ldap.LdapCtxFactory
LDAP.SERVER=ldap://127.0.0.1:389
# Search by attribute, otherwise composite DN: true|false
LDAP.SEARCH.BY_ATTRIBUTE=true
LDAP.SEARCH.USERNAME=cn=admin,ou=IT,o=COMPANY
LDAP.SEARCH.PASSWORD=
LDAP.SEARCH.CONTAINER=o=COMPANY
LDAP.SEARCH.ORGPERSON=inetOrgPerson
LDAP.SEARCH.SUBTREE=true
LDAP.SEARCH.ATTRIBUTE=mail
#LDAP.SEARCH.BY_ATTRIBUTE=false
#LDAP.SEARCH.PREFIX=cn=
#LDAP.SEARCH.POSTFIX=,o=COMPANY

## Define the system's email address
EMAILADDRESS=Centric CRM <noreply@127.0.0.1>

## Timed events, definitely turn on for a production server
CRON.ENABLED=true

## Connection Pool Settings
CONNECTION_POOL.DEBUG=false
CONNECTION_POOL.TEST_CONNECTIONS=false
CONNECTION_POOL.ALLOW_SHRINKING=true
CONNECTION_POOL.MAX_CONNECTIONS=10
CONNECTION_POOL.MAX_IDLE_TIME.SECONDS=60
CONNECTION_POOL.MAX_DEAD_TIME.SECONDS=300

## Layout Settings
## Template replaces the following files which MUST exist:
## CSS:
## template1.css
## template1-8pt.css
## template1-10pt.css
## JSP:
## template1nav.jsp
## template1style.jsp
## template1styleNoSession.jsp
## template1styleContainer.jsp
LAYOUT.TEMPLATE=template1
LAYOUT.JSP.WELCOME=welcome.jsp
LAYOUT.JSP.LOGIN=login.jsp
#LAYOUT.JSP.LOGIN.LOGO=<img src="images/centric/logo-centric.gif" width="295" height="66" alt="" border="0" />
#LAYOUT.JSP.LOGIN.TEXT=Centric CRM

## Max Imports that can run concurrently
IMPORT_QUEUE_MAX=1

## Opportunity behavior
# OPPORTUNITY.DEFAULT_TERM=52
# OPPORTUNITY.DEFAULT_UNITS=W
# OPPORTUNITY.MULTIPLIER=52
# OPPORTUNITY.CLOSE_PROBABILITY=25,50,75

完成上述两文件的修改后,打开eclipse的ant视图,

    运行:ant deploy 完成项目的编译发布工作。

下一步是创建库表,可运行 ant installdb 创建库表。
    运行 ant installdb前,先在启动MySQL,创建一个表空间及用户,
    CREATE DATABASE my_centric_crm CHARACTER SET utf8 COLLATE utf8_general_ci;
    GRANT ALL PRIVILEGES ON my_centric_crm.* TO my_centric_crm@"%" IDENTIFIED BY "crm";


    创建库表时,若出现类似"Specified key was too long; max key length is 765bytes"的错误,是因为标识"UNIQUE NOT NULL"的字段长度>255(255=765/3)了。MySQL数据库的unique类字段长度限制比较短,视不同版本,有的限制为765个字节,有的限制为1000个字节,UTF是占用3个字节位的,所以在这个限制上还要除以3。centric CRM的mysql库脚本中,unique类字段的长度是设为300长字符的,出现上述问题一个可行的妥协办法是修改脚本unique类字段的长度。

建完表后,可以启动tomcat服务,运行 ant ws 激活WebService,应用服务配置安装完成!

通过 http://localhost:8080/centric,第一次进入centric crm系统。

    第一次进入系统时,是一个登录界面,用户是dhvadmin,密码是admin,登录进入,是一步步的系统参数设置操作,操页面提示,就可完成设置。最后是创建应用系统公司名称和管理员用户密码的界面,再次使用系统时,就以管理员名称和密码登录,对系统进行设置及添加管理其他用户。(至此,告一段落。)

posted on 2007-03-02 14:53 junctioner 阅读(3725) 评论(1)  编辑  收藏 所属分类: 技术之路

评论

# re: 再次开始centric crm研究 2008-04-06 16:36 lxneng

请问“项目编码方式改为UTF-8” ? 在那个文件里修改(非eclipse中),谢谢!  回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航:
 
<2007年3月>
25262728123
45678910
11121314151617
18192021222324
25262728293031
1234567

导航

统计

常用链接

留言簿(8)

随笔分类

随笔档案

文章档案

搜索

最新评论

阅读排行榜

评论排行榜