[root@ebao35 jdk6]# su root
[root@ebao35 jdk6]# chmod 777 jdk-6u35-linux-x64-rpm.bin
[root@ebao35 jdk6]# ./jdk-6u35-linux-x64-rpm.bin
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-6u35-linux-amd64.rpm
inflating: sun-javadb-common-10.6.2-1.1.i386.rpm
inflating: sun-javadb-core-10.6.2-1.1.i386.rpm
inflating: sun-javadb-client-10.6.2-1.1.i386.rpm
inflating: sun-javadb-demo-10.6.2-1.1.i386.rpm
inflating: sun-javadb-docs-10.6.2-1.1.i386.rpm
inflating: sun-javadb-javadoc-10.6.2-1.1.i386.rpm
正在準備… ########################################### [100%]
1:jdk ########################################### [100%]
Unpacking JAR files...
rt.jar...
jsse.jar...
charsets.jar...
tools.jar...
localedata.jar...
plugin.jar...
javaws.jar...
deploy.jar...
Installing JavaDB
正在準備… ########################################### [100%]
1:sun-javadb-common ########################################### [ 17%]
2:sun-javadb-core ########################################### [ 33%]
3:sun-javadb-client ########################################### [ 50%]
4:sun-javadb-demo ########################################### [ 67%]
5:sun-javadb-docs ########################################### [ 83%]
6:sun-javadb-javadoc ########################################### [100%]
Java(TM) SE Development Kit 6 successfully installed.
Product Registration is FREE and includes many benefits:
* Notification of new versions, patches, and updates
* Special offers on Oracle products, services and training
* Access to early releases and documentation
Product and system data will be collected. If your configuration
supports a browser, the JDK Product Registration form will
be presented. If you do not register, none of this information
will be saved. You may also register your JDK later by
opening the register.html file (located in the JDK installation
directory) in a browser.
For more information on what data Registration collects and
how it is managed and used, see:
http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html
Press Enter to continue.....
Done.
[root@ebao35 jdk6]#
[root@ebao35 jdk6]# rpm -qa | grep java
sun-javadb-demo-10.6.2-1.1
sun-javadb-common-10.6.2-1.1
java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
sun-javadb-core-10.6.2-1.1
sun-javadb-javadoc-10.6.2-1.1
sun-javadb-client-10.6.2-1.1
sun-javadb-docs-10.6.2-1.1
[root@ebao35 jdk6]# rpm -qa | grep jdk
jdk-1.6.0_35-fcs
[root@ebao35 jdk6]#
[root@ebao35 jdk6]# ll /usr/java
總計 4
lrwxrwxrwx 1 root root 16 12月 7 14:38 default -> /usr/java/latest
drwxr-xr-x 7 root root 4096 12月 7 14:38 jdk1.6.0_35
lrwxrwxrwx 1 root root 21 12月 7 14:38 latest -> /usr/java/jdk1.6.0_35
[root@ebao35 jdk6]# alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_35/bin/java 2
[root@ebao35 jdk6]#
[root@ebao35 jdk6]# alternatives --config java
有 2 程式提供 'java'。
選擇 指令
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
2 /usr/java/jdk1.6.0_35/bin/java
請輸入以保留目前的選擇[+],或輸入選擇號碼:2
[root@ebao35 jdk6]#
[root@ebao35 jdk6]# java -version
java version "1.6.0_35"
Java(TM) SE Runtime Environment (build 1.6.0_35-b10)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)
[root@ebao35 jdk6]#
完成^_^
2012年12月6日 星期四
CentOS/RHEL 安裝 jdk-6u35-linux-x64-rpm.bin
JDK url
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html
Apache HTTP沒有用JDK來開發
JDK 32, JDK 64不需要裝二套
簡單說 32bit機器裝 JDK 32位元,
64位元機器裝 JDK64位元
oracle client與JDK無關
oracle client 32或 oracle client 64
jdbc:thin(type4)
jdbc:oci (type2)
JAVA--OCI
Apache HTTP沒有用JDK來開發
JDK 32, JDK 64不需要裝二套
簡單說 32bit機器裝 JDK 32位元,
64位元機器裝 JDK64位元
oracle client與JDK無關
oracle client 32或 oracle client 64
jdbc:thin(type4)
jdbc:oci (type2)
JAVA--OCI
開機自動 mount硬碟 /etc/fstab
/etc/fstab檔
/dev/sdc5 /home/self/installed ext4 defaults 2 2 /dev/sdb5 /home/self/ebao35 ext4 defaults 2 2
[root@ebao35 init.d]# mount -a
[root@ebao35 init.d]# df
檔案系統 1K-區段 已用 可用 已用% 掛載點
/dev/mapper/VolGroup00-LogVol00
3967680 3150340 612540 84% /
/dev/sda1 101086 12869 82998 14% /boot
tmpfs 1028308 0 1028308 0% /dev/shm
/dev/sdc5 131077668 192056 124227260 1% /home/self/installdb
/dev/sdb5 131077668 192056 124227260 1% /home/self/ebao35
[root@ebao35 init.d]#
ORA-00959: tablespace 'GS_342_INIT_TBS' does not exist
initial_db_2012-12-04_17-46-57.log
IMP-00003: ORACLE error 959 encountered
ORA-00959: tablespace 'GS_342_INIT_TBS' does not exist
. . importing table "T_CLM_INTERFACE_DEF" 8 rows imported
. . importing table "T_CLM_INTERFACE_LOG" 0 rows imported
. . importing table "T_CLM_INTERFACE_SERVICE" 8 rows imported
. . importing table "T_CLM_INVESTIGATION" 0 rows imported
. . importing table "T_CLM_ITEM" 0 rows imported
. . importing table "T_CLM_ITEM_HIS" 0 rows imported
IMP-00017: following statement failed with ORACLE error 959:
"CREATE TABLE "T_CLM_LETTER" ("LETTER_ID" NUMBER(10, 0) NOT NULL ENABLE, "TA"
ORA-29857: 網域索引和 (或) 次要物件存在於表格空間中
刪除 tablespace時出現
ORA-29857: 網域索引和 (或) 次要物件存在於表格空間中
ORA-29857: domain indexes and/or secondary objects exist in the tablespace
$sqlplus "/as sysdba" SQL> select owner||','||index_name||','||table_owner from all_indexes where index_type='DOMAIN'; OWNER||','||INDEX_NAME||','||TABLE_OWNER GSUSER,IDX_PTY_INDI_P_NAME,GSUSER GSUSER,IND_PTY_ORG__CTXCAT,GSUSER SQL>drop user gsuser cascade; User droped. SQL>drop tablespace GS_342_INIT_TBS including contents cascade constraints; Tablespace dropped.
2012年12月5日 星期三
Create a Basic Cluster
(15 minutes)
Skills Learned
At the end of this exercise, you will be able to:
· Create a cluster of managed servers
· Start clustered servers
Problem Statement
The Dizzyworld system architects have determined that the Dizzyworld applications will benefit from a highly available environment which will load balance requests to different servers. This will make the Dizzyworld applications more reliable to employees and customers in case of server failure. It will also allow more processing capabilities for times when application traffic is heavier than usual.
Design
Overview
In this lab you will create a cluster of three servers, dizzy1, dizzy2 and dizzy3. This cluster will eventually host your Dizzyworld applications but for now you want to confirm that they start properly and join the cluster.
Specifications
Figure 13 presents the cluster architecture...


