Huihoo.org - Open Enterprise Foundation

安装Compiere


(from http://www.fgoo.com/ Allen编辑,整理)

1,download
http://telia.dl.sourceforge.net/sourceforge/compiere/compiere_242d.exe

2,设置环境变量的系统变量
JAVA_HOME=F:\java\j2sdk1.4.0_01
PATH里面加上%JAVA_HOME%\bin

3,点击,安装于目录F:\Compiere2
选择TNS Name为Rockydb

4,新建数据库TestDB
详细过程参考:I:\My document\Note\DataBase\Oracle\CreateDataBase.txt
新建的数据库的ServiceName为步骤8中所自动生成的名称。或者可以在文件F:\oracle\ora81\network\ADMIN\tnsnames.ora 中查看。

5,在http://www.compiere.org/support/install/install-Oracle.html#detail发现
The size of the INDX, USERS AND TEMP tablespaces should be greater or equal 100MB.
增加表空间的大小
cmd
C:\>set ORACLE_SID=TestDB
C:\>sqlplus system/manager
SQL>alter tablespace INDX add datafile 'F:\oracle\oradata\TestDB\INDEX02.DBF' size 80m;
SQL>alter tablespace USERS add datafile 'F:\oracle\oradata\TestDB\USERS02.DBF' size 80m;
SQL>alter tablespace TEMP add datafile 'F:\oracle\oradata\TestDB\TEMP02.DBF' size 80m;
SQL>exit;

6,cmd>TSNPING TESTDB_202.105.184.211
OK!

7,修改sys,system的密码为password
C:\>set ORACLE_SID=TestDB
C:\>sqlplus system/manager
SQL> alter user system identified by password;
SQL> alter user sys identified by password;
修改文件F:\Compiere2\utils\myEnvironment.bat的内容,根据情况,修改其中的三行为:
/*
@SET COMPIERE_DB_TNS=TESTDB_202.105.184.211
@SET COMPIERE_DB_SYS=PASSWORD OF SYS
@SET COMPIERE_DB_SYSTEM=PASSWORD OS SYSTEM
*/
8,import data from F:\Compiere2\data to oracle
执行
F:\Compiere2\utils>RUN_ImportCompiere
报错,说
...
ORA-01919: 作用'JAVAUSERPRIV'不存在
...
IMP-00016: 不支持要求的字符集转换(从类型178到852)
查看TestDB的角色,'JAVAUSERPRIV'确实不存在,查看RockyDB的角色,发现确实存在'JAVAUSERPRIV',根据
RockyDB的角色'JAVAUSERPRIV'的DDL,在TestDB中新建'JAVAUSERPRIV'
SQL> CREATE ROLE "JAVAUSERPRIV" NOT IDENTIFIED;
把TestDB的字符集改为英文
修改注册表[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE]下的
"NLS_LANG"="NA"

"NLS_LANG"="AMERICAN_AMERICA.WE8ISO8859P1"
重起TestDB
运行
F:\Compiere2\utils>RUN_ImportCompiere
仍然报错:
IMP-00016: 不支持要求的字符集转换(从类型178到852)
IMP-00000: 未成功终止导入
>sqlplus sys/password
SQL>UPDATE SYS.PROPS$ SET VALUE$ = 'WE8ISO8859P1' WHERE NAME IN
('NLS_CHARACTERSET','NLS_NCHAR_CHARACTERSET');
SQL>COMMIT;
SQL>exit;
>svrmgrl
connect internal;
shutdown;
startup;
exit;
运行
F:\Compiere2\utils>RUN_ImportCompiere
依旧

把注册表改回原来的值:NA
把数据库字符集也改回:
update sys.props$ set value$='ZHS16GBK' where name='NLS_CHARACTERSET';
update sys.props$ set value$='ZHS16GBK' where name='NLS_NCHAR_CHARACTERSET';
commit;
重启数据库
设置环境变量
F:\Compiere2\utils>set NLS_LANG=ZHS16GBK
运行
F:\Compiere2\utils>RUN_ImportCompiere
提示
ORA-12705: invalid or unknown NLS parameter value specified
set NLS_LANG=AMERICAN_AMERICA.ZHS16CGB231280
后,没有上述错误了,但是:
IMP-00016: required character set conversion (type 178 to 850) not supported
IMP-00000: Import terminated unsuccessfully
....
F:\Compiere2\utils>set NLS_LANG=AMERICAN
运行
F:\Compiere2\utils>RUN_ImportCompiere
上述错误消失,报错:
IMP-00010: not a valid export file, header failed verification
IMP-00000: Import terminated unsuccessfully
后来
F:\Compiere2\data>type compiere.dmp | more
发现XPORT:V09.00.01字样,估计数据是从Oracle9i导出的,只有用Oracle9i的import工具才能导入
安装Oracle920,数据库SID为CRMDB
tnsping crmdb,ok
修改文件F:\Compiere2\utils\myEnvironment.bat的内容,根据情况,修改其中的三行为:
/*
@SET COMPIERE_DB_TNS=CRMDB
@SET COMPIERE_DB_SYS=PASSWORD OF SYS
@SET COMPIERE_DB_SYSTEM=PASSWORD OS SYSTEM
*/

执行:
F:\Compiere2\utils>set ORACLE_SID=CRMDB

F:\Compiere2\utils>set NLS_LANG=AMERICAN

F:\Compiere2\utils>RUN_ImportCompiere
OK!
/*
...
Context created.

Statistics computed: 267
All valid

PL/SQL procedure successfully completed.

no rows selected

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production With the Partitioning,
OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
请按任意键继续 . . .
*/
10,run_env
F:\Compiere2\utils>run_env
OK!
11,添加环境变量CATALINA_HOME=%COMPIERE_HOME%\tomcat
启动Start the Application Server
F:\Compiere2\utils>run_server2
输入S,输入所列出的服务对应的数字(1 or 2 or 3),启动相应的服务。
服务1启动正常,2和3均报错:
/*
CConection.getConnection - jdbc:oracle:thin:@dev:1521:dev1 - java.sql.SQLExcepti on:
Io 异常: The Network Adapter could not establish the connection java.sql.SQLException:
Io 异常: The Network Adapter could not establish the conn ection
*/
说明,数据库连接的SID的设置有问题。
修改Compiere.properties,把其中一行改为:
Connection=xyzCConnection[name\=dev{dev-dev1-compiere},AppsHost\=rocky,AppsPort\=1099,type\=Oracle,DBhost\=rocky,
DBport\=1521,DBname\=crmdb,BQ\=false,FW\=false,FWhost\=,FWport\=1630,UID\=compiere,PWD\=compiere]
再运行:run_server2,启动服务1,2,3,ok!
12,执行客户端F:\Compiere2\lib\Compiere2x.exe,即可登录。
缺省用户和密码参考:F:\Compiere2\installClient.html,最下面。
用户名和密码大小写区分。