ERP

(原創)Install ADempiere Business Suite 342s On FreeBSD 7.1

install freebsd 7.1(Minimal+ports+X.Org)
login as root
install WGET
cd /usr/ports/ftp/wget
make install clean
rehash

install JDK1.6
cd /usr/ports/distfiles
wget http://www.java.net/download/jdk6/6u3/promoted/b05/jdk-6u3-fcs-src-b05-jrl-24_sep_2007.jar
wget http://www.java.net/download/jdk6/6u3/promoted/b05/jdk-6u3-fcs-bin-b05-jrl-24_sep_2007.jar
wget http://www.java.net/download/jdk6/6u3/promoted/b05/jdk-6u3-fcs-mozilla_headers-b05-unix-24_sep_2007.jar
wget http://shuqun.com/files/bsd-jdk16-patches-4.tar.bz2
wget http://shuqun.com/files/diablo-caffe-freebsd7-i386-1.6.0_07-b02.tar.bz2
wget http://shuqun.com/files/tzupdater-1_3_12-2009a.zip

cd /usr/ports/java/jdk16
make install clean
[X] JAIL      Port is being built within a jail


install PostgreSQL 8.3
cd /usr/ports/databases/postgresql83-server
make install clean

vi /etc/rc.conf
jail_sysvipc_allow="YES"
postgresql_enable="YES"

shutdown -r now
login as root
/usr/local/etc/rc.d/postgresql initdb

#su - pgsql
$psql -d template1 -U pgsql
template1=# alter user pgsql with password 'AdministratorDB';
template1=# \q
$createuser -U pgsql postgres
  Shall the new role be a superuser? (y/n) y
$psql -U pgsql -c "ALTER USER postgres WITH PASSWORD 'DBAdministrator'" template1
$createuser -U pgsql adempiere
  Shall the new role be a superuser? (y/n) n
  Shall the new role be allowed to create databases? (y/n) y
  Shall the new role be allowed to create more new roles? (y/n) y
$createdb -U adempiere -W adempiere
$psql -U pgsql -c "ALTER USER adempiere WITH PASSWORD 'DBUser'" adempiere
$exit

#vi /usr/local/pgsql/data/postgresql.conf
listen_addresses = '*'
#vi /usr/local/pgsql/data/pg_hba.conf
host    all         all         10.2.91.118/24        md5

#/usr/local/etc/rc.d/postgresql restart

#adduser
Username: adempiere
Full name: ADempiere Business Suite
Uid (Leave empty for default):
Login group [adempiere]:
Login group is adempiere. Invite adempiere into other groups? []:
Login class [default]:
Shell (sh csh tcsh nologin) [sh]: csh
Home directory [/home/adempiere]:
Home directory permissions (Leave empty for default):
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password:
Enter password again:
Lock out the account after creation? [no]:
Username   : adempiere
Password   : *****
Full Name  : ADempiere Business Suite
Uid        : 1002
Class      :
Groups     : adempiere
Home       : /home/adempiere
Home Mode  :
Shell      : /bin/csh
Locked     : no
OK? (yes/no): yes
adduser: INFO: Successfully added (adempiere) to the user database.
Add another user? (yes/no): no
Goodbye!

#vi /home/adempiere/.cshrc
setenv ADEMPIERE_HOME /home/adempiere/Adempiere
setenv JAVA_HOME /usr/local/jdk1.6.0

#shutdown -r now

login as adempiere
>wget http://nchc.dl.sourceforge.net/sourceforge/adempiere/Adempiere_342s.tar.gz
>tar -zxvf Adempiere_342s.tar.gz
>chmod -R +x *.sh
>cd Adempiere
>startx
>./RUN_setup.sh
>cd utils
>./RUN_ImportAdempiere.sh
>./RUN_Server2.sh

Accounts:
GardenAdmin / GardenAdmin
GardenUser / GardenUser
SuperUser / System
System / System

(源自網絡)登陸ERP 11i後,出現如下"JInitiator"和"jvm.dll"錯誤資訊,處理方法.

一.
Error:“A java security exception has occurred. This can occur if the JInitiator on your computer is not compatible with files from the server, or if those files have not been signed properly. Please contact your system administrator.”