Figure 13. Dizzyworld Cluster Architecture
Table 26 Variables
File Name
|
Example
|
<STUDENT>
|
(Windows) c:\student\course_wls10_sysadmin
|
(Linux) /usr/student/course_wls10_sysadmin
| |
<WORK_HOME>
|
(Windows) <STUDENT>\work
|
(Linux) <STUDENT>/work
| |
<LAB_HOME>
|
(Windows) <STUDENT>\labs\labXX
|
(Linux) <STUDENT>/labs/labXX
|
Instructions
1.
|
Set up the exercise by opening a command prompt using prompt.cmd (Windows) or ./prompt.sh (Linux) found in <STUDENT>\bin. Change to the <LAB_HOME> directory and type:
ant setup_exercise
Note: To continue working on the current exercise, use ant continue_exercise to start the HRDatabase and AdminServer. Using ant setup_exercise will overwrite your existing work.
|
2.
|
If already running, shut down dizzy1, dizzy2 and dizzy3 managed servers. If not already open, start a web browser and navigate to http://localhost:7001/console. Log in as:
Username: system
Password: weblogic
Create a new cluster with the following properties:
Name: dizzyworldCluster
Multicast Address: 239.192.0.0 (default)
Multicast Port: (refer to instructor)
Servers: dizzy1, dizzy2, dizzy3
|
3.
|
Start dizzy1, dizzy2 and dizzy3. Watch each server as it tries to synchronize with other servers in the cluster and as it finally joins the cluster. During startup of the servers, if prompted, enter the following:
Username: system
Password: weblogic
|
4.
|
(Optional): To set up the solution for this lab, open a command prompt using prompt.cmd (Windows) or ./prompt.sh (Linux) found in <STUDENT>\bin directory. Change to the <LAB_HOME> directory and type:
ant setup_solution
|
Detailed Instructions
Set up the exercise
| ||
1.1
|
Open a prompt using prompt.cmd (Windows) or ./prompt.sh (Linux) in <STUDENT>\bin.
| |
1.2
|
Change to the <LAB_HOME> directory.
| |
1.3
|
Type the following command:
ant setup_exercise
Note: To continue working on the current exercise, use ant continue_exercise to start the HRDatabase and AdminServer. Using ant setup_exercise will overwrite your existing work.
| |
Create a cluster
| ||
2.1
|
If already running, shut down dizzy1, dizzy2 and dizzy3 managed servers.
| |
2.2
|
If not already open, start a web browser and navigate to http://localhost:7001/console. Log in as:
Username: system
Password: weblogic
| |
2.3
|
Navigate to dizzyworld à Environment à Clusters. Lock the console, if necessary.
| |
2.4
|
Create a new cluster with the following properties:
Name: dizzyworldCluster
Messaging Mode: Multicast
Multicast Address: 239.192.0.0 (default)
Multicast Port: (refer to instructor)
Click OK.
| |
2.5
|
Go back into the dizzyworldCluster and navigate to the Configuration à Servers tab.
| |
2.6
|
Add the existing servers dizzy1, dizzy2 and dizzy3 to the cluster.
| |
2.7
|
Activate your changes.
| |
2.8
|
Navigate to dizzyworld à Environment à Servers and view the list of servers. Note that dizzy1, dizzy2 and dizzy3 are now part of the dizzyworldCluster.
| |
Start the clustered servers
| ||
3.1
|
Using the previously opened prompt, navigate to <WORK_HOME>\domains\dizzyworld\bin.
| |
3.2
|
Start the dizzy1 server by typing the following in the prompt:
(Windows) start startManagedWebLogic.cmd dizzy1
(Linux) xterm –T dizzy1 –e ./startManagedWebLogic.sh dizzy1 &
| |
3.3
|
If prompted, enter the following:
Username: system
Password: weblogic
| |
3.4
|
Watch the server start up in the prompt window. At some point you should see it start listening for cluster announcement and waiting to synchronize with other servers in the cluster. As the other servers have not started yet; there is nothing for it to synchronize with yet.
<Notice> <Cluster> <BEA-000138> <Listening for announcements from cluster dizzyworldCluster on 239.192.0.0:7011.>
<Notice> <Cluster> <BEA-000133> <Waiting to synchronize with other running members of dizzyworldCluster.>
| |
3.5
|
Finally, you should see that it has successfully joined the cluster. You will see something like:
<Notice> <Cluster> <BEA-000102> <Joining cluster dizzyworldCluster on 239.192.0.0:7011>
| |
3.6
|
Start the dizzy2 server by typing the following in the prompt window:
(Windows) start startManagedWebLogic.cmd dizzy2
(Linux) xterm –T dizzy2 –e ./startManagedWebLogic.sh dizzy2 &
| |
3.7
|
If prompted, enter the following:
Username: system
Password: weblogic
| |
3.8
|
Watch the server start up in the prompt window. As one of the servers in the cluster is already started, dizzy2 will synchronize with dizzy1 and will download the cluster JNDI tree.
<Notice> <Cluster> <BEA-000133> <Waiting to synchronize with other running members of dizzyworldCluster.>
| |
3.9
|
Finally, start the dizzy3 server and watch it synchronize with the other servers in the cluster and finally join the cluster.
| |
(Optional) Setup Solution, if unable to complete lab.
| ||
4.1
|
To set up the solution for this lab, open a command prompt using prompt.cmd (Windows) or ./prompt.sh (Linux) found in <STUDENT>\bin directory. Change to the <LAB_HOME> directory and type:
ant setup_solution
| |
訂閱:
文章 (Atom)

