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 閱讀(3747) 評論(1)  編輯  收藏 所屬分類: 技術之路

          評論

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

          請問“項目編碼方式改為UTF-8” ? 在那個文件里修改(非eclipse中),謝謝!  回復  更多評論   

          <2007年3月>
          25262728123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          導航

          統計

          常用鏈接

          留言簿(8)

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 洮南市| 新晃| 黑山县| 嘉兴市| 阿坝| 平陆县| 无极县| 安国市| 礼泉县| 梓潼县| 随州市| 微博| 德保县| 光泽县| 彝良县| 响水县| 宁乡县| 邓州市| 彭山县| 温州市| 汉川市| 和田县| 迁安市| 宝山区| 开化县| 高安市| 巢湖市| 利辛县| 朝阳县| 承德市| 博野县| 乐都县| 延川县| 龙门县| 虞城县| 邢台市| 吉木乃县| 荔波县| 谷城县| 东城区| 襄城县|