分析:
1、運行JInitiator元件時,載入到記憶體的檔不完全或者載入後被系統(或者人為)刪除對應的進程
2、安裝後,自己機器上的JInitiator元件與伺服器上提供的不一致,即部分功能沒有安裝上
解決:
1、對於第一種情況,重新啟動一下機器即可
2、對於第二種情況,在別人的機子上拷“identitydb.obj” 這個檔,覆蓋自己機器上的相應檔即可
我用了方法2解決問題.

二.
是有關jvm.dll的錯誤。

解決方法如下,我大致描述做法:
1,流覽器選項,高級activex控制項,禁用使用java 6.0,這個是bug的。
2,把插件僅開啟對應的版本的Jinitiator軟體,其他的都禁用。
3,Navigate IE - Tools - Internet Options - Advanced - untick ‘enable third-party browser extensions’的那個鉤去掉。
我只用了方法3解決問題.

(Form Internet)How to change the hostname of Oracle E-Business Suite 11i

From: http://www.teachmeoracle.com/forum/viewtopic.php?t=2276&highlight=hostname

using Cloning..you can change the hostname...it's very cool method. You do it using cloning..then you can come to conclusion that, how we can play with cloning. Earlier i have used this method to change hostname instead of autoconfig.

(1) Run the preclone on the system where you want to change the hostname. If it is single node, run the preclone on both the Database tier and Application tier

(2) Change the Host Name of that system using Operating System Commands. Then add the entry in the /etc/hosts file

(3) Run the post clone in the Database tier and Application tier...While Answering the questions, give the new hostname for hostname question. Leave other as it is.

Or else

If you want to change the Hostname of Application tier and Database tier using Autoconfig

Follow these Documents

(1) How to change the hostname and/or port of the Database Tier using AutoConfig Doc ID: Note:338003.1
(2) How to change the hostname of an Applications Tier using AutoConfig Doc ID: Note:341322.1
Choose which method you want...
As per my suggesstion...use Cloning to change the hostname...it's Coooollllll


From: http://becomeappsdba.blogspot.com/2006/11/how-to-change-hostname-or-domainname.html

You sometime have to change hostname or domainname of your Apps Instance , today's post list various options & things you need to note while changing hostname on your existing Apps Instance.

Use cloning for changing hostname or domainname
I am sure you might be surprised to see how cloning can change hostname or domainname , yes you are right cloning will not change host or domain name but cloning can be used to change pointers to old hostname or domainname in Apps Instance after changing hostname/domainname by operating system commands. Steps you have to do is

Run adpreclone on Instance where you want to change hostname/domainname
Release Unix/Linux machine to sysadmin for changing hostname
Run postclone with new hostname/domain with same SID to change new name into effect

Above method is easy & best which I can think .

Use Autoconfig to change hostname or domainname of machine hosting apps Instance
If Machine on which you want to change hostname/domainname is on application tier then you just change entries in $CONTEXT_NAME.xml
Change hostname or domainname using operating system commands
execute autoconfig on that Instance so that application tier register new hostname/domainname

If machine on which you want to change host/domain name also host Database Tier then you also need to Deregister database tier from Net Service Topology Model & Reregister it with new hostname settings.
If you want to learn more about Net Service Topology Model follow Metalink Note # 218089.1 Autoconfig FAQ Under Section Net Services Question 28 to 41

For exact steps on how to change hostname using Autoconfig follow Metalink Note # 338003.1 How to change the hostname and/or port of the Database Tier using AutoConfig

I recently completed OCA for Application Server Exam 1Z0-311 and will be sharing my experience with Oracle Certification for Application Server with you all. Stay tuned on Oracle Application Server Certification 1Z0-311 & lot more things.

Your feedback/comment is quite important for improving this blog so feel free to leave your comments & suggestions


From: http://www.dbspecialists.com/files/presentations/cloning.html

The Basic Steps for Cloning

After installing the Rapid Clone and AutoConfig patches, you are ready to clone an instance. There are ten basic steps involved. I have outlined them below:

1.Run system configuration on the Application tier:
<COMMON_TOP>/admin/scripts/<SID>/adautocfg.sh
Use the APPS password when prompted.

2.Run system configuration on the database tier:
<RDBMS ORACLE_HOME>/appsutil/<SID>/scripts/adautocfg.sh
Use the APPS password when prompted.

3.Copy AutoConfig to the RDBMS ORACLE_HOME:
Apply patch 2952369 to acquire adchkcfg utility.
Create appsutil.zip file by: perl <AD_TOP>/bin/admkappsutil.pl.
Copy appsutil.zip file to the <RDBMS ORACLE_HOME>
unzip -o appsutil.zip

4.Generate the database context file:
cd <RDBMS ORACLE_HOME>/appsutil/bin
adbldxml.sh tier=database appsuser=<APPSuser> appspasswd=<APPSpwd>
Output log is written to: $ORACLE_HOME/appsuti/out/<SID>/cfgcheck.txt

5.Generate and apply AutoConfig configuration file:
cd <RDBMS ORACLE_HOME>/appsutil/bin
adconfig.sh contextfile=<CONTEXT> appspass=<APPSpwd>

6.Prepare for source database clone:
cd <RDBMS ORACLE_HOME>/appsutil/scrips/<SID>
./perl adpreclone.pl dbTier

7.Prepare for source application clone:
cd <COMMON_TOP>/admin/scripts/<SID>
./perl adpreclone.pl appsTier

8.Copy the application tier file system:
Logon to the source system as APPLMGR and shut down the server processes.
Copy the following application directories from the source to the target node/file system:
   <APPL_TOP>
   <OA_HTML>
   <OA_JAVA>
   <COMMON_TOP/util>
   <COMMON_TOP/clone>
   <806 ORACLE_HOME>
   <iAS ORACLE_HOME>
Shut down the source database and copy it to the target node/file system.
Restart the source database and source application server processes.

9.Configure the target system database sever:
cd <RDBMS ORACLE_HOME>/appsutil/clon/bin
./perl adcfgclone.pl dbTier

10.Configure the target system application tier:
cd <COMMON_TOP>/clone/bin
./perl adcfgclone.pl appsTier

Note: These steps are for a single node install. If you are using Oracle Workflow, you must update wf_notification_attributes and wf_item_attribute_values.
Version 2.1.0.17 of the Oracle Universal Installer and Perl 5.005 should be installed and included in your path. Be sure to review your install logs after cloning to make sure there are no errors. After you have verified connectivity in the cloned environment, have a user navigate through the system to verify the clone is functional and complete.


From: http://oraclesoon.blogspot.com/2006/11/oracle-e-business-suite-is-dependent-on.html

Run AutoConfig to change hostname for E-Business Suite
Oracle E-Business Suite is dependent on hostname. User can easily change the IP of the machine, but user cannot anyhow change the hostname of the machine. To change the hostname, we need to run AutoConfig on E-Business Suite.

First, startup dbTier. AppTier is not required at all in the whole process.

FOR DATABASE TIER:
Note:338003.1 How to change the hostname and/or port of the Database Tier using AutoConfig

1. Login as oracle user.

2. De-register the current database server.
perl $ORACLE_HOME/appsutil/bin/adgentns.pl appspass=apps contextfile=$CONTEXT_FILE -removeserver

3. Update AutoConfig Context file with new host information. Edit $CONTEXT_FILE directly.
* Copy $CONTEXT_FILE to a new context file.
cp /opt/oracle/product/10.1.0/db/appsutil/PROD_<oldhost>.xml /opt/oracle/product/10.1.0/db/appsutil/PROD_<newhost>.xml
* Edit /opt/oracle/product/10.1.0/db/appsutil/PROD_<newhost>.xml directly.
- Replace all <oldhost> to <newhost>
- Replace all <olddomain.com> to <newdomain.com>

4. Change hostname.
- Execute "system-config-network" to change the new hostname for the machine.
- Edit /etc/hosts with "newhost.newdomain.com ip newhost".

(After changing hostname, you'll not be able to startup any graphical application such as xclock due to "Xlib: connection to :0.0 refused by server". You can press "ctrl + alt + backspace" to kill x server.)

5. Execute AutoConfig for dbTier.
cd $ORACLE_HOME/appsutil/bin/
./adconfig.sh contextfile=$ORACLE_HOME/appsutil/PROD_<newhost>.xml

FOR APPS TIER:
Note:341322.1 How to change the hostname of an Applications Tier using AutoConfig

1. Login as applmgr user.

2. De-register the current apps server.
perl $AD_TOP/bin/adgentns.pl appspass=apps contextfile=$CONTEXT_FILE -removeserver

3. Update AutoConfig Context file with new host information. It is easier to edit $CONTEXT_FILE directly.
* Copy $CONTEXT_FILE to a new context file.
cp /opt/oracle/apps/prodappl/admin/PROD_<oldhost>.xml /opt/oracle/apps/prodappl/admin/PROD_<newhost>.xml
* Edit /opt/oracle/apps/prodappl/admin/PROD_<newhost>.xml directly.
- Replace all <oldhost> to <newhost>
- Replace all <olddomain.com> to <newdomain.com>

4. Execute AutoConfig for appTier.
cd $AD_TOP/bin
./adconfig.sh contextfile=/opt/oracle/apps/prodappl/admin/PROD_<newhost>.xml appspass=apps

FINISHING TASK:

AutoConfig doesn't convert E-Business Suite completely. Some settings may remain unchanged or reset to default. So, it is required to go check the configuration as described in Cloning Guide.

Identified steps are:

1. As applmgr, vi /opt/oracle/apps/prodappl/admin/adgetlnxver.sh to ensure ctxfile is pointing to correct PROD_<newhost>.xml file.
ctxfile="/opt/oracle/apps/prodappl/admin/PROD_htb.xml"

2. As applmgr user, vi $IAS_ORACLE_HOME/Apache/Jserv/etc/jserv.properties to ensure:
wrapper.bin.parameters=-Djava.awt.headless=true
wrapper.bin.parameters=-DAdaptorCatalog=/opt/oracle/apps/prodappl/au/11.5.0/java/catalog.xml
wrapper.bin.parameters=-DClientMode=local

3. As oracle user, do the following:
$ sqlplus apps/apps
sql> update icx_parameters set session_cookie_domain='newdomain.com';
sql> conn applsys/apps
sql> select profile_option_value from fnd_profile_option_values where profile_option_value like '%oldhost%';
sql> update fnd_profile_option_values set profile_option_value='/opt/oracle/db/proddb/9.2.0/appsutil/outbound/PROD_newhost' where profile_option_value like '%oldhost%';
3 rows will be updated.
sql> exit;

Done. You can startup AppTier now and access E-Business Suite login page at http://newhost.newdomain.com:8000.


From: http://vistababa.wordpress.com/2009/12/14/how-to-change-ip-hostname-domain-and-ports-of-single-node-oracle-e-business-suite/

How to Change IP, Hostname, Domain and Ports of a single node Oracle E-Business Suite

Oracle E-Business Suite is not dependent to IP address, so one can easily change the IP address of nodes without any effect on E-Business Suite.

What about Hostname, Domain and Ports? Oracle E-Business Suite is dependent to these. So, we couldn’t change theme without coordination of E-Business Suite itself.

There are two methods for changing Hostname, Domain and Ports of Oracle E-Business Suite. The first method, that will be discussed here, is using autoconfig and another method is by cloning. It is easier to use autoconfig method to change hostname, domain and ports and use cloning method for changing other configurations of Oracle E-Business Suite.

In this document we assume that our E-Business Suite has just one node so that all Tiers and Servers reside on this node. For changing hostname, domain and ports of a multinode Oracle E-Business Suite, refer to the documents listed in the refrences section of this post.

1. DB Tier: Deregister the current database server

As the database hostname and domain will be changed, the current database server node needs to be de-registered.

SQL> select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODESwhere FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID andSERVER_TYPE='DB' and FND_NODES.NODE_NAME=UPPER('oldhost');

NAME            SERVER_TYPE
--------------- -----------
oldhost_PROD_DB  DB

# cd $ORACLE_HOME/appsutil
# perl ./bin/adgentns.pl appspass=<APPSpwd> contextfile=./PROD_oldhost.xml -removeserver

SQL> select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODESwhere FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID andSERVER_TYPE='DB' and FND_NODES.NODE_NAME=UPPER('oldhost');

no rows selected

2. DB Tier: Create a new Context file

You can create the new context file using whichever of the following methods:

a. Manuall Method:

# cd $ORACLE_HOME/appsutil
# cp PROD_oldhost.xml PROD_newhost.xml

Edit PROD_newhost.xml manually:

Replace all oldhost with newhost

Replace all olddomain with newdomain

b. Script Method:

# cd $ORACLE_HOME/appsutil
# perl ./bin/adclonectx.pl contextfile=./PROD_oldhost.xml

Provide the values required for creation of the new Database Context file.
Do you want to use a virtual hostname for the target node (y/n) [n] ?:
Target hostname [oldhost]:newhost
Target System database name [PROD]:
Target instance is a Real Application Cluster (RAC) instance (y/n) [n]:
Target system domain name [olddomain]:newdomain
Oracle OS User [oraprod]:
Oracle OS Group [dba]:
Target system RDBMS ORACLE_HOME directory [/gldb/apps/d02/oracle/proddb/9.2.0]:
Target system utl_file accessible directories list [/usr/tmp]:
Number of DATA_TOP's on the target system [4]:1
Target system DATA_TOP 1:/gldb/apps/d03/oracle/proddata
Do you want to preserve the Display set to oldhost:0.0 (y/n) [y] ?:n
Target system Display [newhost:0.0]:
Target system JAVA_TOP location [null]:/gldb/apps/d01/oracle/prodcomn/java
Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:
Database port is 1521
New context path and file name [PROD_newhost.xml]:
Creating the new Database Context file from :
/gldb/apps/d02/oracle/proddb/9.2.0/appsutil/template/adxdbctx.tmp
The new database context file has been created :
/gldb/apps/d02/oracle/proddb/9.2.0/appsutil/PROD_newhost.xml

Note: The command above will create a new Context file of the format PROD_newhost.xml in the current working directory.

3. APPS Tier: Deregister the current Applications server

As the Applications hostname and domain will be changed, the current Applications server node needs to be de-registered.

SQL> select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODESwhere FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID andSERVER_TYPE='APPS' and FND_NODES.NODE_NAME=UPPER('oldhost');

NAME              SERVER_TYP
----------------- ----------
oldhost_PROD_APPS  APPS

# cd $APPL_TOP/admin
# perl $AD_TOP/bin/adgentns.pl appspass=<APPSpwd> contextfile=./PROD_oldhost.xml -removeserver

SQL> select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODESwhere FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID andSERVER_TYPE='APPS' and FND_NODES.NODE_NAME=UPPER('oldhost');

no rows selected

4. APPS Tier: Create a new Context file

You can create the new context file using whichever of the following methods:

a. Manuall Method:

# cd $APPL_TOP/admin
# cp PROD_oldhost.xml PROD_newhost.xml

Edit PROD_newhost.xml manually:

Replace all oldhost with newhost

Replace all olddomain with newdomain

b. Script Method:

# cd $APPL_TOP/admin
# perl $AD_TOP/bin/adclonectx.pl contextfile=./PROD_oldhost.xml

Provide the values required for creation of the new APPL_TOP Context file.
Do you want to use a virtual hostname for the target node (y/n) [n] ?:
Target hostname [oldhost]:newhost
Target system database SID [PROD]:
Target system domain name [olddomain]:newdomain
Username for the applications file system owner [applprod]:
Group for the applications file system owner [dba]:
Target system database server node [oldhost]:newhost
Does the target system have more than one application tier server node (y/n) [n] ?:
Is the target system APPL_TOP divided into multiple mount points(y/n)[n]?:
Target system APPL_TOP mount point [/gldb/apps/d01/oracle/prodappl]:
Target system COMMON_TOP directory [/gldb/apps/d01/oracle/prodcomn]:
Target system 8.0.6 ORACLE_HOME directory [/gldb/apps/d01/oracle/prodora/8.0.6]:
Target system iAS ORACLE_HOME directory [/gldb/apps/d01/oracle/prodora/iAS]:
Do you want to preserve the Display set to oldhost:0.0 (y/n) [y] ?:n
Target system Display [newhost:0.0]:
Location of JDK 1.3.1 on the target system [/usr/java14]:
Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:
Web Listener port is 8000
Complete port information available at /gldb/apps/d01/oracle/prodappl/admin/out/PROD_newhost/portpool.lst
New context path and file name [PROD_newhost.xml]:
Creating the new APPL_TOP Context file from :
/gldb/apps/d01/oracle/prodappl/ad/11.5.0/admin/template/adxmlctx.tmp
The new APPL_TOP context file has been created :
/gldb/apps/d01/oracle/prodappl/admin/PROD_newhost.xml

Note: The command above will create a new Context file of the format PROD_newhost.xml in the current working directory.

5. APPS Tier: Shutdown the Application Tier Services

# $COMMON_TOP/admin/scripts/PROD_oldhost/adstpall.sh apps/<appspasswd>

6. Change the hostname and domain

Change the hostname and domain at OS level.

# hostname -s newhost
# edit /etc/hosts as follow:

OLD: IP-Address     oldhost.olddomain     oldhost
NEW: IP-Address     newhost.newdomain     newhost

7. DB Tier: Reseed the Net Services Topology Model

# cd $ORACLE_HOME/appsutil# ./bin/adconfig.sh contextfile=./PROD_newhost.xml

8. APPS Tier: Reseed the Net Services Topology Model

The Net Services Topology Model is automatically updated by running AutoConfig.

# $AD_TOP/bin/adconfig.sh contextfile=$APPL_TOP/admin/PROD_newhost.xml appspass=<appspasswd>

9. DB Tier: Shutdown the database and listener

# $ORACLE_HOME/appsutil/scripts/PROD_oldhost/addbctl.sh stop
# $ORACLE_HOME/appsutil/scripts/PROD_oldhost/addlnctl.sh stop PROD

10. DB Tier: Start the listener and database

# $ORACLE_HOME/appsutil/scripts/PROD_newhost/addlnctl.sh start PROD
# $ORACLE_HOME/appsutil/scripts/PROD_newhost/addbctl.sh start

11. APPS Tier: Start the Application Tier Services

# $COMMON_TOP/admin/scripts/PROD_newhost/adstrtal.sh apps/<appspasswd>

Notes:

1.Q: Do you encounter the following errors when you start the listener?

     Error listening on: (ADDRESS=(PROTOCOL=TCP)(Host=newhost)(Port=1521))
     TNS-12532: TNS:invalid argument
     TNS-12560: TNS:protocol adapter error
     TNS-00502: Invalid argument
     IBM/AIX RISC System/6000 Error: 515: Error 515 occurred.

  A: Check $ORACLE_HOME/network/admin/PROD_newhost/sqlnet.ora to insure it is using new values:

     OLD: tcp.invited_nodes=(oldhost.olddomain, newhost.newdomain)
     NEW: tcp.invited_nodes=(newhost.newdomain)

2.Q: Do you encounter the following errors in Jinitiator console when you try to start form applications?

     java.lang.NoClassDefFoundError: org/apache/regexp/RESyntaxException
     at oracle.ewt.lwAWT.lwText.LWTextField.getText(LWTextField.java:196)
     at oracle.ewt.lwAWT.lwText.LWTextField._getDisplayString(LWTextField.java:787)

  A: Check $OA_HTML/bin/appsweb_PROD_newhost.cfg for the value of ‘archive2′. It should be as follow:

     archive2=,/OA_JAVA/regexp.jar

3.Q: Do you encounter the following errors in Jinitiator console when you try to start form applications?

     java.lang.Error: RE internal error: Corrupt program
     at org.apache.regexp.RE.internalError(RE.java:820)
     at org.apache.regexp.RE.matchNodes(RE.java:1414)

  A: Made the following change:

     # cd $JAVA_TOP
     # mv org org.back

References:

1. How to change the hostname of an Applications Tier using AutoConfig [Metalink 341322.1]

2. How to change the hostname and/or port of the Database Tier using AutoConfig [Metalink 338003.1]